Display transaction code in hledger-web

This commit is contained in:
Saku Laesvuori 2026-01-16 12:02:09 +02:00
parent 10c71cb447
commit 961fd71e57
3 changed files with 10 additions and 0 deletions

View File

@ -7,6 +7,8 @@
module Hledger.Web.Handler.JournalR where module Hledger.Web.Handler.JournalR where
import qualified Data.Text as T -- for journal.hamlet
import Hledger import Hledger
import Hledger.Cli.CliOptions import Hledger.Cli.CliOptions
import Hledger.Web.Import import Hledger.Web.Import

View File

@ -227,6 +227,11 @@ ul {
whitespace: nowrap; whitespace: nowrap;
} }
.transaction-code {
font-family: monospace;
color: #888;
}
.col-any-0 { .col-any-0 {
width:0 !important; width:0 !important;
height:0 !important; height:0 !important;

View File

@ -12,6 +12,9 @@ $if elem AddPermission perms
<div .title title="#{showTransaction torig}"> <div .title title="#{showTransaction torig}">
<time .date datetime="#{show (tdate torig)}" nowrap> <time .date datetime="#{show (tdate torig)}" nowrap>
#{show (tdate torig)} #{show (tdate torig)}
$if not $ T.null $ tcode torig
<div .transaction-code>
(#{tcode torig})
<div> <div>
#{textElideRight 60 (tdescription torig)} #{textElideRight 60 (tdescription torig)}