move code to django tables

This commit is contained in:
2019-02-09 21:57:30 +01:00
parent 456917499a
commit c99c3a45d4
3 changed files with 34 additions and 30 deletions

View File

@@ -8,34 +8,6 @@
{% endblock %}
{% block content %}
<h2>Bitte Standort auswählen:</h2>
<table class="table table-hover">
<tr>
<th>Code</th>
<th>Name</th>
<th>Strasse</th>
<th>Plz</th>
<th>Ort</th>
{% if perms.billard.change_accounting %}
<th>Accounting</th>
{% endif %}
</tr>
{% for loc in location_list %}
<tr>
<td><a href="{% url 'billard:location_detail' loc.id %}"
class="btn btn-outline-primary btn-sm">{{ loc.code|default_if_none:"" }}</a></td>
<td>{{ loc.name|default_if_none:"" }}</td>
<td>{{ loc.street|default_if_none:"" }}</td>
<td>{{ loc.plz|default_if_none:"" }}</td>
<td>{{ loc.city|default_if_none:"" }}</td>
{% if perms.billard.change_accounting %}
<td><a href="{% url 'billard:accounting_detail' loc.id %}"
class="btn btn-outline-danger btn-sm">Abrechnen</a></td>
{% endif %}
</tr>
{% endfor %}
</table>
{% render_table table %}
{% endblock %}