web: show +subs link only when there are subaccounts
This commit is contained in:
		
							parent
							
								
									3da58052ab
								
							
						
					
					
						commit
						73e5088cbe
					
				@ -3,6 +3,7 @@
 | 
				
			|||||||
  #{indent}
 | 
					  #{indent}
 | 
				
			||||||
  <a href="@?{acctquery}" title="Focus on this account">#{adisplay}
 | 
					  <a href="@?{acctquery}" title="Focus on this account">#{adisplay}
 | 
				
			||||||
  <span.hoverlinks
 | 
					  <span.hoverlinks
 | 
				
			||||||
 | 
					   $if hassubs
 | 
				
			||||||
     
 | 
					     
 | 
				
			||||||
    <a href="@?{acctsquery}" title="Focus on this account and sub-accounts">+subs
 | 
					    <a href="@?{acctsquery}" title="Focus on this account and sub-accounts">+subs
 | 
				
			||||||
   <!--
 | 
					   <!--
 | 
				
			||||||
 | 
				
			|||||||
@ -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 :: ViewData -> BalanceReportItem -> Hamlet AppRoute
 | 
				
			||||||
   itemAsHtml VD{here=here,q=q} (acct, adisplay, aindent, abal) = $(Settings.hamletFile "balancereportitem")
 | 
					   itemAsHtml VD{here=here,q=q} (acct, adisplay, aindent, abal) = $(Settings.hamletFile "balancereportitem")
 | 
				
			||||||
     where
 | 
					     where
 | 
				
			||||||
 | 
					       hassubs = not $ null $ ledgerSubAccounts l $ ledgerAccount l acct
 | 
				
			||||||
       numpostings = length $ apostings $ ledgerAccount l acct
 | 
					       numpostings = length $ apostings $ ledgerAccount l acct
 | 
				
			||||||
       depthclass = "depth"++show aindent
 | 
					       depthclass = "depth"++show aindent
 | 
				
			||||||
       inacctclass = case inacctmatcher of
 | 
					       inacctclass = case inacctmatcher of
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user