diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-28 14:56:52 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-28 14:56:52 +0200 |
commit | d28c483bdba02cf4163e99efcb07f2ee525ddda1 (patch) | |
tree | f9becdc79bcb6495e462ec2f17762a63182dbc2a /templates/inventoryList.hamlet | |
parent | de1513a40da72632b500c710c5254c8e3639b7bd (diff) | |
download | bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.tar bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.tar.gz bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.tar.bz2 bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.tar.xz bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.zip |
Implement list view
Diffstat (limited to 'templates/inventoryList.hamlet')
-rw-r--r-- | templates/inventoryList.hamlet | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/templates/inventoryList.hamlet b/templates/inventoryList.hamlet new file mode 100644 index 0000000..9bf48f1 --- /dev/null +++ b/templates/inventoryList.hamlet | |||
@@ -0,0 +1,33 @@ | |||
1 | <ul> | ||
2 | $forall WithType (Entity itemId Item{..}) itemType <- stock | ||
3 | <li .color> | ||
4 | <div .kindType> | ||
5 | <span .kind>#{itemKind} | ||
6 | <span .type>#{itemType} | ||
7 | <ul .info> | ||
8 | $case itemBought | ||
9 | $of DateKnown d | ||
10 | <li> | ||
11 | <div> | ||
12 | <div>Bought | ||
13 | <div>#{dayFormat d} | ||
14 | $of _ | ||
15 | $case itemExpires | ||
16 | $of DateKnown d | ||
17 | <li> | ||
18 | <div> | ||
19 | <div>Expires | ||
20 | <div :d < today:.expired :d < addDays 7 today:.expireWeek :d < addGregorianMonthsRollOver 1 today:.expireMonth> | ||
21 | #{dayFormat d} | ||
22 | $of _ | ||
23 | $case itemOpened | ||
24 | $of DateKnown d | ||
25 | <li> | ||
26 | <div> | ||
27 | <div>Opened | ||
28 | <div>#{dayFormat d} | ||
29 | $of DateUnknown | ||
30 | <li .content>Open | ||
31 | $of _ | ||
32 | $if itemRunningLow | ||
33 | <li .content>Running low | ||