web: show +subs link only when there are subaccounts

This commit is contained in:
Simon Michael 2011-06-27 13:28:21 +00:00
parent 3da58052ab
commit 73e5088cbe
2 changed files with 4 additions and 2 deletions

View File

@ -3,8 +3,9 @@
#{indent}
<a href="@?{acctquery}" title="Focus on this account">#{adisplay}
<span.hoverlinks
&nbsp;
<a href="@?{acctsquery}" title="Focus on this account and sub-accounts">+subs
$if hassubs
&nbsp;
<a href="@?{acctsquery}" title="Focus on this account and sub-accounts">+subs
<!--
&nbsp;
<a href="@?{acctsonlyquery}" title="Focus on this account and sub-accounts and hide others">-others -->

View File

@ -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