Unified tag spacing

This commit is contained in:
Dominik Süß 2016-10-14 20:41:21 +02:00 committed by Simon Michael
parent 962ddb3c3a
commit 55b507bf30
2 changed files with 15 additions and 15 deletions

View File

@ -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>
&nbsp;
<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)])

View File

@ -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');