summaryrefslogtreecommitdiff
path: root/templates/products.pt
diff options
context:
space:
mode:
Diffstat (limited to 'templates/products.pt')
-rw-r--r--templates/products.pt25
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/products.pt b/templates/products.pt
new file mode 100644
index 0000000..16cb19c
--- /dev/null
+++ b/templates/products.pt
@@ -0,0 +1,25 @@
1<title>Products List</title>
2<html>
3 <h1>Products</h1>
4 <table>
5 <tr><th>Name</th><th span="2">Type</th><th>Price</th><th>Purchase</th></tr>
6 <tr tal:repeat="item products">
7 <td><a href="/product/${products[item].name}">${products[item].name}</a></td>
8 <td>${products[item].type}</td>
9 <td>${products[item].price}</td>
10 <td><form action="/purchaseNew">
11 <input type="hidden" name="product" value="${products[item].name}" />
12 <select name="customer">
13 <option tal:repeat="cust customers" value="${customers[cust].name}">${customers[cust].name}</option>
14 </select>
15 <input type="submit" value="Buy" />
16 </form></td>
17 </tr>
18 <tr><form action="/productNew">
19 <td><input type="text" name="name" /></td>
20 <td><input type="text" name="type" /></td>
21 <td><input type="number" name="price" value="5" /></td>
22 <td><input type="submit" value="Add"/></td>
23 </form></tr>
24 </table>
25</html>