From 73e5088cbe07f5b26b299516eb7579cb418ba9e5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 27 Jun 2011 13:28:21 +0000 Subject: [PATCH] web: show +subs link only when there are subaccounts --- hledger-web/.hledger/web/templates/balancereportitem.hamlet | 5 +++-- hledger-web/Handlers.hs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hledger-web/.hledger/web/templates/balancereportitem.hamlet b/hledger-web/.hledger/web/templates/balancereportitem.hamlet index 747f2d2f6..3938e9be0 100644 --- a/hledger-web/.hledger/web/templates/balancereportitem.hamlet +++ b/hledger-web/.hledger/web/templates/balancereportitem.hamlet @@ -3,8 +3,9 @@ #{indent} #{adisplay} +subs + $if hassubs +   + +subs diff --git a/hledger-web/Handlers.hs b/hledger-web/Handlers.hs index 98728e9dd..5ddc399e1 100644 --- a/hledger-web/Handlers.hs +++ b/hledger-web/Handlers.hs @@ -143,6 +143,7 @@ balanceReportAsHtml _ vd@VD{here=here,m=m,q=q,qopts=qopts,j=j} (items',total) = itemAsHtml :: ViewData -> BalanceReportItem -> Hamlet AppRoute itemAsHtml VD{here=here,q=q} (acct, adisplay, aindent, abal) = $(Settings.hamletFile "balancereportitem") where + hassubs = not $ null $ ledgerSubAccounts l $ ledgerAccount l acct numpostings = length $ apostings $ ledgerAccount l acct depthclass = "depth"++show aindent inacctclass = case inacctmatcher of