From 7ce57e6ccb4de3b430479161586876cd352cd4ef Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 May 2015 15:24:30 +0200 Subject: [PATCH] Fix a view, fix tag format. --- app/Support/Twig/Journal.php | 7 ++++++- resources/twig/list/piggy-bank-events.twig | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Support/Twig/Journal.php b/app/Support/Twig/Journal.php index 02a2832f7e..093f617084 100644 --- a/app/Support/Twig/Journal.php +++ b/app/Support/Twig/Journal.php @@ -80,12 +80,17 @@ class Journal extends Twig_Extension } foreach ($journal->tags as $tag) { if ($tag->tagMode == 'balancingAct') { - // return tag formatted for a "balancing act". + // return tag formatted for a "balancing act", even if other + // tags are present. $amount = App::make('amount')->formatJournal($journal, false); return ' ' . $tag->tag . ''; } + if($tag->tagMode == 'nothing') { + // return the amount: + return App::make('amount')->formatJournal($journal); + } } diff --git a/resources/twig/list/piggy-bank-events.twig b/resources/twig/list/piggy-bank-events.twig index 3993cefe59..6beec83ed2 100644 --- a/resources/twig/list/piggy-bank-events.twig +++ b/resources/twig/list/piggy-bank-events.twig @@ -10,7 +10,7 @@ {% if showPiggyBank %} - {{ event.piggyBank.name }} + {{ event.piggyBank.name }} {% endif %}