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/customers.html | |
parent | ce73f10a4aaa717de025fd2dc591294fea0db8de (diff) |
Jinja2 templates.
Diffstat (limited to 'app/templates/modules/customers.html')
-rw-r--r-- | app/templates/modules/customers.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/app/templates/modules/customers.html b/app/templates/modules/customers.html new file mode 100644 index 0000000..c693097 --- /dev/null +++ b/app/templates/modules/customers.html @@ -0,0 +1,43 @@ +{# -*- mode: web; -*- #} + +{% extends "base.html" %} +{% block title %} +Customers +{% 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>Name</th> + <th>City</th> + <th>Phone</th> + <th>E-mail</th> + </tr> + </thead> + <tbody> + {% for customer in customers %} + <tr> + <td><button>edit</button></td> + {% if customer.website %} + <td><a href="{{ customer.website }}">{{ customer.name }}</a></td> + {% else %} + <td>{{ customer.name }}</td> + {% endif %} + <td>{{ customer.city }}</td> + <td>{{ customer.phone }}</td> + {% if customer.email %} + <td><a href="mailto:{{ customer.email }}">{{ customer.email }}</a></td> + {% else %} + <td></td> + {% endif %} + </tr> + {% endfor %} + </tbody> +</table> +{% endblock %} |