diff options
author | Marius Peter <marius.peter@tutanota.com> | 2022-05-15 13:16:37 +0200 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2022-05-15 13:16:37 +0200 |
commit | 1dad22d3e45d6506c8624e3a7111240fcc4ab786 (patch) | |
tree | 35d2c1e84215c6e6a52979bbff0cbc2e8cf77ace /app/templates/modules/products.html | |
parent | 3aee6067123cd8afd985f68847e6bb476a853bb0 (diff) |
Templates.
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> |