summaryrefslogtreecommitdiff
path: root/app/templates/modules/products.html
blob: fda1afd0c37ebc0797afb6a550008d3f708310b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{# -*- mode: web; -*- #}

{% extends "base.html" %}
{% block title %}
Products
{% endblock %}

{% block actions %}
<li><a href="{{ url_for('common.add_item', module='products', table='Product') }}" class="button">Add product</a></li>
{% endblock %}

{% block content %}

<i>Track products you sell here.</i>

<table>
    <thead>
	<tr>
	    <th colspan=2><i>Actions</i></th>
	    <th>ID</th>
	    <th>Name</th>
	    <th>Price (net)</th>
	    <th>Price (gross)</th>
	    <th>Updated</th>
	</tr>
    </thead>
    <tbody>
	{% for product in products %}
	<tr>
	    <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('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>
	    {% if product.date_time_updated %}
	    <td>{{ product.date_time_updated }}</td>
	    {% else %}
	    <td>{{ product.date_time_created }}</td>
	    {% endif %}

	</tr>
	{% endfor %}
    </tbody>
</table>
{% endblock %}
Copyright 2019--2024 Marius PETER