diff options
Diffstat (limited to 'app/templates/modules/products.html')
-rw-r--r-- | app/templates/modules/products.html | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/app/templates/modules/products.html b/app/templates/modules/products.html index 97b692a..fda1afd 100644 --- a/app/templates/modules/products.html +++ b/app/templates/modules/products.html @@ -5,12 +5,11 @@ Products {% endblock %} -{% block content %} - +{% block actions %} +<li><a href="{{ url_for('common.add_item', module='products', table='Product') }}" class="button">Add product</a></li> +{% endblock %} -<div id="actions"> - <a href="{{ url_for('add_item', item='product') }}" class="button">Add product</a> -</div> +{% block content %} <i>Track products you sell here.</i> @@ -18,6 +17,7 @@ Products <thead> <tr> <th colspan=2><i>Actions</i></th> + <th>ID</th> <th>Name</th> <th>Price (net)</th> <th>Price (gross)</th> @@ -28,13 +28,15 @@ Products {% for product in products %} <tr> <td> - <button>edit</button> - </td> + <form method="post" action="{{ url_for('common.edit_item', module='products', pk=product.primary_key, table='Product') }}"> + <button>edit</button> + </form> </td> <td> - <form method="post" action="{{ url_for('delete_item', pk=product.primary_key, table='Product' ) }}"> + <form method="post" action="{{ url_for('common.delete_item', module='products', pk=product.primary_key, table='Product') }}"> <button>delete</button> </form> </td> + <td>{{ product.primary_key }}</td> <td>{{ product.name }}</td> <td>{{ product.price_net }}</td> <td>{{ product.price_gross }}</td> |