summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/default-layout.cassius44
-rw-r--r--templates/inventoryListing.hamlet4
-rw-r--r--templates/referenceListing.hamlet17
3 files changed, 47 insertions, 18 deletions
diff --git a/templates/default-layout.cassius b/templates/default-layout.cassius
index 492cde8..c1ccf72 100644
--- a/templates/default-layout.cassius
+++ b/templates/default-layout.cassius
@@ -1,5 +1,8 @@
1.main
2 min-width: 20em
1.table 3.table
2 display: table 4 display: table
5 border-collapse: collapse
3.table div 6.table div
4 vertical-align: middle 7 vertical-align: middle
5.td 8.td
@@ -21,25 +24,32 @@
21 display: table-cell 24 display: table-cell
22 text-align: left 25 text-align: left
23 padding: 0.25em 26 padding: 0.25em
27.kind:only-child
28 text-align: center
24.table .table .td, .table .table .tc, .table .table .th, .table .table .kind 29.table .table .td, .table .table .tc, .table .table .th, .table .table .kind
25 padding: 0 30 padding: 0
26.error 31#messages
27 background-color: #fdd
28 text-align: center
29 color: #c00
30 list-style-type: none 32 list-style-type: none
33 margin: 1em auto 1em 0
34 padding: 0
35 text-align: center
36 font-weight: bold
37 .formError
38 color: #800
39 .printSuccess
40 color: #080
31button 41button
32 width: 6em 42 width: 6em
33 display:inline-text 43 display: inline-block
34.day hr 44.day hr
35 width: 2em 45 width: 2em
36 border: 1px solid #ddd 46 border: 1px solid #ddd
37 border-style: solid none solid none 47 border-style: solid none solid none
38.sepBelow > div, .sepAbove > div 48.sepBelow, .sepAbove
39 border: 2px none #ddd 49 border: 2px none #ddd
40.sepBelow > div 50.sepBelow
41 border-bottom-style: solid 51 border-bottom-style: solid
42.sepAbove > div 52.sepAbove
43 border-top-style: solid 53 border-top-style: solid
44.color:nth-child(even) 54.color:nth-child(even)
45 background-color: #f0f0f0 55 background-color: #f0f0f0
@@ -50,26 +60,28 @@ body > div
50.table > h1 60.table > h1
51 display: table-caption 61 display: table-caption
52nav ul 62nav ul
53 display:block 63 display: block
54 text-align: center 64 text-align: center
65 padding: 0
55 li 66 li
56 display:inline-block 67 display: inline-block
57 font-variant: small-caps 68 font-variant: small-caps
58 font-size: 1.5em 69 font-size: 1.5em
59 font-weight: bold 70 font-weight: bold
60 a 71 a
61 text-decoration:none 72 text-decoration: underline
62 color:#aaa 73 color: #aaa
63 a:hover 74 a:hover
64 color:inherit 75 text-decoration: none
65 li.active 76 li.active
66 a 77 a
67 color:inherit 78 color: inherit
79 text-decoration: none
68 li::before 80 li::before
69 content:" | " 81 content: " | "
70 color: #ddd 82 color: #ddd
71 li:first-child::before 83 li:first-child::before
72 content:"" 84 content: ""
73label.checkbox 85label.checkbox
74 input 86 input
75 vertical-align: middle 87 vertical-align: middle
diff --git a/templates/inventoryListing.hamlet b/templates/inventoryListing.hamlet
index 7c2c06b..be80993 100644
--- a/templates/inventoryListing.hamlet
+++ b/templates/inventoryListing.hamlet
@@ -13,9 +13,9 @@
13 <button type=submit> 13 <button type=submit>
14 Insert 14 Insert
15 $forall Entity itemId Item{..} <- stock 15 $forall Entity itemId Item{..} <- stock
16 $if Just itemId == (preview updateItem =<< formState) 16 $if Just itemId == (preview updateId =<< formState)
17 $with Just UpdateForm{..} <- formState 17 $with Just UpdateForm{..} <- formState
18 <form .tr .color action=@{UpdateItemR fsUpdateItem}##{toPathPiece fsUpdateItem} method=post enctype=#{fsUpdateEncoding} ##{toPathPiece fsUpdateItem}> 18 <form .tr .color action=@{UpdateItemR fsUpdateId}##{toPathPiece fsUpdateId} method=post enctype=#{fsUpdateEncoding} ##{toPathPiece fsUpdateId}>
19 ^{fsUpdateForm} 19 ^{fsUpdateForm}
20 <div .td> 20 <div .td>
21 <button type=submit> 21 <button type=submit>
diff --git a/templates/referenceListing.hamlet b/templates/referenceListing.hamlet
new file mode 100644
index 0000000..b2b294c
--- /dev/null
+++ b/templates/referenceListing.hamlet
@@ -0,0 +1,17 @@
1<div .table>
2 <div .tr .sepBelow>
3 <div .th>Description
4 <div .th>Actions
5 $if isJust (preview insertForm =<< formState)
6 $with Just InsertForm{..} <- formState
7 <form .tr .sepBelow action=@{ReferenceListingR} method=post enctype=#{fsInsertEncoding}>
8 ^{fsInsertForm}
9 <div .td>
10 <button type=submit>
11 Insert
12 $forall Entity referenceId Reference{..} <- reference
13 <div .tr .color ##{toPathPiece referenceId}>
14 <div .kind>#{referenceKind}
15 <form .td method=post action=@{DeleteRefItemR referenceId}>
16 <button type=submit>
17 Delete