summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-15 14:47:31 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-15 14:47:31 +0100
commitfe5cd6ad6c61eb13ca99acd1b69cd09b84051404 (patch)
tree4afc8cb5ae4171047d6af17082fb74d49c726abe /templates
parent668961c90368b55a3409ae93b96e288f8ebe33a4 (diff)
downloadbar-fe5cd6ad6c61eb13ca99acd1b69cd09b84051404.tar
bar-fe5cd6ad6c61eb13ca99acd1b69cd09b84051404.tar.gz
bar-fe5cd6ad6c61eb13ca99acd1b69cd09b84051404.tar.bz2
bar-fe5cd6ad6c61eb13ca99acd1b69cd09b84051404.tar.xz
bar-fe5cd6ad6c61eb13ca99acd1b69cd09b84051404.zip
Support types
Diffstat (limited to 'templates')
-rw-r--r--templates/default-layout.cassius19
-rw-r--r--templates/inventoryListing.hamlet4
-rw-r--r--templates/referenceListing.hamlet4
3 files changed, 19 insertions, 8 deletions
diff --git a/templates/default-layout.cassius b/templates/default-layout.cassius
index c1ccf72..bd76a01 100644
--- a/templates/default-layout.cassius
+++ b/templates/default-layout.cassius
@@ -1,20 +1,20 @@
1.main 1.main
2 min-width: 20em 2 min-width: 20em
3.table 3.table, table
4 display: table 4 display: table
5 border-collapse: collapse 5 border-collapse: collapse
6.table div 6.table div, table td
7 vertical-align: middle 7 vertical-align: middle
8.td 8.td, td
9 display: table-cell 9 display: table-cell
10 text-align: center 10 text-align: center
11 padding: 0.25em 11 padding: 0.25em
12.tr 12.tr, tr
13 display: table-row 13 display: table-row
14.tc 14.tc
15 display: table-caption 15 display: table-caption
16 padding: 0.25em 16 padding: 0.25em
17.th 17.th, th
18 display: table-cell 18 display: table-cell
19 font-variant: small-caps 19 font-variant: small-caps
20 font-weight: bold 20 font-weight: bold
@@ -26,8 +26,15 @@
26 padding: 0.25em 26 padding: 0.25em
27.kind:only-child 27.kind:only-child
28 text-align: center 28 text-align: center
29.type
30 display: table-cell
31 text-align: center
32 padding: 0.25em
33 color: #aaa
29.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
30 padding: 0 35 padding: 0
36table table td, table table th
37 padding: 0
31#messages 38#messages
32 list-style-type: none 39 list-style-type: none
33 margin: 1em auto 1em 0 40 margin: 1em auto 1em 0
@@ -55,7 +62,7 @@ button
55 background-color: #f0f0f0 62 background-color: #f0f0f0
56.color:nth-child(odd) 63.color:nth-child(odd)
57 background-color: #fff 64 background-color: #fff
58body > div 65body > div, body > table
59 margin: 0 auto 66 margin: 0 auto
60.table > h1 67.table > h1
61 display: table-caption 68 display: table-caption
diff --git a/templates/inventoryListing.hamlet b/templates/inventoryListing.hamlet
index 775176d..3be43db 100644
--- a/templates/inventoryListing.hamlet
+++ b/templates/inventoryListing.hamlet
@@ -1,6 +1,7 @@
1<div .table> 1<div .table>
2 <div .tr .sepBelow> 2 <div .tr .sepBelow>
3 <div .th>Item 3 <div .th>Item
4 <div .th>Type
4 <div .th>Bought 5 <div .th>Bought
5 <div .th>Expires 6 <div .th>Expires
6 <div .th>Opened 7 <div .th>Opened
@@ -12,7 +13,7 @@
12 <div .td> 13 <div .td>
13 <button type=submit> 14 <button type=submit>
14 Insert 15 Insert
15 $forall Entity itemId Item{..} <- stock 16 $forall WithType (Entity itemId Item{..}) itemType <- stock
16 $if Just itemId == (preview updateId =<< formState) 17 $if Just itemId == (preview updateId =<< formState)
17 $with Just UpdateForm{..} <- formState 18 $with Just UpdateForm{..} <- formState
18 <form .tr .color action=@{UpdateItemR fsUpdateId}##{toPathPiece fsUpdateId} method=post enctype=#{fsUpdateEncoding} ##{toPathPiece fsUpdateId}> 19 <form .tr .color action=@{UpdateItemR fsUpdateId}##{toPathPiece fsUpdateId} method=post enctype=#{fsUpdateEncoding} ##{toPathPiece fsUpdateId}>
@@ -23,6 +24,7 @@
23 $else 24 $else
24 <div .tr .color ##{toPathPiece itemId}> 25 <div .tr .color ##{toPathPiece itemId}>
25 <div .kind>#{itemKind} 26 <div .kind>#{itemKind}
27 <div .type>#{itemType}
26 <div .td .day> 28 <div .td .day>
27 $maybe bought <- itemBought 29 $maybe bought <- itemBought
28 #{dayFormat bought} 30 #{dayFormat bought}
diff --git a/templates/referenceListing.hamlet b/templates/referenceListing.hamlet
index a76e603..414a3ec 100644
--- a/templates/referenceListing.hamlet
+++ b/templates/referenceListing.hamlet
@@ -1,6 +1,7 @@
1<div .table> 1<div .table>
2 <div .tr .sepBelow> 2 <div .tr .sepBelow>
3 <div .th>Item 3 <div .th>Item
4 <div .th>Type
4 <div .th>Actions 5 <div .th>Actions
5 $if isJust (preview insertForm =<< formState) 6 $if isJust (preview insertForm =<< formState)
6 $with Just InsertForm{..} <- formState 7 $with Just InsertForm{..} <- formState
@@ -9,9 +10,10 @@
9 <div .td> 10 <div .td>
10 <button type=submit> 11 <button type=submit>
11 Insert 12 Insert
12 $forall Entity referenceId Reference{..} <- reference 13 $forall WithType (Entity referenceId Reference{..}) referenceType <- reference
13 <div .tr .color ##{toPathPiece referenceId}> 14 <div .tr .color ##{toPathPiece referenceId}>
14 <div .kind>#{referenceKind} 15 <div .kind>#{referenceKind}
16 <div .type>#{referenceType}
15 <form .td method=post action=@{DeleteRefItemR referenceId}> 17 <form .td method=post action=@{DeleteRefItemR referenceId}>
16 <button type=submit> 18 <button type=submit>
17 Delete 19 Delete