Display quotas in event list

This commit is contained in:
Raphael Michel
2017-10-04 11:25:51 +02:00
parent 217ed905d4
commit f074e642ec
10 changed files with 158 additions and 8 deletions

View File

@@ -67,6 +67,11 @@
<a href="?{% url_replace request 'ordering' '-date_to' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'date_to' %}"><i class="fa fa-caret-up"></i></a>
</th>
<th>
{% trans "Quota available" %}
<a href="?{% url_replace request 'ordering' '-sum_quota_available' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'sum_quota_available' %}"><i class="fa fa-caret-up"></i></a>
</th>
<th class="text-right">
{% trans "Status" %}
<a href="?{% url_replace request 'ordering' '-live' %}"><i class="fa fa-caret-down"></i></a>
@@ -79,9 +84,6 @@
<tr>
<td class="event-name-col">
<strong><a href="{% url "control:event.index" organizer=e.organizer.slug event=e.slug %}">{{ e.name }}</a></strong>
{% if e.has_subevents %}
<span class="label label-default">{% trans "Series" %}</span>
{% endif %}
<br><small>{{ e.slug }}</small>
</td>
{% if not hide_orga %}<td>{{ e.organizer }}</td>{% endif %}
@@ -91,6 +93,9 @@
{% else %}
{{ e.get_short_date_from_display }}
{% endif %}
{% if e.has_subevents %}
<span class="label label-default">{% trans "Series" %}</span>
{% endif %}
{% if e.settings.show_date_to and e.date_to %}
<br>
{% if e.has_subevents %}
@@ -100,6 +105,18 @@
{% endif %}
{% endif %}
</td>
<td>
{% for q in e.first_quotas|slice:":3" %}
{% include "pretixcontrol/fragment_quota_box.html" with quota=q %}
{% endfor %}
{% if e.first_quotas|length > 3 %}
<a href="{% url "control:event.items.quotas" organizer=e.organizer.slug event=e.slug %}"
class="quotabox-more" data-toggle="tooltip" title="{% trans "More quotas" %}"
data-placement="top">
&middot;&middot;&middot;
</a>
{% endif %}
</td>
<td class="text-right">
{% if not e.live %}
<span class="label label-danger">{% trans "Shop disabled" %}</span>