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/customers.html | |
parent | 3aee6067123cd8afd985f68847e6bb476a853bb0 (diff) |
Templates.
Diffstat (limited to 'app/templates/modules/customers.html')
-rw-r--r-- | app/templates/modules/customers.html | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/app/templates/modules/customers.html b/app/templates/modules/customers.html index c693097..64ed4c2 100644 --- a/app/templates/modules/customers.html +++ b/app/templates/modules/customers.html @@ -5,15 +5,17 @@ Customers {% endblock %} +{% block actions %} +<li><a href="{{ url_for('common.add_item', module='customers', table='Customer' ) }}" class="button">Add customer</a></li> +{% endblock %} + {% block content %} -<div id="actions"> - <a href="{{ url_for('add_item', item='customer') }}" class="button">Add customer</a> -</div> <table> <thead> <tr> <th></th> + <th>ID</th> <th>Name</th> <th>City</th> <th>Phone</th> @@ -23,7 +25,15 @@ Customers <tbody> {% for customer in customers %} <tr> - <td><button>edit</button></td> + <td> + <form method="post" action="{{ url_for('common.edit_item', module='customers', pk=customer.primary_key, table='Customer') }}"> + <button>edit</button> + </form> + <form method="post" action="{{ url_for('common.delete_item', module='customers', pk=customer.primary_key, table='Customer') }}"> + <button>delete</button> + </form> + </td> + <td>{{ customer.primary_key }}</td> {% if customer.website %} <td><a href="{{ customer.website }}">{{ customer.name }}</a></td> {% else %} |