summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-11-04 09:39:08 +0100
committerSebastian Reichel <sre@ring0.de>2012-11-04 09:39:08 +0100
commit25f1132d4f004211adf39e3f373ec0498c0d0fc7 (patch)
treead1b4e1c34abb59393325aed4ec952aabf26f16f /templates
parent5be3749d4690220b7b12acde68e4de984dd8ebdf (diff)
downloadserial-barcode-scanner-25f1132d4f004211adf39e3f373ec0498c0d0fc7.tar.bz2
Web: add option for adding new selling price info
Diffstat (limited to 'templates')
-rw-r--r--templates/products/entry.html10
-rw-r--r--templates/products/newprice.html18
2 files changed, 27 insertions, 1 deletions
diff --git a/templates/products/entry.html b/templates/products/entry.html
index e6f4f38..2b3969a 100644
--- a/templates/products/entry.html
+++ b/templates/products/entry.html
@@ -13,13 +13,21 @@
{{{PRICES}}}
</table>
+<div id="new_price" style="display: {{{ISADMIN}}};">
+ <form action="/products/{{{EAN}}}/newprice" class="form-horizontal">
+ <input class="input-small" name="member" type="number" min="1" placeholder="Member" />
+ <input class="input-small" name="guest" type="number" min="1" placeholder="Guest" />
+ <button type="submit" class="btn btn-primary">Add new Prices</button>
+ </form>
+</div>
+
<h2>Restock</h2>
<table class="table table-bordered table-nonfluid">
<tr><th>Date</th><th>Amount</th><th>Unit Price</th></tr>
{{{RESTOCKS}}}
</table>
-<div id="restock" style="display: {{{RESTOCK}}};">
+<div id="restock" style="display: {{{ISADMIN}}};">
<form action="/products/{{{EAN}}}/restock" class="form-horizontal">
<input class="input-small" name="amount" type="number" min="1" placeholder="Amount" />
<input class="input-small" name="price" type="number" min="1" placeholder="Price" />
diff --git a/templates/products/newprice.html b/templates/products/newprice.html
new file mode 100644
index 0000000..c46d439
--- /dev/null
+++ b/templates/products/newprice.html
@@ -0,0 +1,18 @@
+<h2>Restock: {{{NAME}}}</h2>
+
+<div id="newprice-successful" class="alert alert-success" style="display: {{{NEWPRICE.OK}}};">
+ Successfully added new prices to <b>{{{NAME}}}</b>. New prices valid from now on:
+ <ul>
+ <li>Member: {{{MEMBER}}}€</li>
+ <li>Guest: {{{GUEST}}}€</li>
+ </ul>
+</div>
+
+<div id="newprice-failed" class="alert alert-error" style="display: {{{NEWPRICE.FAIL}}};">
+ <h4>Error</h4>
+ Adding new price for <b>{{{NAME}}}</b> failed. Please make sure you
+ have sufficient permissions and gave valid prices for members and
+ guests.
+</div>
+
+<a href=".">Back to {{{NAME}}}</a>