hledger/hledger-web/templates/journal.hamlet

39 lines
1.4 KiB
Plaintext

<h2>
#{title'}
$if elem AddPermission perms
<a #addformlink href="#" role="button" style="cursor:pointer; margin-top:1em;"
data-toggle="modal" data-target="#addmodal" title="Lisää uusi tapahtuma kirjanpitoon.">
Kirjaa tapahtuma
<ol .transactionsreport .list-unstyled>
$forall torig <- items
<li .transaction ##{transactionFrag torig}>
<div .title title="#{showTransaction torig}">
<time .date datetime="#{show (tdate torig)}" nowrap>
#{show (tdate torig)}
<div>
#{textElideRight 60 (tdescription torig)}
$if null $ filter isVisibleTag $ ttags torig
$else
<ul .tags>
$forall (tagName, tagValue) <- filter isVisibleTag $ ttags torig
<li .tag title="#{mconcat [tagName, ": ", tagValue]}">
<div .tag-name>
#{tagName}
<div .tag-value>
#{tagValue}
<ul .postings>
$forall Posting { paccount = acc, pamount = amt } <- tpostings torig
<li .posting>
<div .account>
<a href="@?{acctlink acc}##{tindex torig}" title="#{acc}">
#{elideAccountName 40 acc}
<div .amount style="text-align:right;">
^{mixedAmountAsHtml amt}
$if elem AddPermission perms
^{addModal AddR j today}