diff options
Diffstat (limited to 'templates/inventoryListing.hamlet')
-rw-r--r-- | templates/inventoryListing.hamlet | 32 |
1 files changed, 23 insertions, 9 deletions
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 | ||