From 1575083855fc8e23b07347630ae691b86830c36a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 1 Aug 2010 19:54:04 +0000 Subject: [PATCH] web: register column headings --- Hledger/Cli/Commands/Web.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Hledger/Cli/Commands/Web.hs b/Hledger/Cli/Commands/Web.hs index ad89e4961..40a0f1077 100644 --- a/Hledger/Cli/Commands/Web.hs +++ b/Hledger/Cli/Commands/Web.hs @@ -625,11 +625,20 @@ getRegisterOnlyR = do registerReportAsHtml :: [Opt] -> TemplateData -> RegisterReport -> Hamlet HledgerWebAppRoute registerReportAsHtml _ td items = [$hamlet| %table.registerreport + %tr.headings + ^headings^ $forall number.items i ^itemAsHtml' i^ |] where number = zip [1..] + headings = [$hamlet| + %th.date!align=left Date + %th.description!align=left Description + %th.account!align=left Account + %th.amount!align=right Amount + %th.balance!align=right Balance + |] itemAsHtml' = itemAsHtml td itemAsHtml :: TemplateData -> (Int, RegisterReportItem) -> Hamlet HledgerWebAppRoute itemAsHtml TD{p=p} (n, (ds, posting, b)) = [$hamlet|