diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-16 01:19:07 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-16 01:19:07 +0100 |
commit | 3bfe0bdcb79b398a387e202c5150b5e6fd230d3a (patch) | |
tree | 8384b49048e84969a3a3440ed309b9c6e6b779de /templates | |
parent | 3ed9ec8ca70afb556f75d4e087043f4c67f50974 (diff) | |
download | bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.tar bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.tar.gz bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.tar.bz2 bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.tar.xz bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.zip |
More complicated date handling
Diffstat (limited to 'templates')
-rw-r--r-- | templates/default-layout.cassius | 2 | ||||
-rw-r--r-- | templates/inventoryListing.cassius | 3 | ||||
-rw-r--r-- | templates/inventoryListing.hamlet | 33 |
3 files changed, 23 insertions, 15 deletions
diff --git a/templates/default-layout.cassius b/templates/default-layout.cassius index bd76a01..50aab3f 100644 --- a/templates/default-layout.cassius +++ b/templates/default-layout.cassius | |||
@@ -33,7 +33,7 @@ | |||
33 | color: #aaa | 33 | color: #aaa |
34 | .table .table .td, .table .table .tc, .table .table .th, .table .table .kind | 34 | .table .table .td, .table .table .tc, .table .table .th, .table .table .kind |
35 | padding: 0 | 35 | padding: 0 |
36 | table table td, table table th | 36 | table table td, table table th, .table table td, .table table th |
37 | padding: 0 | 37 | padding: 0 |
38 | #messages | 38 | #messages |
39 | list-style-type: none | 39 | list-style-type: none |
diff --git a/templates/inventoryListing.cassius b/templates/inventoryListing.cassius new file mode 100644 index 0000000..9a7459e --- /dev/null +++ b/templates/inventoryListing.cassius | |||
@@ -0,0 +1,3 @@ | |||
1 | .expired | ||
2 | color: #800 | ||
3 | font-weight: bold \ No newline at end of file | ||
diff --git a/templates/inventoryListing.hamlet b/templates/inventoryListing.hamlet index 3be43db..39758bb 100644 --- a/templates/inventoryListing.hamlet +++ b/templates/inventoryListing.hamlet | |||
@@ -26,22 +26,27 @@ | |||
26 | <div .kind>#{itemKind} | 26 | <div .kind>#{itemKind} |
27 | <div .type>#{itemType} | 27 | <div .type>#{itemType} |
28 | <div .td .day> | 28 | <div .td .day> |
29 | $maybe bought <- itemBought | 29 | $case itemBought |
30 | #{dayFormat bought} | 30 | $of DateUnknown |
31 | $nothing | 31 | <hr> |
32 | <hr> | 32 | $of DateKnown d |
33 | #{dayFormat d} | ||
33 | <div .td .day> | 34 | <div .td .day> |
34 | $maybe expires <- itemExpires | 35 | $case itemExpires |
35 | #{dayFormat expires} | 36 | $of DateNever |
36 | $nothing | 37 | <hr> |
37 | <hr> | 38 | $of DateKnown d |
39 | <span :d < today:.expired>#{dayFormat d} | ||
38 | <div .td .day> | 40 | <div .td .day> |
39 | $maybe opened <- itemOpened | 41 | $case itemOpened |
40 | #{dayFormat opened} | 42 | $of DateKnown d |
41 | $nothing | 43 | #{dayFormat d} |
42 | <form method=post action=@{OpenItemR itemId}> | 44 | $of DateUnknown |
43 | <button type=submit> | 45 | Yes |
44 | Open | 46 | $of DateNever |
47 | <form method=post action=@{OpenItemR itemId}> | ||
48 | <button type=submit> | ||
49 | Open | ||
45 | <div .td> | 50 | <div .td> |
46 | <form method=get action=@{UpdateItemR itemId}##{toPathPiece itemId}> | 51 | <form method=get action=@{UpdateItemR itemId}##{toPathPiece itemId}> |
47 | <button type=submit> | 52 | <button type=submit> |