diff options
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 %} |