mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-14 02:14:14 +03:00
web: fix journal/register links with --base-url (#235)
This commit is contained in:
parent
2c3f1b672e
commit
df4b43a2b3
@ -3,6 +3,7 @@
|
||||
|
||||
module Handler.JournalR where
|
||||
|
||||
import Data.Text (pack)
|
||||
import Import
|
||||
|
||||
import Handler.AddForm
|
||||
@ -71,7 +72,7 @@ $forall p' <- tpostings t
|
||||
<td.description>
|
||||
<td.account>
|
||||
|
||||
<a href="/register?q=inacct:'#{paccount p'}'##{date}" title="#{paccount p'}">#{elideAccountName 40 $ paccount p'}
|
||||
<a href="@?{acctlink (paccount p')}##{date}" title="#{paccount p'}">#{elideAccountName 40 $ paccount p'}
|
||||
<td.amount style="text-align:right;">#{mixedAmountAsHtml $ pamount p'}
|
||||
<tr.#{evenodd}>
|
||||
<td>
|
||||
@ -80,6 +81,7 @@ $forall p' <- tpostings t
|
||||
<td>
|
||||
|]
|
||||
where
|
||||
acctlink a = (RegisterR, [("q", pack $ accountQuery a)])
|
||||
evenodd = if even n then "even" else "odd" :: String
|
||||
-- datetransition | newm = "newmonth"
|
||||
-- | newd = "newday"
|
||||
|
@ -74,7 +74,7 @@ registerItemsHtml _ vd (balancelabel,items) = [hamlet|
|
||||
itemAsHtml VD{..} (n, newd, newm, _, (torig, tacct, split, acct, amt, bal)) = [hamlet|
|
||||
|
||||
<tr ##{date} .item.#{evenodd}.#{firstposting}.#{datetransition} title="#{show torig}" style="vertical-align:top;">
|
||||
<td.date><a href="/journal##{date}">#{date}
|
||||
<td.date><a href="@{JournalR}##{date}">#{date}
|
||||
<td.description title="#{show torig}">#{elideRight 30 desc}
|
||||
<td.account>#{elideRight 40 acct}
|
||||
<td.amount style="text-align:right; white-space:nowrap;">
|
||||
|
Loading…
Reference in New Issue
Block a user