mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-20 02:37:12 +03:00
Unified tag spacing
This commit is contained in:
parent
962ddb3c3a
commit
55b507bf30
@ -35,9 +35,9 @@ getJournalR = do
|
||||
maincontent = journalTransactionsReportAsHtml opts vd $ journalTransactionsReport (reportopts_ $ cliopts_ opts) j m
|
||||
hledgerLayout vd "journal" [hamlet|
|
||||
<div .row>
|
||||
<h2#contenttitle>#{title}
|
||||
<h2 #contenttitle>#{title}
|
||||
<!-- p>Journal entries record movements of commodities between accounts. -->
|
||||
<a#addformlink role="button" style="cursor:pointer; margin-top:1em;" data-toggle="modal" data-target="#addmodal" title="Add a new transaction to the journal" >Add a transaction
|
||||
<a #addformlink role="button" style="cursor:pointer; margin-top:1em;" data-toggle="modal" data-target="#addmodal" title="Add a new transaction to the journal" >Add a transaction
|
||||
<div .table-responsive>
|
||||
^{maincontent}
|
||||
|]
|
||||
@ -50,11 +50,11 @@ journalTransactionsReportAsHtml :: WebOpts -> ViewData -> TransactionsReport ->
|
||||
journalTransactionsReportAsHtml _ vd (_,items) = [hamlet|
|
||||
<table .transactionsreport .table .table-condensed>
|
||||
<thead>
|
||||
<th.date style="text-align:left;">
|
||||
<th .date style="text-align:left;">
|
||||
Date
|
||||
<th.description style="text-align:left;">Description
|
||||
<th.account style="text-align:left;">Account
|
||||
<th.amount style="text-align:right;">Amount
|
||||
<th .description style="text-align:left;">Description
|
||||
<th .account style="text-align:left;">Account
|
||||
<th .amount style="text-align:right;">Amount
|
||||
$forall i <- numberTransactionsReportItems items
|
||||
^{itemAsHtml vd i}
|
||||
|]
|
||||
@ -75,7 +75,7 @@ $forall p' <- tpostings torig
|
||||
<td .nonhead>
|
||||
|
||||
<a href="@?{acctlink (paccount p')}##{tindex torig}" title="#{paccount p'}">#{elideAccountName 40 $ paccount p'}
|
||||
<td.amount .nonhead style="text-align:right;">#{mixedAmountAsHtml $ pamount p'}
|
||||
<td .amount .nonhead style="text-align:right;">#{mixedAmountAsHtml $ pamount p'}
|
||||
|]
|
||||
where
|
||||
acctlink a = (RegisterR, [("q", T.pack $ accountQuery a)])
|
||||
|
@ -37,7 +37,7 @@ getRegisterR = do
|
||||
s2 = if filtering then ", filtered" else ""
|
||||
maincontent = registerReportHtml opts vd $ accountTransactionsReport (reportopts_ $ cliopts_ opts) j m $ fromMaybe Any $ inAccountQuery qopts
|
||||
hledgerLayout vd "register" [hamlet|
|
||||
<h2#contenttitle>#{title}
|
||||
<h2 #contenttitle>#{title}
|
||||
<!-- p>Transactions affecting this account, with running balance. -->
|
||||
^{maincontent}
|
||||
|]
|
||||
@ -79,14 +79,14 @@ registerItemsHtml _ vd (balancelabel,items) = [hamlet|
|
||||
itemAsHtml VD{..} (n, newd, newm, _, (torig, tacct, split, acct, amt, bal)) = [hamlet|
|
||||
|
||||
<tr ##{tindex torig} .item.#{evenodd}.#{firstposting}.#{datetransition} title="#{show torig}" style="vertical-align:top;">
|
||||
<td.date>
|
||||
<td .date>
|
||||
<a href="@{JournalR}##{tindex torig}">#{date}
|
||||
<td.description title="#{show torig}">#{textElideRight 30 desc}
|
||||
<td.account>#{elideRight 40 acct}
|
||||
<td.amount style="text-align:right; white-space:nowrap;">
|
||||
<td .description title="#{show torig}">#{textElideRight 30 desc}
|
||||
<td .account>#{elideRight 40 acct}
|
||||
<td .amount style="text-align:right; white-space:nowrap;">
|
||||
$if showamt
|
||||
\#{mixedAmountAsHtml amt}
|
||||
<td.balance style="text-align:right;">#{mixedAmountAsHtml bal}
|
||||
<td .balance style="text-align:right;">#{mixedAmountAsHtml bal}
|
||||
|]
|
||||
|
||||
where
|
||||
@ -109,8 +109,8 @@ registerChartHtml percommoditytxnreports =
|
||||
-- have to make sure plot is not called when our container (maincontent)
|
||||
-- is hidden, eg with add form toggled
|
||||
[hamlet|
|
||||
<label#register-chart-label style=""><br>
|
||||
<div#register-chart style="height:150px; margin-bottom:1em; display:block;">
|
||||
<label #register-chart-label style=""><br>
|
||||
<div #register-chart style="height:150px; margin-bottom:1em; display:block;">
|
||||
<script type=text/javascript>
|
||||
\$(document).ready(function() {
|
||||
var $chartdiv = $('#register-chart');
|
||||
|
Loading…
Reference in New Issue
Block a user