Filter by code by clicking on it
This commit is contained in:
parent
095c87fbaa
commit
3ee25953f4
@ -45,7 +45,9 @@ getJournalR = do
|
|||||||
escape c
|
escape c
|
||||||
| c `elem` (".[$^()|*+?{\\" :: [Char]) = ['\\', c]
|
| c `elem` (".[$^()|*+?{\\" :: [Char]) = ['\\', c]
|
||||||
| otherwise = [c]
|
| otherwise = [c]
|
||||||
addTagQuery name value = (JournalR, [("q", qparam <> " \"tag:" <> escapeRegex name <> (if T.null value then "" else "=" <> escapeRegex value) <> "\"")]) -- XXX:is there no way to escape quotes
|
-- XXX:is there no way to escape quotes in queries
|
||||||
|
addTagQuery name value = (JournalR, [("q", qparam <> " \"tag:" <> escapeRegex name <> (if T.null value then "" else "=" <> escapeRegex value) <> "\"")])
|
||||||
|
addCodeQuery code = (JournalR, [("q", qparam <> " \"code:" <> escapeRegex code <> "\"")])
|
||||||
|
|
||||||
defaultLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "päiväkirja - hledger-web"
|
setTitle "päiväkirja - hledger-web"
|
||||||
|
|||||||
@ -191,11 +191,11 @@ ul {
|
|||||||
max-width: 10em;
|
max-width: 10em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-name a {
|
.tag-name a, .transaction-code a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-name a:hover {
|
.tag-name a:hover, .transaction-code a {
|
||||||
text-decoration: underline dotted;
|
text-decoration: underline dotted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,8 @@ $if elem AddPermission perms
|
|||||||
<div .status-cleared title="Tarkistettu" aria-label="Tarkistettu">
|
<div .status-cleared title="Tarkistettu" aria-label="Tarkistettu">
|
||||||
$if not $ T.null $ tcode torig
|
$if not $ T.null $ tcode torig
|
||||||
<div .transaction-code>
|
<div .transaction-code>
|
||||||
(#{tcode torig})
|
<a href=@?{addCodeQuery $ tcode torig}>
|
||||||
|
(#{tcode torig})
|
||||||
$if not $ T.null $ T.strip payee
|
$if not $ T.null $ T.strip payee
|
||||||
<span .transaction-payee>
|
<span .transaction-payee>
|
||||||
#{payee}
|
#{payee}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user