web: more tweaks, style negative amounts

This commit is contained in:
Simon Michael 2010-07-28 00:24:49 +00:00
parent 66b1ee9f11
commit 02f77415f0
2 changed files with 11 additions and 5 deletions

View File

@ -415,7 +415,9 @@ getLedgerPage = do
let args = appArgs app
fspec' = optsToFilterSpec opts args t
br = balanceReportAsHtml opts td $ balanceReport opts fspec' j
rr = registerReportAsHtml opts td $ registerReport opts fspec j
rr = if null a && null p
then nulltemplate
else registerReportAsHtml opts td $ registerReport opts fspec j
td = mktd{here=here, title="hledger", msg=msg, a=a, p=p}
hamletToRepHtml $ pageLayout td [$hamlet|
%div.ledger
@ -499,7 +501,10 @@ registerReportAsHtml _ td items = [$hamlet|
p' = if null p then "" else printf "&p=%s" p
--mixedAmountAsHtml = intercalate ", " . lines . show
mixedAmountAsHtml = preEscapedString . intercalate "<br>" . lines . show
mixedAmountAsHtml b = preEscapedString $ addclass $ intercalate "<br>" $ lines $ show b
where addclass = printf "<span class=\"%s\">%s</span>" c
c = case isNegativeMixedAmount b of Just True -> "negative amount"
_ -> "positive amount"
----------------------------------------------------------------------

View File

@ -12,7 +12,7 @@ body { margin:0; }
.navlinkcurrent { font-weight:bold; }
.nav2 { font-size:small; }
#filterform { font-size:small; display:inline; margin-left:1em; }
.filtering { background-color:#eee; font-weight:bold; }
.filtering { background-color:#ddd; font-weight:bold; }
#stopfilterlink { font-size:small; }
.toprightlink { font-size:small; margin-left:1em; float:right; }
#messages { color:red; background-color:#ffeeee; margin:0.5em;}
@ -33,14 +33,15 @@ body { margin:0; }
/* for -fweb610 */
/* #hledgerorglink, #helplink { float:right; margin-left:1em; } */
.current { font-weight:bold; background-color:#eee; }
.current { font-weight:bold; background-color:#ddd; }
.description { padding-left:1em; }
.account { white-space:nowrap; padding-left:1em; }
.amount { white-space:nowrap; padding-left:1em; }
.balance { white-space:nowrap; padding-left:1em; }
/* don't let fields get too small in emptyish reports */
.description { width:4em; }
.account, .amount, .balance { width:2em; }
.positive { }
.negative { color:red; }
/* .odd { background-color:#e8e8e8; } */
/* .even { background-color:#e8f8e8; } */
/* .even { background-color:#f0fff0; } */