mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Improved list views to look better when they are empty
This commit is contained in:
@@ -1,9 +1,30 @@
|
|||||||
{% extends "pretixcontrol/event/base.html" %}
|
{% extends "pretixcontrol/event/base.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load eventurl %}
|
||||||
{% block title %}{% trans "Attendees" %}{% endblock %}
|
{% block title %}{% trans "Attendees" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans "Attendees" %}</h1>
|
<h1>{% trans "Attendees" %}</h1>
|
||||||
<p>
|
{% 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">
|
<form class="form-inline helper-display-inline" action="" method="get">
|
||||||
<select name="status" class="form-control">
|
<select name="status" class="form-control">
|
||||||
<option value="">{% trans "All attendees" %}</option>
|
<option value="">{% trans "All attendees" %}</option>
|
||||||
@@ -24,10 +45,10 @@
|
|||||||
</select>
|
</select>
|
||||||
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Order code" %}</th>
|
<th>{% trans "Order code" %}</th>
|
||||||
<th>{% trans "Product" %}</th>
|
<th>{% trans "Product" %}</th>
|
||||||
@@ -35,21 +56,22 @@
|
|||||||
<th>{% trans "Order date" %}</th>
|
<th>{% trans "Order date" %}</th>
|
||||||
<th>{% trans "Status" %}</th>
|
<th>{% trans "Status" %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for a in attendees %}
|
{% for a in attendees %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><a
|
<td><strong><a
|
||||||
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=a.order.code%}"
|
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=a.order.code %}"
|
||||||
>{{ a.order.code }}</a></strong></td>
|
>{{ a.order.code }}</a></strong></td>
|
||||||
<td>{{ a.item.name }}</td>
|
<td>{{ a.item.name }}</td>
|
||||||
<td>{{ a.attendee_name|default:"" }}</td>
|
<td>{{ a.attendee_name|default:"" }}</td>
|
||||||
<td>{{ a.order.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
|
<td>{{ a.order.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
|
||||||
<td>{% include "pretixcontrol/orders/fragment_order_status.html" with order=a.order %}</td>
|
<td>{% include "pretixcontrol/orders/fragment_order_status.html" with order=a.order %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -2,32 +2,55 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "Product categories" %}{% endblock %}
|
{% block title %}{% trans "Product categories" %}{% endblock %}
|
||||||
{% block inside %}
|
{% block inside %}
|
||||||
<h1>{% trans "Product categories" %}</h1>
|
<h1>{% trans "Product categories" %}</h1>
|
||||||
<p>
|
<p>
|
||||||
<a href="{% url "control:event.items.categories.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create new category" %}</a>
|
{% blocktrans trimmed %}
|
||||||
</p>
|
You can use categories to group multiple products together in an organized way.
|
||||||
<div class="table-responsive">
|
{% endblocktrans %}
|
||||||
<table class="table table-hover">
|
</p>
|
||||||
<thead>
|
{% if categories|length == 0 %}
|
||||||
|
<div class="empty-collection">
|
||||||
|
<p>
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
You haven't created any categories yet.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="{% url "control:event.items.categories.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||||
|
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new category" %}</a>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p>
|
||||||
|
<a href="{% url "control:event.items.categories.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new category" %}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Product categories" %}</th>
|
<th>{% trans "Product categories" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for c in categories %}
|
{% for c in categories %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><a href="{% url "control:event.items.categories.edit" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}">{{ c.name }}</a></strong></td>
|
<td>
|
||||||
<td>
|
<strong><a href="{% url "control:event.items.categories.edit" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}">{{ c.name }}</a></strong>
|
||||||
<a href="{% url "control:event.items.categories.up" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
|
</td>
|
||||||
<a href="{% url "control:event.items.categories.down" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-down"></i></a>
|
<td>
|
||||||
</td>
|
<a href="{% url "control:event.items.categories.up" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
|
||||||
<td class="text-right"><a href="{% url "control:event.items.categories.delete" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a></td>
|
<a href="{% url "control:event.items.categories.down" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-down"></i></a>
|
||||||
</tr>
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
<a href="{% url "control:event.items.categories.delete" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "Products" %}{% endblock %}
|
{% block title %}{% trans "Products" %}{% endblock %}
|
||||||
{% block inside %}
|
{% block inside %}
|
||||||
<h1>{% trans "Products" %}</h1>
|
<h1>{% trans "Products" %}</h1>
|
||||||
<p>
|
<p>
|
||||||
{% blocktrans trimmed %}
|
{% blocktrans trimmed %}
|
||||||
Below, you find a list of all available products. You can click on a product name to inspect and change
|
Below, you find a list of all available products. You can click on a product name to inspect and change
|
||||||
@@ -10,42 +10,57 @@
|
|||||||
give category.
|
give category.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
{% if items|length == 0 %}
|
||||||
<a href="{% url "control:event.items.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
<div class="empty-collection">
|
||||||
class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create new product" %}</a>
|
<p>
|
||||||
</p>
|
{% blocktrans trimmed %}
|
||||||
<div class="table-responsive">
|
You haven't created any products yet.
|
||||||
<table class="table table-condensed table-hover">
|
{% endblocktrans %}
|
||||||
<thead>
|
</p>
|
||||||
|
|
||||||
|
<a href="{% url "control:event.items.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||||
|
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new product" %}</a>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p>
|
||||||
|
<a href="{% url "control:event.items.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||||
|
class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new product" %}</a>
|
||||||
|
</p>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-condensed table-hover">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Product name" %}</th>
|
<th>{% trans "Product name" %}</th>
|
||||||
<th>{% trans "Category" %}</th>
|
<th>{% trans "Category" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% regroup items by category as cat_list %}
|
{% regroup items by category as cat_list %}
|
||||||
{% for c in cat_list %}
|
{% for c in cat_list %}
|
||||||
{% for i in c.list %}
|
{% for i in c.list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>
|
<td><strong>
|
||||||
{% if not i.active %}<strike>{% endif %}
|
{% if not i.active %}<strike>{% endif %}
|
||||||
<a href="
|
<a href="
|
||||||
{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}">{{ i.name }}</a>
|
{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}">{{ i.name }}</a>
|
||||||
{% if not i.active %}</strike>{% endif %}
|
{% if not i.active %}</strike>{% endif %}
|
||||||
</strong></td>
|
</strong></td>
|
||||||
<td>{% if i.category %}{{ i.category.name }}{% endif %}</td>
|
<td>{% if i.category %}{{ i.category.name }}{% endif %}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url "control:event.items.up" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
|
<a href="{% url "control:event.items.up" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
|
||||||
<a href="{% url "control:event.items.down" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-down"></i></a>
|
<a href="{% url "control:event.items.down" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-down"></i></a>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><a href="{% url "control:event.items.delete" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a></td>
|
<td class="text-right">
|
||||||
</tr>
|
<a href="{% url "control:event.items.delete" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -2,31 +2,53 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "Questions" %}{% endblock %}
|
{% block title %}{% trans "Questions" %}{% endblock %}
|
||||||
{% block inside %}
|
{% block inside %}
|
||||||
<h1>{% trans "Questions" %}</h1>
|
<h1>{% trans "Questions" %}</h1>
|
||||||
<p>
|
<p>
|
||||||
<a href="{% url "control:event.items.questions.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create new question" %}</a>
|
{% blocktrans trimmed %}
|
||||||
</p>
|
Questions allow your attendees to fill in additional data about their ticket. If you provide food, one
|
||||||
<div class="table-responsive">
|
example might be to ask your users about dietary requirements.
|
||||||
<table class="table table-hover">
|
{% endblocktrans %}
|
||||||
<thead>
|
</p>
|
||||||
|
{% if questions|length == 0 %}
|
||||||
|
<div class="empty-collection">
|
||||||
|
<p>
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
You haven't created any questions yet.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="{% url "control:event.items.questions.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||||
|
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new question" %}</a>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p>
|
||||||
|
<a href="{% url "control:event.items.questions.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new question" %}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Question" %}</th>
|
<th>{% trans "Question" %}</th>
|
||||||
<th>{% trans "Type" %}</th>
|
<th>{% trans "Type" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for q in questions %}
|
{% for q in questions %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><a href="
|
<td><strong><a href="
|
||||||
{% url "control:event.items.questions.edit" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}">{{ q.question }}</a></strong></td>
|
{% url "control:event.items.questions.edit" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}">{{ q.question }}</a></strong>
|
||||||
<td>{{ q.get_type_display }}</td>
|
</td>
|
||||||
<td class="text-right"><a href="
|
<td>{{ q.get_type_display }}</td>
|
||||||
{% url "control:event.items.questions.delete" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a></td>
|
<td class="text-right"><a href="
|
||||||
</tr>
|
{% url "control:event.items.questions.delete" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -2,13 +2,35 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "Quotas" %}{% endblock %}
|
{% block title %}{% trans "Quotas" %}{% endblock %}
|
||||||
{% block inside %}
|
{% block inside %}
|
||||||
<h1>{% trans "Quotas" %}</h1>
|
<h1>{% trans "Quotas" %}</h1>
|
||||||
<p>
|
<p>
|
||||||
<a href="{% url "control:event.items.quotas.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new quota" %}</a>
|
{% blocktrans trimmed %}
|
||||||
</p>
|
To make your products actually available, you also need quotas. Quotas define, how many instances of
|
||||||
<div class="table-responsive">
|
your product pretix will sell. This way, you can configure whether your event can take an unlimited
|
||||||
<table class="table table-hover table-quotas">
|
number of attendees or the number of attendees is limited. You can assign a product to multiple quotas
|
||||||
<thead>
|
to fulfil more complex requirements, e.g. if you want to limit the total number of tickets sold and the
|
||||||
|
number of a specific ticket type at the same time.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
{% if quotas|length == 0 %}
|
||||||
|
<div class="empty-collection">
|
||||||
|
<p>
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
You haven't created any quotas yet.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="{% url "control:event.items.quotas.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||||
|
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new quota" %}</a>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p>
|
||||||
|
<a href="{% url "control:event.items.quotas.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new quota" %}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover table-quotas">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Quota name" %}</th>
|
<th>{% trans "Quota name" %}</th>
|
||||||
<th>{% trans "Products" %}</th>
|
<th>{% trans "Products" %}</th>
|
||||||
@@ -16,27 +38,32 @@
|
|||||||
<th>{% trans "Capacity left" %}</th>
|
<th>{% trans "Capacity left" %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for q in quotas %}
|
{% for q in quotas %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><a href="{% url "control:event.items.quotas.edit" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}">{{ q.name }}</a></strong></td>
|
<td>
|
||||||
<td>
|
<strong><a href="{% url "control:event.items.quotas.edit" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}">{{ q.name }}</a></strong>
|
||||||
<ul>
|
</td>
|
||||||
{% for item in q.items.all %}
|
<td>
|
||||||
<li><a href="
|
<ul>
|
||||||
|
{% for item in q.items.all %}
|
||||||
|
<li><a href="
|
||||||
{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.id %}"
|
{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.id %}"
|
||||||
>{{ item.name }}</a></li>
|
>{{ item.name }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>{% if q.size == None %}Unlimited{% else %}{{ q.size }}{% endif %}</td>
|
<td>{% if q.size == None %}Unlimited{% else %}{{ q.size }}{% endif %}</td>
|
||||||
<td>{% include "pretixcontrol/items/fragment_quota_availability.html" with availability=q.availability %}</td>
|
<td>{% include "pretixcontrol/items/fragment_quota_availability.html" with availability=q.availability %}</td>
|
||||||
<td class="text-right"><a href="{% url "control:event.items.quotas.delete" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a></td>
|
<td class="text-right">
|
||||||
</tr>
|
<a href="{% url "control:event.items.quotas.delete" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,11 +1,32 @@
|
|||||||
{% extends "pretixcontrol/event/base.html" %}
|
{% extends "pretixcontrol/event/base.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load eventurl %}
|
||||||
{% block title %}{% trans "Orders" %}{% endblock %}
|
{% block title %}{% trans "Orders" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans "Orders" %}</h1>
|
<h1>{% trans "Orders" %}</h1>
|
||||||
<p>
|
{% if questions|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"
|
<form class="form-inline helper-display-inline"
|
||||||
action="{% url "control:event.orders.go" event=request.event.slug organizer=request.event.organizer.slug %}">
|
action="{% url "control:event.orders.go" event=request.event.slug organizer=request.event.organizer.slug %}">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" name="code" class="form-control" placeholder="{% trans "Order code" %}">
|
<input type="text" name="code" class="form-control" placeholder="{% trans "Order code" %}">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
@@ -34,10 +55,10 @@
|
|||||||
<input type="text" name="user" class="form-control" placeholder="{% trans "Search user" %}" value="{{ request.GET.user }}">
|
<input type="text" name="user" class="form-control" placeholder="{% trans "Search user" %}" value="{{ request.GET.user }}">
|
||||||
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Order code" %}</th>
|
<th>{% trans "Order code" %}</th>
|
||||||
<th>{% trans "User" %}</th>
|
<th>{% trans "User" %}</th>
|
||||||
@@ -45,21 +66,22 @@
|
|||||||
<th>{% trans "Order date" %}</th>
|
<th>{% trans "Order date" %}</th>
|
||||||
<th>{% trans "Status" %}</th>
|
<th>{% trans "Status" %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for o in orders %}
|
{% for o in orders %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><a
|
<td><strong><a
|
||||||
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=o.code%}"
|
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=o.code %}"
|
||||||
>{{ o.code }}</a></strong></td>
|
>{{ o.code }}</a></strong></td>
|
||||||
<td>{{ o.email }}</td>
|
<td>{{ o.email }}</td>
|
||||||
<td>{{ o.total|floatformat:2 }} {{ request.event.currency }}</td>
|
<td>{{ o.total|floatformat:2 }} {{ request.event.currency }}</td>
|
||||||
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
|
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
|
||||||
<td>{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
|
<td>{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -4,45 +4,64 @@
|
|||||||
{% block inside %}
|
{% block inside %}
|
||||||
<h1>{% trans "Vouchers" %}</h1>
|
<h1>{% trans "Vouchers" %}</h1>
|
||||||
<p>
|
<p>
|
||||||
<a href="{% url "control:event.vouchers.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
{% blocktrans trimmed %}
|
||||||
class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new voucher" %}</a>
|
Vouchers allow you to assign tickets to specific persons for a lower price. They also enable you to
|
||||||
|
reserve some quota for your very special guests.
|
||||||
|
{% endblocktrans %}
|
||||||
</p>
|
</p>
|
||||||
<div class="table-responsive">
|
{% if vouchers|length == 0 %}
|
||||||
<table class="table table-hover table-quotas">
|
<div class="empty-collection">
|
||||||
<thead>
|
<p>
|
||||||
<tr>
|
{% blocktrans trimmed %}
|
||||||
<th>{% trans "Voucher code" %}</th>
|
You haven't created any vouchers yet.
|
||||||
<th>{% trans "Is redeemed" %}</th>
|
{% endblocktrans %}
|
||||||
<th>{% trans "Expiry" %}</th>
|
</p>
|
||||||
<th>{% trans "Product" %}</th>
|
|
||||||
<th></th>
|
<a href="{% url "control:event.vouchers.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||||
</tr>
|
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new voucher" %}</a>
|
||||||
</thead>
|
</div>
|
||||||
<tbody>
|
{% else %}
|
||||||
{% for v in vouchers %}
|
<p>
|
||||||
|
<a href="{% url "control:event.vouchers.add" organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||||
|
class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new voucher" %}</a>
|
||||||
|
</p>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover table-quotas">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<th>{% trans "Voucher code" %}</th>
|
||||||
<strong><a href="
|
<th>{% trans "Is redeemed" %}</th>
|
||||||
{% url "control:event.voucher" organizer=request.event.organizer.slug event=request.event.slug voucher=v.id %}">{{ v.code }}</a></strong>
|
<th>{% trans "Expiry" %}</th>
|
||||||
</td>
|
<th>{% trans "Product" %}</th>
|
||||||
<td>{% if v.redeemed %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}</td>
|
<th></th>
|
||||||
<td>{{ v.valid_until|date }}</td>
|
|
||||||
<td>
|
|
||||||
{% if v.item %}
|
|
||||||
{{ v.item }}
|
|
||||||
{% else %}
|
|
||||||
{% blocktrans trimmed with quota=v.quota.name %}
|
|
||||||
Any product in quota "{{ quota }}"
|
|
||||||
{% endblocktrans %}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td class="text-right">
|
|
||||||
<a href="{% url "control:event.voucher.delete" organizer=request.event.organizer.slug event=request.event.slug voucher=v.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
{% for v in vouchers %}
|
||||||
</div>
|
<tr>
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
<td>
|
||||||
|
<strong><a href="
|
||||||
|
{% url "control:event.voucher" organizer=request.event.organizer.slug event=request.event.slug voucher=v.id %}">{{ v.code }}</a></strong>
|
||||||
|
</td>
|
||||||
|
<td>{% if v.redeemed %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}</td>
|
||||||
|
<td>{{ v.valid_until|date }}</td>
|
||||||
|
<td>
|
||||||
|
{% if v.item %}
|
||||||
|
{{ v.item }}
|
||||||
|
{% else %}
|
||||||
|
{% blocktrans trimmed with quota=v.quota.name %}
|
||||||
|
Any product in quota "{{ quota }}"
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
<a href="{% url "control:event.voucher.delete" organizer=request.event.organizer.slug event=request.event.slug voucher=v.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -163,4 +163,13 @@ h1 .btn-sm {
|
|||||||
}
|
}
|
||||||
.helper-space-below {
|
.helper-space-below {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-collection {
|
||||||
|
margin: 20px 0;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user