diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/default-layout.cassius | 4 | ||||
| -rw-r--r-- | templates/inventoryListing.cassius | 4 | ||||
| -rw-r--r-- | templates/inventoryListing.hamlet | 32 |
3 files changed, 28 insertions, 12 deletions
diff --git a/templates/default-layout.cassius b/templates/default-layout.cassius index c622901..31389d8 100644 --- a/templates/default-layout.cassius +++ b/templates/default-layout.cassius | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .main | 1 | main |
| 2 | min-width: 20em | 2 | min-width: 20em |
| 3 | .table, table | 3 | .table, table |
| 4 | display: table | 4 | display: table |
| @@ -62,7 +62,7 @@ table table td, table table th, .table table td, .table table th | |||
| 62 | li:first-child::before | 62 | li:first-child::before |
| 63 | content: "" | 63 | content: "" |
| 64 | button | 64 | button |
| 65 | width: 6em | 65 | width: 8em |
| 66 | display: inline-block | 66 | display: inline-block |
| 67 | .sepBelow, .sepAbove | 67 | .sepBelow, .sepAbove |
| 68 | border: 2px none #ddd | 68 | border: 2px none #ddd |
diff --git a/templates/inventoryListing.cassius b/templates/inventoryListing.cassius index 5116667..dc01471 100644 --- a/templates/inventoryListing.cassius +++ b/templates/inventoryListing.cassius | |||
| @@ -26,4 +26,6 @@ div.itemId | |||
| 26 | padding: 0 | 26 | padding: 0 |
| 27 | margin: 0 | 27 | margin: 0 |
| 28 | input | 28 | input |
| 29 | vertical-align: middle \ No newline at end of file | 29 | vertical-align: middle |
| 30 | .actions .td | ||
| 31 | width: 8em \ No newline at end of file | ||
diff --git a/templates/inventoryListing.hamlet b/templates/inventoryListing.hamlet index cc1c9ce..8eee3e7 100644 --- a/templates/inventoryListing.hamlet +++ b/templates/inventoryListing.hamlet | |||
| @@ -36,12 +36,14 @@ | |||
| 36 | <hr> | 36 | <hr> |
| 37 | $of DateKnown d | 37 | $of DateKnown d |
| 38 | #{dayFormat d} | 38 | #{dayFormat d} |
| 39 | $of DateNever | ||
| 39 | <div .td .day> | 40 | <div .td .day> |
| 40 | $case itemExpires | 41 | $case itemExpires |
| 41 | $of DateNever | 42 | $of DateNever |
| 42 | <hr> | 43 | <hr> |
| 43 | $of DateKnown d | 44 | $of DateKnown d |
| 44 | <span :d < today:.expired :d < addDays 7 today:.expireWeek :d < addGregorianMonthsRollOver 1 today:.expireMonth>#{dayFormat d} | 45 | <span :d < today:.expired :d < addDays 7 today:.expireWeek :d < addGregorianMonthsRollOver 1 today:.expireMonth>#{dayFormat d} |
| 46 | $of DateUnknown | ||
| 45 | <div .td .day> | 47 | <div .td .day> |
| 46 | $case itemOpened | 48 | $case itemOpened |
| 47 | $of DateKnown d | 49 | $of DateKnown d |
| @@ -49,17 +51,29 @@ | |||
| 49 | $of DateUnknown | 51 | $of DateUnknown |
| 50 | Yes | 52 | Yes |
| 51 | $of DateNever | 53 | $of DateNever |
| 52 | <form method=post action=@{OpenItemR itemId}> | ||
| 53 | <button type=submit> | ||
| 54 | Open | ||
| 55 | <div .td> | 54 | <div .td> |
| 56 | <ul .status> | 55 | <ul .status> |
| 57 | $if itemRunningLow | 56 | $if itemRunningLow |
| 58 | <li>Running low | 57 | <li>Running low |
| 59 | <div .td> | 58 | <div .td> |
| 60 | <form method=get action=@{UpdateItemR itemId}##{toPathPiece itemId}> | 59 | <div .table .actions> |
| 61 | <button type=submit> | 60 | <div .tr> |
| 62 | Edit | 61 | $if isNever itemOpened |
| 63 | <form method=post action=@{DeleteItemR itemId}> | 62 | <form method=post action=@{OpenItemR itemId}> |
| 64 | <button type=submit> | 63 | <button type=submit> |
| 65 | Delete | 64 | Open |
| 65 | $else | ||
| 66 | <div .td> | ||
| 67 | <form method=get action=@{UpdateItemR itemId}##{toPathPiece itemId} .td> | ||
| 68 | <button type=submit> | ||
| 69 | Edit | ||
| 70 | <div .tr> | ||
| 71 | $if not itemRunningLow | ||
| 72 | <form method=post action=@{LowItemR itemId} .td> | ||
| 73 | <button type=submit> | ||
| 74 | Running low | ||
| 75 | $else | ||
| 76 | <div .td> | ||
| 77 | <form method=post action=@{DeleteItemR itemId} .td> | ||
| 78 | <button type=submit> | ||
| 79 | Delete | ||
