forked from CGM_Public/pretix_original
Improved list views to look better when they are empty
This commit is contained in:
@@ -1,9 +1,30 @@
|
||||
{% extends "pretixcontrol/event/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load eventurl %}
|
||||
{% block title %}{% trans "Attendees" %}{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{% trans "Attendees" %}</h1>
|
||||
<p>
|
||||
<h1>{% trans "Attendees" %}</h1>
|
||||
{% if attendees|length == 0 %}
|
||||
<div class="empty-collection">
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
Nobody ordered a ticket yet.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
{% if not request.event.live %}
|
||||
<a href="{% url "control:event.live" event=request.event.slug organizer=request.event.organizer.slug %}"
|
||||
class="btn btn-primary btn-lg">
|
||||
{% trans "Take your shop live" %}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% eventurl request.event "presale:event.index" %}" class="btn btn-primary btn-lg">
|
||||
{% trans "Go to the ticket shop" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p>
|
||||
<form class="form-inline helper-display-inline" action="" method="get">
|
||||
<select name="status" class="form-control">
|
||||
<option value="">{% trans "All attendees" %}</option>
|
||||
@@ -24,10 +45,10 @@
|
||||
</select>
|
||||
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
||||
</form>
|
||||
</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Order code" %}</th>
|
||||
<th>{% trans "Product" %}</th>
|
||||
@@ -35,21 +56,22 @@
|
||||
<th>{% trans "Order date" %}</th>
|
||||
<th>{% trans "Status" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for a in attendees %}
|
||||
<tr>
|
||||
<td><strong><a
|
||||
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=a.order.code%}"
|
||||
>{{ a.order.code }}</a></strong></td>
|
||||
<td>{{ a.item.name }}</td>
|
||||
<td>{{ a.attendee_name|default:"" }}</td>
|
||||
<td>{{ a.order.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
|
||||
<td>{% include "pretixcontrol/orders/fragment_order_status.html" with order=a.order %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><a
|
||||
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=a.order.code %}"
|
||||
>{{ a.order.code }}</a></strong></td>
|
||||
<td>{{ a.item.name }}</td>
|
||||
<td>{{ a.attendee_name|default:"" }}</td>
|
||||
<td>{{ a.order.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
|
||||
<td>{% include "pretixcontrol/orders/fragment_order_status.html" with order=a.order %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% include "pretixcontrol/pagination.html" %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% include "pretixcontrol/pagination.html" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user