add table column templates
This commit is contained in:
parent
eaaa019b85
commit
456917499a
@ -10,8 +10,8 @@
|
||||
<div class="alert alert-danger">Keine Tische angelegt!</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col col-12">
|
||||
<div class="alert alert-warning">
|
||||
{{ location|display_daily_sale }}
|
||||
</div>
|
||||
<div class="col col-12">
|
||||
<div class="alert alert-warning">
|
||||
{{ location|display_daily_sale }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load render_table from django_tables2 %}
|
||||
|
||||
{% block title %}Standortliste{% endblock %}
|
||||
|
||||
@ -8,36 +9,33 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if location_list %}
|
||||
<h2>Bitte Standort auswählen:</h2>
|
||||
<table class="table table-hover">
|
||||
<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>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Strasse</th>
|
||||
<th>Plz</th>
|
||||
<th>Ort</th>
|
||||
<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 %}
|
||||
<th>Accounting</th>
|
||||
<td><a href="{% url 'billard:accounting_detail' loc.id %}"
|
||||
class="btn btn-outline-danger btn-sm">Abrechnen</a></td>
|
||||
{% 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>
|
||||
{% else %}
|
||||
<p>Keine Standorte Zugeordnet.</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% render_table table %}
|
||||
|
||||
{% endblock %}
|
||||
|
2
billard/templates/billard/tc_accounting_detail.html
Normal file
2
billard/templates/billard/tc_accounting_detail.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% load static from staticfiles %}
|
||||
<a href="{% url 'billard:accounting_detail' record.id %}" class="btn btn-outline-danger btn-sm">Abrechnen</a>
|
3
billard/templates/billard/tc_location_detail.html
Normal file
3
billard/templates/billard/tc_location_detail.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% load static from staticfiles %}
|
||||
<a href="{% url 'billard:location_detail' record.id %}"
|
||||
class="btn btn-outline-primary btn-sm">{{ record.code|default_if_none:"" }}</a>
|
Loading…
Reference in New Issue
Block a user