update accounting dialog

This commit is contained in:
2017-04-27 12:24:38 +02:00
parent 5477a26cbb
commit cae1ee197e
5 changed files with 17 additions and 16 deletions

View File

@@ -4,18 +4,6 @@
{% block title %}Accounting Data{% endblock %}
{% block content %}
{% if not locations|length_is:"1" %}
<form action="accounting" method="post" id="location-form">
{% csrf_token %}
<div id="location-selector" class="alert">
<select class="form-control" form="location-form" name="location-selector" id="location-select">
{% for loc in locations %}
<option value="{{ loc.id }}"{% if loc.id == location_id %} selected{% endif %}>{{ loc.code }} - {{ loc.name }}</option>
{% endfor %}
</select>
</div>
</form>
{% endif %}
<div class="alert alert-success" role="alert">Gesamt-Summe: {{ acc_sum }}</div>

View File

@@ -29,9 +29,6 @@
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="{% ifequal request.path '/billard/' %}active{% endifequal %}"><a href="{% url "billard:location_index" %}">Standorte</a></li>
{% if perms.billard.change_accounting %}
<li class="{% ifequal request.path '/billard/accounting' %}active{% endifequal %}"><a href="{% url "billard:location_index" %}">Abrechnung</a></li>
{% endif %}
{% if user.is_superuser %}
<li class="{% ifequal request.path '/logout/' %}active{% endifequal %}"><a href="/admin/">Administration</a></li>
{% endif %}

View File

@@ -13,6 +13,9 @@
<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>
@@ -21,6 +24,9 @@
<td><a href="{% url 'billard:location_detail' loc.id %}">{{ loc.street|default_if_none:"" }}</a></td>
<td><a href="{% url 'billard:location_detail' loc.id %}">{{ loc.plz|default_if_none:"" }}</a></td>
<td><a href="{% url 'billard:location_detail' loc.id %}">{{ loc.city|default_if_none:"" }}</a></td>
{% if perms.billard.change_accounting %}
<td><a href="{% url 'billard:accounting_detail' loc.id %}" class="btn btn-primary">Abrechnen</a></td>
{% endif %}
</tr>
{% endfor %}
</table>