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 maincontent = journalTransactionsReportAsHtml opts vd $ journalTransactionsReport (reportopts_ $ cliopts_ opts) j m
hledgerLayout vd "journal" [hamlet| hledgerLayout vd "journal" [hamlet|
<div .row> <div .row>
<h2#contenttitle>#{title} <h2 #contenttitle>#{title}
<!-- p>Journal entries record movements of commodities between accounts. --> <!-- 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> <div .table-responsive>
^{maincontent} ^{maincontent}
|] |]
@ -50,11 +50,11 @@ journalTransactionsReportAsHtml :: WebOpts -> ViewData -> TransactionsReport ->
journalTransactionsReportAsHtml _ vd (_,items) = [hamlet| journalTransactionsReportAsHtml _ vd (_,items) = [hamlet|
<table .transactionsreport .table .table-condensed> <table .transactionsreport .table .table-condensed>
<thead> <thead>
<th.date style="text-align:left;"> <th .date style="text-align:left;">
Date Date
<th.description style="text-align:left;">Description <th .description style="text-align:left;">Description
<th.account style="text-align:left;">Account <th .account style="text-align:left;">Account
<th.amount style="text-align:right;">Amount <th .amount style="text-align:right;">Amount
$forall i <- numberTransactionsReportItems items $forall i <- numberTransactionsReportItems items
^{itemAsHtml vd i} ^{itemAsHtml vd i}
|] |]
@ -75,7 +75,7 @@ $forall p' <- tpostings torig
<td .nonhead> <td .nonhead>
&nbsp; &nbsp;
<a href="@?{acctlink (paccount p')}##{tindex torig}" title="#{paccount p'}">#{elideAccountName 40 $ paccount p'} <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 where
acctlink a = (RegisterR, [("q", T.pack $ accountQuery a)]) acctlink a = (RegisterR, [("q", T.pack $ accountQuery a)])

View File

@ -37,7 +37,7 @@ getRegisterR = do
s2 = if filtering then ", filtered" else "" s2 = if filtering then ", filtered" else ""
maincontent = registerReportHtml opts vd $ accountTransactionsReport (reportopts_ $ cliopts_ opts) j m $ fromMaybe Any $ inAccountQuery qopts maincontent = registerReportHtml opts vd $ accountTransactionsReport (reportopts_ $ cliopts_ opts) j m $ fromMaybe Any $ inAccountQuery qopts
hledgerLayout vd "register" [hamlet| hledgerLayout vd "register" [hamlet|
<h2#contenttitle>#{title} <h2 #contenttitle>#{title}
<!-- p>Transactions affecting this account, with running balance. --> <!-- p>Transactions affecting this account, with running balance. -->
^{maincontent} ^{maincontent}
|] |]
@ -79,14 +79,14 @@ registerItemsHtml _ vd (balancelabel,items) = [hamlet|
itemAsHtml VD{..} (n, newd, newm, _, (torig, tacct, split, acct, amt, bal)) = [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;"> <tr ##{tindex torig} .item.#{evenodd}.#{firstposting}.#{datetransition} title="#{show torig}" style="vertical-align:top;">
<td.date> <td .date>
<a href="@{JournalR}##{tindex torig}">#{date} <a href="@{JournalR}##{tindex torig}">#{date}
<td.description title="#{show torig}">#{textElideRight 30 desc} <td .description title="#{show torig}">#{textElideRight 30 desc}
<td.account>#{elideRight 40 acct} <td .account>#{elideRight 40 acct}
<td.amount style="text-align:right; white-space:nowrap;"> <td .amount style="text-align:right; white-space:nowrap;">
$if showamt $if showamt
\#{mixedAmountAsHtml amt} \#{mixedAmountAsHtml amt}
<td.balance style="text-align:right;">#{mixedAmountAsHtml bal} <td .balance style="text-align:right;">#{mixedAmountAsHtml bal}
|] |]
where where
@ -109,8 +109,8 @@ registerChartHtml percommoditytxnreports =
-- have to make sure plot is not called when our container (maincontent) -- have to make sure plot is not called when our container (maincontent)
-- is hidden, eg with add form toggled -- is hidden, eg with add form toggled
[hamlet| [hamlet|
<label#register-chart-label style=""><br> <label #register-chart-label style=""><br>
<div#register-chart style="height:150px; margin-bottom:1em; display:block;"> <div #register-chart style="height:150px; margin-bottom:1em; display:block;">
<script type=text/javascript> <script type=text/javascript>
\$(document).ready(function() { \$(document).ready(function() {
var $chartdiv = $('#register-chart'); var $chartdiv = $('#register-chart');