diff options
author | Sebastian Reichel <sre@ring0.de> | 2012-10-02 01:05:51 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2012-10-02 01:05:51 +0200 |
commit | 186049b3ed33f025eeb87eb34c19a28e1d5ba70a (patch) | |
tree | 5d892564001404fe979e18eac0e65dfcad65ed5e /templates/products | |
parent | 9713c98dbceb54d8d00c186ba8f41f3a5befcfd1 (diff) | |
download | serial-barcode-scanner-186049b3ed33f025eeb87eb34c19a28e1d5ba70a.tar.bz2 |
restructure code, switch from GTK to Web based UI
- move barcode generation scripts into generation/
- move code to src/
- remove database analysis from invoice/graph
- put database creation sql files into sql/
- remove glade builder file
- add new templates/ directory, which contains files
used by the Web-UI
Diffstat (limited to 'templates/products')
-rw-r--r-- | templates/products/entry.html | 28 | ||||
-rw-r--r-- | templates/products/index.html | 19 | ||||
-rw-r--r-- | templates/products/new.html | 22 | ||||
-rw-r--r-- | templates/products/restock.html | 15 |
4 files changed, 84 insertions, 0 deletions
diff --git a/templates/products/entry.html b/templates/products/entry.html new file mode 100644 index 0000000..e6f4f38 --- /dev/null +++ b/templates/products/entry.html @@ -0,0 +1,28 @@ +<h2>Product Information</h2> +<p> + <table class="table table-bordered table-nonfluid"> + <th>EAN</th><td>{{{EAN}}}</td></tr> + <th>Name</th><td>{{{NAME}}}</td></tr> + <th>Amount</th><td>{{{AMOUNT}}}</td></tr> + </table> +</p></p> + +<h2>Price History</h2> +<table class="table table-bordered table-nonfluid"> + <tr><th>Valid Since</th><th>Memberprice</th><th>Guestprice</th></tr> + {{{PRICES}}} +</table> + +<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}}};"> + <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" /> + <button type="submit" class="btn btn-primary"><i class="icon-plus"></i></button> + </form> +</div> diff --git a/templates/products/index.html b/templates/products/index.html new file mode 100644 index 0000000..bd4e0e9 --- /dev/null +++ b/templates/products/index.html @@ -0,0 +1,19 @@ +<table class="sortable table table-bordered table-striped table-condensed"> + <thead> + <tr><th>EAN</th></th><th>Name</th><th>Amount</th><th>Memberprice</th><th>Guestprice</th></tr> + </thead> + <tbody> + {{{DATA}}} + </tbody> +</table> + +<div id="newproduct" style="display: {{{NEWPRODUCT}}};"> + <form action="/products/new" class="form-horizontal"> + <legend>New Product</legend> + <input class="input-medium" name="id" type="number" min="0" placeholder="EAN" /> + <input class="input-medium" name="name" type="text" placeholder="Name" /> + <input class="input-medium" name="memberprice" type="number" placeholder="Memberprice" /> + <input class="input-medium" name="guestprice" type="number" placeholder="Guestprice" /> + <button type="submit" class="btn btn-primary"><i class="icon-plus"></i></button> + </form> +</div> diff --git a/templates/products/new.html b/templates/products/new.html new file mode 100644 index 0000000..e38bd7b --- /dev/null +++ b/templates/products/new.html @@ -0,0 +1,22 @@ +<h2>Add new product: {{{NAME}}}</h2> + +<div id="new-successful" class="alert alert-success" style="display: {{{NEW.OK}}};"> + <p>Successfully created new item:</p> + + <table class="table"> + <tr><th>Name</th><td>{{{NAME}}}</td></tr> + <tr><th>EAN</th><td>{{{EAN}}}</td></tr> + <tr><th>Memberprice</th><td>{{{MEMBERPRICE}}}</td></tr> + <tr><th>Guestprice</th><td>{{{GUESTPRICE}}}</td></tr> + </table> +</div> + +<div id="new-failed" class="alert alert-error" style="display: {{{NEW.FAIL}}};"> + <h4>Error</h4> + Creating new product failed. Please make sure you + have sufficient permissions and gave valid values + for name, EAN, memberprice and guestprice. +</div> + +<a href="{{{EAN}}}" style="display: {{{NEW.OK}}}">Go to {{{NAME}}}</a><br style="display: {{{NEW.OK}}}"> +<a href=".">Back to product list</a> diff --git a/templates/products/restock.html b/templates/products/restock.html new file mode 100644 index 0000000..c314b29 --- /dev/null +++ b/templates/products/restock.html @@ -0,0 +1,15 @@ +<h2>Restock: {{{NAME}}}</h2> + +<div id="restock-successful" class="alert alert-success" style="display: {{{RESTOCK.OK}}};"> + Successfully restocked <b>{{{AMOUNT}}}</b> items of + product <b>{{{NAME}}}</b>. Price per item: <b>{{{PRICE}}}</b>. +</div> + +<div id="restock-failed" class="alert alert-error" style="display: {{{RESTOCK.FAIL}}};"> + <h4>Error</h4> + Restocking <b>{{{NAME}}}</b> failed. Please make sure you + have sufficient permissions and gave valid values + for amount and price. +</div> + +<a href=".">Back to {{{NAME}}}</a> |