summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2018-09-14 23:56:52 +0200
committerSebastian Reichel <sre@ring0.de>2018-09-14 23:56:52 +0200
commit26254ca32ed6d4b2d473579b7d7e1117109e909c (patch)
treeb903151322e66558b9bdaf6a83ecce8d7b45cdc6 /data
parentdcd5305f9cdd68bc858fc7658eb931332f89d4ee (diff)
downloadserial-barcode-scanner-26254ca32ed6d4b2d473579b7d7e1117109e909c.tar.bz2
web: add suppliers section
Diffstat (limited to 'data')
-rw-r--r--data/templates/menu.html2
-rw-r--r--data/templates/suppliers/index.html39
2 files changed, 41 insertions, 0 deletions
diff --git a/data/templates/menu.html b/data/templates/menu.html
index a1a0930..713351d 100644
--- a/data/templates/menu.html
+++ b/data/templates/menu.html
@@ -19,6 +19,8 @@
</ul>
</li>
+ <li class="{{{MENU.suppliers}}}"><a href="/suppliers">Suppliers</a></li>
+
<li class="{{{MENU.aliases}}}"><a href="/aliases">Aliases</a></li>
<li class="{{{MENU.cashbox}}} {{{AUTH_CASHBOX}}}"><a href="/cashbox">Cashbox</a></li>
<!--
diff --git a/data/templates/suppliers/index.html b/data/templates/suppliers/index.html
new file mode 100644
index 0000000..1472720
--- /dev/null
+++ b/data/templates/suppliers/index.html
@@ -0,0 +1,39 @@
+{{{MESSAGE}}}
+
+<table id="suppliertable" class="table table-bordered table-striped table-condensed">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>Name</th>
+ <th>City</th>
+ <th>Postal Code</th>
+ <th>Street</th>
+ <th>Phone</th>
+ <th>Website</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{{DATA}}}
+ </tbody>
+</table>
+
+<div id="newsupplier" style="display: {{{NEWSUPPLIER}}};">
+ <legend>New Supplier</legend>
+ <form method="POST" enctype="multipart/form-data" action="#" class="form-inline">
+ <div class="form-group">
+ <input class="form-control" name="name" type="text" placeholder="Name" />
+ <input class="form-control" name="postal_code" type="number" min="0" placeholder="Postal Code" />
+ <input class="form-control" name="city" type="text" placeholder="City" />
+ <input class="form-control" name="street" type="text" placeholder="Street" />
+ <input class="form-control" name="phone" type="text" placeholder="Phone" />
+ <input class="form-control" name="website" type="text" placeholder="Website" />
+ <button type="submit" class="form-control btn btn-primary"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
+ </div>
+ </form>
+</div>
+
+<script type="text/javascript">
+$(document).ready(function() {
+ $('#suppliertable').DataTable({"lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ] });
+} );
+</script>