diff options
Diffstat (limited to 'templates/products')
-rw-r--r-- | templates/products/bestbefore.html | 8 | ||||
-rw-r--r-- | templates/products/entry.html | 89 | ||||
-rw-r--r-- | templates/products/index.html | 22 | ||||
-rw-r--r-- | templates/products/inventory.html | 49 | ||||
-rw-r--r-- | templates/products/new.html | 22 | ||||
-rw-r--r-- | templates/products/newprice.html | 18 | ||||
-rw-r--r-- | templates/products/restock.html | 22 |
7 files changed, 0 insertions, 230 deletions
diff --git a/templates/products/bestbefore.html b/templates/products/bestbefore.html deleted file mode 100644 index dbc7f47..0000000 --- a/templates/products/bestbefore.html +++ /dev/null @@ -1,8 +0,0 @@ -<table class="sortable table table-bordered table-striped table-condensed"> - <thead> - <tr><th>EAN</th></th><th>Name</th><th>Amount</th><th>Best Before Date</th></tr> - </thead> - <tbody> - {{{DATA}}} - </tbody> -</table> diff --git a/templates/products/entry.html b/templates/products/entry.html deleted file mode 100644 index b5b57e0..0000000 --- a/templates/products/entry.html +++ /dev/null @@ -1,89 +0,0 @@ -<h2>Product Information</h2> -<p> - <table class="table table-bordered table-nonfluid"> - <tr><th>EAN</th><td>{{{EAN}}}</td></tr> - <tr><th>Name</th><td>{{{NAME}}}</td></tr> - <tr><th>Category</th><td>{{{CATEGORY}}}</td></tr> - <tr><th>Amount</th><td>{{{AMOUNT}}}</td></tr> - <tr><th>State</th><td><button id="statebutton" type="button" class="btn {{{BTNSTATE}}}" {{{ISADMIN2}}}>{{{STATE}}}</button></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> - -<div id="new_price" style="display: {{{ISADMIN}}};"> - <form action="/products/{{{EAN}}}/newprice" class="form-horizontal"> - <input class="input-small" name="member" type="number" step="0.01" min="0.01" placeholder="Member" /> - <input class="input-small" name="guest" type="number" step="0.10" min="0.10" 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><th>Supplier</th><th>Best before Date</th></tr> - {{{RESTOCKS}}} -</table> - -<div id="restock" style="display: {{{ISADMIN}}};"> - - <form action="/products/{{{EAN}}}/restock" class="form-horizontal"> - <div class="control-group"> - <label class="control-label">Amount</label> - <div class="controls"> - <input name="amount" type="number" min="1" placeholder="Amount" /> - </div> - </div> - <div class="control-group"> - <label class="control-label">Price per Piece</label> - <div class="controls"> - <input name="price" type="number" step="0.01" min="0.00" placeholder="Price" /> - </div> - </div> - <div class="control-group"> - <label class="control-label">Suppplier</label> - <div class="controls"> - <select name="supplier"> - {{{SUPPLIERS}}} - </select> - </div> - </div> - <div class="control-group"> - <label class="control-label">Best Before Date</label> - <div class="controls"> - <input name="best_before_date" type="date" /> - </div> - </div> - <div class="control-group"> - <div class="controls"> - <button type="submit" class="btn btn-primary"><i class="icon-plus"></i> Restock</button> - </div> - </div> - </form> -</div> - -<script> -$('#statebutton').on('click', function (e) { - var req = $.getJSON( - "/products/{{{EAN}}}/togglestate", - function( data ) { - if(data["state"] == "deprecated") { - $('#statebutton').html("Deprecated") - $('#statebutton').addClass("btn-danger") - $('#statebutton').removeClass("btn-success") - } else if(data["state"] == "active") { - $('#statebutton').html("Active") - $('#statebutton').addClass("btn-success") - $('#statebutton').removeClass("btn-danger") - } else { - console.error("unknown state") - console.info(data) - } - } - ); -}); -</script> diff --git a/templates/products/index.html b/templates/products/index.html deleted file mode 100644 index 668a44e..0000000 --- a/templates/products/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<table class="sortable table table-bordered table-striped table-condensed"> - <thead> - <tr><th>EAN</th><th>Name</th><th>Category</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" /> - <select name="category" title="Category"> - {{{CATEGORIES}}} - </select> - <input class="input-medium" name="memberprice" type="number" step="0.01" min="0.01" placeholder="Memberprice" /> - <input class="input-medium" name="guestprice" type="number" step="0.01" min="0.01" placeholder="Guestprice" /> - <button type="submit" class="btn btn-primary"><i class="icon-plus"></i></button> - </form> -</div> diff --git a/templates/products/inventory.html b/templates/products/inventory.html deleted file mode 100644 index ede1aea..0000000 --- a/templates/products/inventory.html +++ /dev/null @@ -1,49 +0,0 @@ -<h1>Inventory <small>Thanks that you do it! </small></h1> - -<div class="{{{SUCESS_HIDDEN}}} alert alert-success"> - <strong>Success!</strong> Every change was added. Thank you! -</div> - -<div class="alert alert-info"> - <strong>Tip!</strong> You can download an inventory PDF to collect the data offline. - <a href="/products/inventory-pdf" target="_blank" class="btn btn-primaryn">Only products with amount > 0</a> - <a href="/products/inventory-pdf?all=1" target="_blank" class="btn btn-primaryn">All products</a> -</div> - -<form action="/products/inventory" method="POST" class="form form-horizontal"> - <div class="{{{RESTOCK_HIDDEN}}} control-group"> - <label class="control-label">Select the supplier for the restock action.</label> - <div class="controls"> - <select name="supplierId"> - {{{SUPPLIERS}}} - </select> - </div> - </div> - <div class="{{{RESTOCK_HIDDEN}}} control-group"> - <label class="control-label">Select the Shop User for loss transaction.</label> - <div class="controls"> - <select name="userId"> - {{{USERS}}} - </select> - </div> - </div> - <table class="sortable table table-bordered table-striped table-condensed"> - <thead> - <tr> - <th>EAN</th> - <th>Name</th> - <th>Category</th> - <th>Expected Amount</th> - <th>Real Amount</th> - </tr> - </thead> - <tbody> - {{{DATA}}} - </tbody> - </table> - - <div class="pull-right"> - {{{ACTION}}} - </div> - -</form>
\ No newline at end of file diff --git a/templates/products/new.html b/templates/products/new.html deleted file mode 100644 index e38bd7b..0000000 --- a/templates/products/new.html +++ /dev/null @@ -1,22 +0,0 @@ -<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/newprice.html b/templates/products/newprice.html deleted file mode 100644 index c46d439..0000000 --- a/templates/products/newprice.html +++ /dev/null @@ -1,18 +0,0 @@ -<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> diff --git a/templates/products/restock.html b/templates/products/restock.html deleted file mode 100644 index 70926c5..0000000 --- a/templates/products/restock.html +++ /dev/null @@ -1,22 +0,0 @@ -<h2>Restock: {{{NAME}}}</h2> - -<div id="restock-successful" class="alert" style="display: {{{RESTOCK.OK}}};"> - <p>Successfully restocked:</p> - - <table class="table table-hover"> - <tr><th>Name</th><td>{{{NAME}}}</td></tr> - <tr><th>Amount</th><td>{{{AMOUNT}}}</td></tr> - <tr><th>Price</th><td>{{{PRICE}}}</td></tr> - <tr><th>Supplier</th><td>{{{SUPPLIER}}}</td></tr> - <tr><th>Best Before Date</th><td>{{{BESTBEFORE}}}</td></tr> - </table> -</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> |