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