diff options
author | Marius Peter <marius.peter@tutanota.com> | 2022-05-01 21:38:59 +0200 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2022-05-01 21:38:59 +0200 |
commit | caa0e1db19c0616031f7879d4298ed152b05f557 (patch) | |
tree | 927a70654c46c27cb9f313ac6020efa863b32035 /app/templates/modules/products.html | |
parent | ce73f10a4aaa717de025fd2dc591294fea0db8de (diff) |
Jinja2 templates.
Diffstat (limited to 'app/templates/modules/products.html')
-rw-r--r-- | app/templates/modules/products.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/app/templates/modules/products.html b/app/templates/modules/products.html new file mode 100644 index 0000000..97b692a --- /dev/null +++ b/app/templates/modules/products.html @@ -0,0 +1,51 @@ +{# -*- mode: web; -*- #} + +{% extends "base.html" %} +{% block title %} +Products +{% endblock %} + +{% block content %} + + +<div id="actions"> + <a href="{{ url_for('add_item', item='product') }}" class="button">Add product</a> +</div> + +<i>Track products you sell here.</i> + +<table> + <thead> + <tr> + <th colspan=2><i>Actions</i></th> + <th>Name</th> + <th>Price (net)</th> + <th>Price (gross)</th> + <th>Updated</th> + </tr> + </thead> + <tbody> + {% for product in products %} + <tr> + <td> + <button>edit</button> + </td> + <td> + <form method="post" action="{{ url_for('delete_item', pk=product.primary_key, table='Product' ) }}"> + <button>delete</button> + </form> + </td> + <td>{{ product.name }}</td> + <td>{{ product.price_net }}</td> + <td>{{ product.price_gross }}</td> + {% if product.date_time_updated %} + <td>{{ product.date_time_updated }}</td> + {% else %} + <td>{{ product.date_time_created }}</td> + {% endif %} + + </tr> + {% endfor %} + </tbody> +</table> +{% endblock %} |