View raw

1 {# -*- mode: web; -*- #} 2 3 {% extends "base.html" %} 4 {% block title %} 5 Products 6 {% endblock %} 7 8 {% block actions %} 9 <li><a href="{{ url_for('common.add_item', module='products', table='Product') }}" class="button">Add product</a></li> 10 {% endblock %} 11 12 {% block content %} 13 14 <i>Track products you sell here.</i> 15 16 <table> 17 <thead> 18 <tr> 19 <th colspan=2><i>Actions</i></th> 20 <th>ID</th> 21 <th>Name</th> 22 <th>Price (net)</th> 23 <th>Price (gross)</th> 24 <th>Updated</th> 25 </tr> 26 </thead> 27 <tbody> 28 {% for product in products %} 29 <tr> 30 <td> 31 <form method="post" action="{{ url_for('common.edit_item', module='products', pk=product.primary_key, table='Product') }}"> 32 <button>edit</button> 33 </form> </td> 34 <td> 35 <form method="post" action="{{ url_for('common.delete_item', module='products', pk=product.primary_key, table='Product') }}"> 36 <button>delete</button> 37 </form> 38 </td> 39 <td>{{ product.primary_key }}</td> 40 <td>{{ product.name }}</td> 41 <td>{{ product.price_net }}</td> 42 <td>{{ product.price_gross }}</td> 43 {% if product.date_time_updated %} 44 <td>{{ product.date_time_updated }}</td> 45 {% else %} 46 <td>{{ product.date_time_created }}</td> 47 {% endif %} 48 49 </tr> 50 {% endfor %} 51 </tbody> 52 </table> 53 {% endblock %} 54