mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-29 13:22:27 +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
|
module Handler.JournalR where
|
||||||
|
|
||||||
|
import Data.Text (pack)
|
||||||
import Import
|
import Import
|
||||||
|
|
||||||
import Handler.AddForm
|
import Handler.AddForm
|
||||||
@ -71,7 +72,7 @@ $forall p' <- tpostings t
|
|||||||
<td.description>
|
<td.description>
|
||||||
<td.account>
|
<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'}
|
<td.amount style="text-align:right;">#{mixedAmountAsHtml $ pamount p'}
|
||||||
<tr.#{evenodd}>
|
<tr.#{evenodd}>
|
||||||
<td>
|
<td>
|
||||||
@ -80,6 +81,7 @@ $forall p' <- tpostings t
|
|||||||
<td>
|
<td>
|
||||||
|]
|
|]
|
||||||
where
|
where
|
||||||
|
acctlink a = (RegisterR, [("q", pack $ accountQuery a)])
|
||||||
evenodd = if even n then "even" else "odd" :: String
|
evenodd = if even n then "even" else "odd" :: String
|
||||||
-- datetransition | newm = "newmonth"
|
-- datetransition | newm = "newmonth"
|
||||||
-- | newd = "newday"
|
-- | newd = "newday"
|
||||||
|
@ -74,7 +74,7 @@ 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 ##{date} .item.#{evenodd}.#{firstposting}.#{datetransition} title="#{show torig}" style="vertical-align:top;">
|
<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.description title="#{show torig}">#{elideRight 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;">
|
||||||
|
Loading…
Reference in New Issue
Block a user