Check-in and voucher templates

This commit is contained in:
Raphael Michel
2018-07-09 08:56:01 +02:00
parent 93b07a476d
commit 9be5ec2417
17 changed files with 726 additions and 602 deletions
@@ -7,73 +7,93 @@
{% blocktrans with name=checkinlist.name %}Check-in list: {{ name }}{% endblocktrans %} {% blocktrans with name=checkinlist.name %}Check-in list: {{ name }}{% endblocktrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-with-btn panel-default">
{% blocktrans with name=checkinlist.name %}Check-in list: {{ name }}{% endblocktrans %} <div class="panel-heading">
{% if 'can_change_event_settings' in request.eventpermset %} <div class="pull-right">
<a href="{% url "control:event.orders.checkinlists.edit" event=request.event.slug organizer=request.event.organizer.slug list=checkinlist.pk %}" <a href="{% url "control:event.orders.export" event=request.event.slug organizer=request.event.organizer.slug %}?identifier=checkinlistpdf&checkinlistpdf-list={{ checkinlist.pk }}"
class="btn btn-default"> class="btn btn-default" target="_blank">
<span class="fa fa-edit"></span> <span class="fa fa-download"></span>
{% trans "Edit list" %} {% trans "PDF" %}
</a> </a>
{% endif %} <a href="{% url "control:event.orders.export" event=request.event.slug organizer=request.event.organizer.slug %}?identifier=checkinlistcsv&checkinlistcsv-list={{ checkinlist.pk }}"
<a href="{% url "control:event.orders.export" event=request.event.slug organizer=request.event.organizer.slug %}?identifier=checkinlistpdf&checkinlistpdf-list={{ checkinlist.pk }}" class="btn btn-default" target="_blank">
class="btn btn-default" target="_blank"> <span class="fa fa-download"></span>
<span class="fa fa-download"></span> {% trans "CSV" %}
{% trans "PDF" %} </a>
</a> {% if 'can_change_event_settings' in request.eventpermset %}
<a href="{% url "control:event.orders.export" event=request.event.slug organizer=request.event.organizer.slug %}?identifier=checkinlistcsv&checkinlistcsv-list={{ checkinlist.pk }}" <a href="{% url "control:event.orders.checkinlists.edit" event=request.event.slug organizer=request.event.organizer.slug list=checkinlist.pk %}"
class="btn btn-default" target="_blank"> class="btn btn-default">
<span class="fa fa-download"></span> <span class="fa fa-edit"></span>
{% trans "CSV" %} {% trans "Edit list" %}
</a> </a>
</h1> {% endif %}
<form class="row filter-form" action="" method="get"> </div>
<div class="col-md-4 col-sm-6 col-xs-12"> <h1 class="panel-title">
{% bootstrap_field filter_form.user layout='inline' %} {% blocktrans with name=checkinlist.name %}Check-in list: {{ name }}{% endblocktrans %}
</h1>
</div> </div>
<div class="col-md-3 col-sm-6 col-xs-12"> <form class="panel-body row filter-form" action="" method="get">
{% bootstrap_field filter_form.status layout='inline' %} <div class="col-md-4 col-sm-6 col-xs-12">
</div> {% bootstrap_field filter_form.user layout='inline' %}
<div class="col-md-3 col-sm-6 col-xs-12"> </div>
{% bootstrap_field filter_form.item layout='inline' %} <div class="col-md-3 col-sm-6 col-xs-12">
</div> {% bootstrap_field filter_form.status layout='inline' %}
<div class="col-md-2 col-sm-6 col-xs-12"> </div>
<button class="btn btn-primary btn-block" type="submit"> <div class="col-md-3 col-sm-6 col-xs-12">
<span class="fa fa-filter"></span> {% bootstrap_field filter_form.item layout='inline' %}
<span class="hidden-md"> </div>
<div class="col-md-2 col-sm-6 col-xs-12">
<button class="btn btn-primary btn-block" type="submit">
<span class="fa fa-filter"></span>
<span class="hidden-md">
{% trans "Filter" %} {% trans "Filter" %}
</span> </span>
</button> </button>
</div> </div>
</form> </form>
{% if entries|length == 0 %} {% if entries|length == 0 %}
<div class="empty-collection"> <div class="panel-body empty-collection">
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
No attendee record was found. No attendee record was found.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
</div> </div>
{% else %} {% else %}
<form method="post" action=""> <form method="post" action="" class="table-responsive">
{% csrf_token %} {% csrf_token %}
<div class="table-responsive">
<table class="table table-condensed table-hover"> <table class="table table-condensed table-hover">
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th>{% trans "Order code" %} <a href="?{% url_replace request 'ordering' '-code'%}"><i class="fa fa-caret-down"></i></a> <th>{% trans "Order code" %} <a href="?{% url_replace request 'ordering' '-code' %}">
<a href="?{% url_replace request 'ordering' 'code'%}"><i class="fa fa-caret-up"></i></a></th> <i class="fa fa-caret-down"></i></a>
<th>{% trans "Item" %} <a href="?{% url_replace request 'ordering' '-item'%}"><i class="fa fa-caret-down"></i></a> <a href="?{% url_replace request 'ordering' 'code' %}">
<a href="?{% url_replace request 'ordering' 'item'%}"><i class="fa fa-caret-up"></i></a></th> <i class="fa fa-caret-up"></i></a>
<th>{% trans "Email" %} <a href="?{% url_replace request 'ordering' '-email'%}"><i class="fa fa-caret-down"></i></a> </th>
<a href="?{% url_replace request 'ordering' 'email'%}"><i class="fa fa-caret-up"></i></a></th> <th>{% trans "Item" %} <a href="?{% url_replace request 'ordering' '-item' %}">
<th>{% trans "Name" %} <a href="?{% url_replace request 'ordering' '-name'%}"><i class="fa fa-caret-down"></i></a> <i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'name'%}"><i class="fa fa-caret-up"></i></a></th> <a href="?{% url_replace request 'ordering' 'item' %}">
<th>{% trans "Status" %} <a href="?{% url_replace request 'ordering' '-status'%}"><i class="fa fa-caret-down"></i></a> <i class="fa fa-caret-up"></i></a>
<a href="?{% url_replace request 'ordering' 'status'%}"><i class="fa fa-caret-up"></i></a></th> </th>
<th>{% trans "Timestamp" %} <a href="?{% url_replace request 'ordering' '-timestamp'%}"><i class="fa fa-caret-down"></i></a> <th>{% trans "Email" %} <a href="?{% url_replace request 'ordering' '-email' %}">
<a href="?{% url_replace request 'ordering' 'timestamp'%}"><i class="fa fa-caret-up"></i></a></th> <i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'email' %}">
<i class="fa fa-caret-up"></i></a>
</th>
<th>{% trans "Name" %} <a href="?{% url_replace request 'ordering' '-name' %}">
<i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'name' %}">
<i class="fa fa-caret-up"></i></a>
</th>
<th>{% trans "Status" %} <a href="?{% url_replace request 'ordering' '-status' %}">
<i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'status' %}"><i class="fa fa-caret-up"></i></a>
</th>
<th>{% trans "Timestamp" %} <a href="?{% url_replace request 'ordering' '-timestamp' %}">
<i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'timestamp' %}">
<i class="fa fa-caret-up"></i></a></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -81,11 +101,13 @@
<tr> <tr>
<td> <td>
{% if "can_change_orders" in request.eventpermset %} {% if "can_change_orders" in request.eventpermset %}
<input type="checkbox" name="checkin" id="id_checkin" class="" value="{{ e.pk }}"/> <input type="checkbox" name="checkin" id="id_checkin" class=""
value="{{ e.pk }}"/>
{% endif %} {% endif %}
</td> </td>
<td> <td>
<strong><a href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=e.order.code %}">{{ e.order.code }}</a></strong> <strong><a
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=e.order.code %}">{{ e.order.code }}</a></strong>
{% if e.order.status == "n" %} {% if e.order.status == "n" %}
<span class="label label-warning">{% trans "unpaid" %}</span> <span class="label label-warning">{% trans "unpaid" %}</span>
{% endif %} {% endif %}
@@ -115,13 +137,17 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% if "can_change_orders" in request.eventpermset %}
<div class="panel-footer">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Check-In selected attendees" %}
</button>
</div>
{% endif %}
</form>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div> </div>
{% if "can_change_orders" in request.eventpermset %} {% endif %}
<button type="submit" class="btn btn-primary btn-save"> </div>
{% trans "Check-In selected attendees" %}
</button>
{% endif %}
</form>
{% include "pretixcontrol/pagination.html" %}
{% endif %}
{% endblock %} {% endblock %}
@@ -3,23 +3,29 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Delete check-in list" %}{% endblock %} {% block title %}{% trans "Delete check-in list" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Delete check-in list" %}</h1> <div class="panel panel-default">
<form action="" method="post" class="form-horizontal"> <div class="panel-heading">
{% csrf_token %} <h1 class="panel-title">{% trans "Delete check-in list" %}</h1>
<p>{% blocktrans with name=checkinlist.name %}Are you sure you want to delete the check-in list <strong>{{ name }}</strong>?{% endblocktrans %}</p> </div>
{% if checkinlist.checkins.exists > 0 %} <div class="panel-body">
<p>{% blocktrans trimmed with num=checkinlist.checkins.count %} <form action="" method="post" class="form-horizontal">
This will delete the information of <strong>{{ num }}</strong> check-ins as well. {% csrf_token %}
{% endblocktrans %}</p> <p>{% blocktrans with name=checkinlist.name %}Are you sure you want to delete the check-in list <strong>{{ name }}</strong>?{% endblocktrans %}</p>
{% endif %} {% if checkinlist.checkins.exists > 0 %}
<div class="form-group submit-group"> <p>{% blocktrans trimmed with num=checkinlist.checkins.count %}
<a href="{% url "control:event.orders.checkinlists" organizer=request.event.organizer.slug event=request.event.slug %}" This will delete the information of <strong>{{ num }}</strong> check-ins as well.
class="btn btn-default btn-cancel"> {% endblocktrans %}</p>
{% trans "Cancel" %} {% endif %}
</a> <div class="form-group submit-group">
<button type="submit" class="btn btn-danger btn-save"> <a href="{% url "control:event.orders.checkinlists" organizer=request.event.organizer.slug event=request.event.slug %}"
{% trans "Delete" %} class="btn btn-default btn-cancel">
</button> {% trans "Cancel" %}
</div> </a>
</form> <button type="submit" class="btn btn-danger btn-save">
{% trans "Delete" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}
@@ -9,29 +9,38 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block inside %} {% block inside %}
{% if checkinlist %}
<h1>{% blocktrans with name=checkinlist.name %}Check-in list: {{ name }}{% endblocktrans %}</h1>
{% else %}
<h1>{% trans "Check-in list" %}</h1>
{% endif %}
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "General information" %}</legend> <div class="panel-heading">
{% bootstrap_field form.name layout="control" %} {% if checkinlist %}
{% if form.subevent %} <h1 class="panel-title">{% blocktrans with name=checkinlist.name %}Check-in list: {{ name }}{% endblocktrans %}</h1>
{% bootstrap_field form.subevent layout="control" %} {% else %}
{% endif %} <h1 class="panel-title">{% trans "Check-in list" %}</h1>
{% bootstrap_field form.include_pending layout="control" %} {% endif %}
<legend>{% trans "Products" %}</legend> </div>
<p> <div class="panel-body">
{% blocktrans trimmed %} {% bootstrap_field form.name layout="control" %}
Please select the products that should be part of this check-in list. {% if form.subevent %}
{% endblocktrans %} {% bootstrap_field form.subevent layout="control" %}
</p> {% endif %}
{% bootstrap_field form.all_products layout="control" %} {% bootstrap_field form.include_pending layout="control" %}
{% bootstrap_field form.limit_products layout="control" %} </div>
</fieldset>
<fieldset class="panel panel-default">
<div class="panel-heading">
<legend>{% trans "Products" %}</legend>
</div>
<div class="panel-body">
<p>
{% blocktrans trimmed %}
Please select the products that should be part of this check-in list.
{% endblocktrans %}
</p>
{% bootstrap_field form.all_products layout="control" %}
{% bootstrap_field form.limit_products layout="control" %}
</div>
</fieldset> </fieldset>
<div class="form-group submit-group"> <div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save"> <button type="submit" class="btn btn-primary btn-save">
@@ -2,113 +2,131 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Check-in lists" %}{% endblock %} {% block title %}{% trans "Check-in lists" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Check-in lists" %}</h1> <div class="panel panel-default">
<p> <div class="panel-heading">
{% blocktrans trimmed %} <h1 class="panel-title">{% trans "Check-in lists" %}</h1>
You can create check-in lists that you can use e.g. at the entrance of your event to track who is coming
and if they actually bought a ticket. You can do this process by printing out the list on paper, using this
web interface or by using one of our mobile or desktop apps to automatically scan tickets.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed %}
You can create multiple check-in lists to separate multiple parts of your event, for example if you have
separate entries for multiple ticket types. Different check-in lists are completely independent: If a ticket
shows up on two lists, it is valid once on every list. This might be useful if you run a festival with
festival passes that allow access to every or multiple performances as well as tickets only valid for single
performances.
{% endblocktrans %}
</p>
{% if request.event.has_subevents %}
<form class="form-inline helper-display-inline" action="" method="get">
<form class="form-inline helper-display-inline" action="" method="get">
{% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %}
</form>
</form>
{% endif %}
{% if checkinlists|length == 0 %}
<div class="empty-collection">
<p>
{% if request.GET.subevent %}
{% trans "Your search did not match any check-in lists." %}
{% else %}
{% blocktrans trimmed %}
You haven't created any check-in lists yet.
{% endblocktrans %}
{% endif %}
</p>
{% if "can_change_event_settings" in request.eventpermset %}
<a href="{% url "control:event.orders.checkinlists.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 check-in list" %}</a>
{% endif %}
</div> </div>
{% else %} <div class="panel-body">
{% if "can_change_event_settings" in request.eventpermset %}
<p> <p>
<a href="{% url "control:event.orders.checkinlists.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new check-in list" %} {% blocktrans trimmed %}
</a> You can create check-in lists that you can use e.g. at the entrance of your event to track who is
coming and if they actually bought a ticket. You can do this process by printing out the list on paper,
using this web interface or by using one of our mobile or desktop apps to automatically scan tickets.
{% endblocktrans %}
</p> </p>
<p>
{% blocktrans trimmed %}
You can create multiple check-in lists to separate multiple parts of your event, for example if you
have separate entries for multiple ticket types. Different check-in lists are completely independent: If
a ticket shows up on two lists, it is valid once on every list. This might be useful if you run a
festival with festival passes that allow access to every or multiple performances as well as tickets only valid
for single performances.
{% endblocktrans %}
</p>
</div>
</div>
<div class="panel panel-default">
{% if request.event.has_subevents %}
<form class="panel-body form-inline helper-display-inline" action="" method="get">
<form class="form-inline helper-display-inline" action="" method="get">
{% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %}
</form>
</form>
{% endif %} {% endif %}
<div class="table-responsive"> {% if checkinlists|length == 0 %}
<table class="table table-hover table-quotas"> <div class="empty-collection panel-body">
<thead> <p>
<tr> {% if request.GET.subevent %}
<th>{% trans "Check-in lists" %}</th> {% trans "Your search did not match any check-in lists." %}
<th>{% trans "Checked in" %}</th> {% else %}
{% if request.event.has_subevents %} {% blocktrans trimmed %}
<th>{% trans "Date" context "subevent" %}</th> You haven't created any check-in lists yet.
{% endblocktrans %}
{% endif %} {% endif %}
<th>{% trans "Products" %}</th> </p>
<th class="action-col-2"></th>
</tr> {% if "can_change_event_settings" in request.eventpermset %}
</thead> <a href="{% url "control:event.orders.checkinlists.add" organizer=request.event.organizer.slug event=request.event.slug %}"
<tbody> class="btn btn-primary btn-lg"><i class="fa fa-plus"></i>
{% for cl in checkinlists %} {% trans "Create a new check-in list" %}</a>
{% endif %}
</div>
{% else %}
{% if "can_change_event_settings" in request.eventpermset %}
<div class="panel-body">
<a href="{% url "control:event.orders.checkinlists.add" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new check-in list" %}
</a>
</div>
{% endif %}
<div class="table-responsive">
<table class="table table-hover table-quotas">
<thead>
<tr> <tr>
<td> <th>{% trans "Check-in lists" %}</th>
<strong><a href="{% url "control:event.orders.checkinlists.show" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}">{{ cl.name }}</a></strong> <th>{% trans "Checked in" %}</th>
</td> {% if request.event.has_subevents %}
<td> <th>{% trans "Date" context "subevent" %}</th>
<div class="quotabox availability"> {% endif %}
<div class="progress"> <th>{% trans "Products" %}</th>
<div class="progress-bar progress-bar-success progress-bar-{{ cl.percent }}"> <th class="action-col-2"></th>
</tr>
</thead>
<tbody>
{% for cl in checkinlists %}
<tr>
<td>
<strong><a
href="{% url "control:event.orders.checkinlists.show" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}">
{{ cl.name }}
</a></strong>
</td>
<td>
<div class="quotabox availability">
<div class="progress">
<div class="progress-bar progress-bar-success progress-bar-{{ cl.percent }}">
</div>
</div>
<div class="numbers">
{{ cl.checkin_count|default_if_none:"0" }} /
{{ cl.position_count|default_if_none:"0" }}
</div> </div>
</div> </div>
<div class="numbers"> </td>
{{ cl.checkin_count|default_if_none:"0" }} / {{ cl.position_count|default_if_none:"0" }} {% if request.event.has_subevents %}
</div> <td>{{ cl.subevent.name }} {{ cl.subevent.get_date_range_display }}</td>
</div>
</td>
{% if request.event.has_subevents %}
<td>{{ cl.subevent.name }} {{ cl.subevent.get_date_range_display }}</td>
{% endif %}
<td>
{% if cl.all_products %}
<em>{% trans "All" %}</em>
{% else %}
<ul>
{% for item in cl.limit_products.all %}
<li>
<a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.id %}">{{ item.name }}</a>
</li>
{% endfor %}
</ul>
{% endif %} {% endif %}
</td> <td>
<td class="text-right"> {% if cl.all_products %}
<a href="{% url "control:event.orders.checkinlists.show" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}" class="btn btn-default btn-sm"><i class="fa fa-eye"></i></a> <em>{% trans "All" %}</em>
{% if "can_change_event_settings" in request.eventpermset %} {% else %}
<a href="{% url "control:event.orders.checkinlists.edit" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a> <ul>
<a href="{% url "control:event.orders.checkinlists.delete" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a> {% for item in cl.limit_products.all %}
{% endif %} <li>
</td> <a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.id %}">{{ item.name }}</a>
</tr> </li>
{% endfor %} {% endfor %}
</tbody> </ul>
</table> {% endif %}
</div> </td>
{% endif %} <td class="text-right">
{% include "pretixcontrol/pagination.html" %} <a href="{% url "control:event.orders.checkinlists.show" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}"
class="btn btn-default btn-sm"><i class="fa fa-eye"></i></a>
{% if "can_change_event_settings" in request.eventpermset %}
<a href="{% url "control:event.orders.checkinlists.edit" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:event.orders.checkinlists.delete" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}"
class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}
@@ -2,24 +2,31 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Current issues" %}{% endblock %} {% block title %}{% trans "Current issues" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Current issues" %}</h1> <div class="panel panel-default">
<ul class="list-group"> <div class="panel-heading">
{% for action in actions %} <h1 class="panel-title">{% trans "Current issues" %}</h1>
<li class="list-group-item logentry"> </div>
<p> <ul class="list-group">
<a href="{% url "control:event.requiredaction.discard" event=request.event.slug organizer=request.event.organizer.slug id=action.id %}" {% for action in actions %}
class="btn btn-default btn-xs pull-right"> <li class="list-group-item logentry">
{% trans "Hide message" %} <p>
</a> <a href="{% url "control:event.requiredaction.discard" event=request.event.slug organizer=request.event.organizer.slug id=action.id %}"
<small><span class="fa fa-clock-o"></span> {{ action.datetime|date:"SHORT_DATETIME_FORMAT" }}</small> class="btn btn-default btn-xs pull-right">
</p> {% trans "Hide message" %}
{{ action.display|safe }} </a>
</li> <small><span class="fa fa-clock-o"></span> {{ action.datetime|date:"SHORT_DATETIME_FORMAT" }}
{% empty %} </small>
<div class="list-group-item"> </p>
<em>{% trans "No issues. Awesome!" %}</em> {{ action.display|safe }}
</div> </li>
{% endfor %} {% empty %}
</ul> <div class="list-group-item">
{% include "pretixcontrol/pagination.html" %} <em>{% trans "No issues. Awesome!" %}</em>
</div>
{% endfor %}
</ul>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
</div>
{% endblock %} {% endblock %}
@@ -176,10 +176,25 @@
{% if 'can_view_vouchers' in request.eventpermset %} {% if 'can_view_vouchers' in request.eventpermset %}
<li> <li>
<a href="{% url 'control:event.vouchers' organizer=request.event.organizer.slug event=request.event.slug %}" <a href="{% url 'control:event.vouchers' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.voucher" in url_name %}class="active"{% endif %}> class="has-children">
<i class="fa fa-tags fa-fw"></i> <i class="fa fa-tags fa-fw"></i>
{% trans "Vouchers" %} {% trans "Vouchers" %}
</a> </a>
<a href="#" class="arrow">
<span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
<li>
<a href="{% url 'control:event.vouchers' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.voucher" in url_name and not url_name == "event.vouchers.tags" %}class="active"{% endif %}>
{% trans "All vouchers" %}
</a>
<a href="{% url 'control:event.vouchers.tags' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if url_name == "event.vouchers.tags" %}class="active"{% endif %}>
{% trans "Tags" %}
</a>
</li>
</ul>
</li> </li>
{% endif %} {% endif %}
{% if 'can_view_orders' in request.eventpermset %} {% if 'can_view_orders' in request.eventpermset %}
@@ -2,50 +2,56 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block content %} {% block content %}
<h1>{% trans "Shop status" %}</h1> <div class="panel panel-default">
{% if request.event.live %} <div class="panel-heading">
<p> <h1 class="panel-title">{% trans "Shop status" %}</h1>
{% trans "Your shop is currently live. If you take it down, it will only be visible to you and your team." %} </div>
</p> <div class="panel-body">
<form action="" method="post"> {% if request.event.live %}
{% csrf_token %}
<input type="hidden" name="live" value="false">
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Go offline" %}
</button>
</div>
</form>
{% else %}
<p>
{% trans "Your ticket shop is currently not live. It is thus only visible to you and your team, not to any visitors." %}
</p>
{% if issues|length > 0 %}
<div class="alert alert-warning">
<p> <p>
{% trans "To publish your ticket shop, you first need to resolve the following issues:" %} {% trans "Your shop is currently live. If you take it down, it will only be visible to you and your team." %}
</p> </p>
<ul> <form action="" method="post">
{% for issue in issues %} {% csrf_token %}
<li>{{ issue|safe }}</li> <input type="hidden" name="live" value="false">
{% endfor %}
</ul>
</div>
{% else %}
<p>
{% trans "If you want to, you can publish your ticket shop now." %}
</p>
<form action="" method="post">
{% csrf_token %}
<input type="hidden" name="live" value="true">
<div class="form-group submit-group"> <div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save"> <button type="submit" class="btn btn-primary btn-save">
{% trans "Go live" %} {% trans "Go offline" %}
</button> </button>
</div> </div>
</form> </form>
{% endif %} {% else %}
{% endif %} <p>
{% trans "Your ticket shop is currently not live. It is thus only visible to you and your team, not to any visitors." %}
</p>
{% if issues|length > 0 %}
<div class="alert alert-warning">
<p>
{% trans "To publish your ticket shop, you first need to resolve the following issues:" %}
</p>
<ul>
{% for issue in issues %}
<li>{{ issue|safe }}</li>
{% endfor %}
</ul>
</div>
{% else %}
<p>
{% trans "If you want to, you can publish your ticket shop now." %}
</p>
<form action="" method="post">
{% csrf_token %}
<input type="hidden" name="live" value="true">
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Go live" %}
</button>
</div>
</form>
{% endif %}
{% endif %}
</div>
</div>
{% endblock %} {% endblock %}
@@ -3,9 +3,11 @@
{% load staticfiles %} {% load staticfiles %}
{% block title %}{% trans "Event logs" %}{% endblock %} {% block title %}{% trans "Event logs" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Event logs" %}</h1> <div class="panel panel-default">
<form class="form-inline helper-display-inline" action="" method="get"> <div class="panel-heading">
<p> <h1 class="panel-title">{% trans "Event logs" %}</h1>
</div>
<form class="form-inline panel-body" action="" method="get">
<select name="user" class="form-control"> <select name="user" class="form-control">
<option value="">{% trans "All actions" %}</option> <option value="">{% trans "All actions" %}</option>
<option value="yes" {% if request.GET.user == "yes" %}selected="selected"{% endif %}> <option value="yes" {% if request.GET.user == "yes" %}selected="selected"{% endif %}>
@@ -24,56 +26,58 @@
{% endfor %} {% endfor %}
</select> </select>
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button> <button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
</p> </form>
</form> <ul class="list-group">
<ul class="list-group"> {% for log in logs %}
{% for log in logs %} <li class="list-group-item logentry">
<li class="list-group-item logentry"> <div class="row">
<div class="row"> <div class="col-lg-2 col-sm-6 col-xs-12">
<div class="col-lg-2 col-sm-6 col-xs-12"> <span class="fa fa-clock-o"></span> {{ log.datetime|date:"SHORT_DATETIME_FORMAT" }}
<span class="fa fa-clock-o"></span> {{ log.datetime|date:"SHORT_DATETIME_FORMAT" }} {% if log.shredded %}
{% if log.shredded %} <span class="fa fa-eraser fa-danger fa-fw"
<span class="fa fa-eraser fa-danger fa-fw"
data-toggle="tooltip"
title="{% trans "Personal data was cleared from this log entry." %}">
</span>
{% endif %}
</div>
<div class="col-lg-2 col-sm-6 col-xs-12">
{% if log.user %}
{% if log.user.is_staff %}
<span class="fa fa-id-card fa-danger fa-fw"
data-toggle="tooltip" data-toggle="tooltip"
title="{% trans "This change was performed by a pretix administrator." %}"> title="{% trans "Personal data was cleared from this log entry." %}">
</span>
{% endif %}
</div>
<div class="col-lg-2 col-sm-6 col-xs-12">
{% if log.user %}
{% if log.user.is_staff %}
<span class="fa fa-id-card fa-danger fa-fw"
data-toggle="tooltip"
title="{% trans "This change was performed by a pretix administrator." %}">
</span> </span>
{% else %} {% else %}
<span class="fa fa-user fa-fw"></span> <span class="fa fa-user fa-fw"></span>
{% endif %}
{{ log.user.get_full_name }}
{% if log.oauth_application %}
<br><span class="fa fa-plug fa-fw"></span>
{{ log.oauth_application.name }}
{% endif %}
{% elif log.api_token %}
<span class="fa fa-key fa-fw"></span>
{{ log.api_token.name }}
{% endif %} {% endif %}
{{ log.user.get_full_name }} </div>
{% if log.oauth_application %} <div class="col-lg-2 col-sm-12 col-xs-12">
<br><span class="fa fa-plug fa-fw"></span> {% if log.display_object %}
{{ log.oauth_application.name }} <span class="fa fa-flag"></span> {{ log.display_object|safe }}
{% endif %} {% endif %}
{% elif log.api_token %} </div>
<span class="fa fa-key fa-fw"></span> <div class="col-lg-6 col-sm-12 col-xs-12">
{{ log.api_token.name }} {{ log.display }}
{% endif %} </div>
</div>
<div class="col-lg-2 col-sm-12 col-xs-12">
{% if log.display_object %}
<span class="fa fa-flag"></span> {{ log.display_object|safe }}
{% endif %}
</div>
<div class="col-lg-6 col-sm-12 col-xs-12">
{{ log.display }}
</div> </div>
</li>
{% empty %}
<div class="list-group-item">
<em>{% trans "No results" %}</em>
</div> </div>
</li> {% endfor %}
{% empty %} </ul>
<div class="list-group-item"> <div class="panel-footer">
<em>{% trans "No results" %}</em> {% include "pretixcontrol/pagination.html" %}
</div> </div>
{% endfor %} </div>
</ul>
{% include "pretixcontrol/pagination.html" %}
{% endblock %} {% endblock %}
@@ -12,6 +12,8 @@
example might be to ask your users about dietary requirements. example might be to ask your users about dietary requirements.
{% endblocktrans %} {% endblocktrans %}
</div> </div>
</div>
<div class="panel panel-default">
{% if questions|length == 0 %} {% if questions|length == 0 %}
<div class="empty-collection panel-body"> <div class="empty-collection panel-body">
<p> <p>
@@ -15,8 +15,10 @@
number of a specific ticket type at the same time. number of a specific ticket type at the same time.
{% endblocktrans %} {% endblocktrans %}
</div> </div>
</div>
<div class="panel panel-default">
{% if request.event.has_subevents %} {% if request.event.has_subevents %}
<form class="form-inline helper-display-inline" action="" method="get"> <form class="panel-body form-inline helper-display-inline" action="" method="get">
{% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %} {% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %}
</form> </form>
{% endif %} {% endif %}
@@ -3,19 +3,6 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Vouchers" %}{% endblock %} {% block title %}{% trans "Vouchers" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Vouchers" %}</h1>
<ul class="nav nav-pills">
<li {% if "event.vouchers" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.vouchers' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "All vouchers" %}
</a>
</li>
<li {% if "event.vouchers.tags" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.vouchers.tags' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Tags" %}
</a>
</li>
</ul>
{% block inside %} {% block inside %}
{% endblock %} {% endblock %}
{% endblock %} {% endblock %}
@@ -4,73 +4,83 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Voucher" %}{% endblock %} {% block title %}{% trans "Voucher" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Create multiple voucher" %}</h1>
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Voucher codes" %}</legend> <div class="panel-heading">
<div class="form-group form-inline"> <legend>{% trans "Voucher codes" %}</legend>
<div class="col-md-7 col-sm-12 col-md-offset-3"> </div>
<input type="text" class="form-control input-xs" <div class="panel-body">
id="voucher-bulk-codes-prefix" <div class="form-group form-inline">
placeholder="{% trans "Prefix (optional)" %}"> <div class="col-md-7 col-sm-12 col-md-offset-3">
<div class="input-group"> <input type="text" class="form-control input-xs"
<input type="number" class="form-control input-xs" id="voucher-bulk-codes-prefix"
id="voucher-bulk-codes-num" placeholder="{% trans "Prefix (optional)" %}">
placeholder="{% trans "Number" %}"> <div class="input-group">
<div class="input-group-btn"> <input type="number" class="form-control input-xs"
<button class="btn btn-default" type="button" id="voucher-bulk-codes-generate" id="voucher-bulk-codes-num"
data-rng-url="{% url 'control:event.vouchers.rng' organizer=request.event.organizer.slug event=request.event.slug %}"> placeholder="{% trans "Number" %}">
{% trans "Generate random codes" %} <div class="input-group-btn">
</button> <button class="btn btn-default" type="button" id="voucher-bulk-codes-generate"
<button type="button" class="btn btn-default btn-clipboard" data-clipboard-target="#id_codes"> data-rng-url="{% url 'control:event.vouchers.rng' organizer=request.event.organizer.slug event=request.event.slug %}">
<i class="fa fa-clipboard" aria-hidden="true"></i> {% trans "Generate random codes" %}
{% trans "Copy codes" %} </button>
</button> <button type="button" class="btn btn-default btn-clipboard"
data-clipboard-target="#id_codes">
<i class="fa fa-clipboard" aria-hidden="true"></i>
{% trans "Copy codes" %}
</button>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> {% bootstrap_field form.codes layout="control" %}
{% bootstrap_field form.codes layout="control" %}
{% bootstrap_field form.max_usages layout="control" %} {% bootstrap_field form.max_usages layout="control" %}
</fieldset>
<fieldset>
<legend>{% trans "Voucher details" %}</legend>
{% bootstrap_field form.valid_until layout="control" %}
{% bootstrap_field form.block_quota layout="control" %}
{% bootstrap_field form.allow_ignore_quota layout="control" %}
<div class="form-group">
<label class="col-md-3 control-label" for="id_tag">{% trans "Price effect" %}</label>
<div class="col-md-5">
{% bootstrap_field form.price_mode show_label=False form_group_class="" %}
</div>
<div class="col-md-4">
{% bootstrap_field form.value show_label=False form_group_class="" %}
</div>
</div> </div>
{% bootstrap_field form.itemvar layout="control" %} </fieldset>
<div class="form-group"> <fieldset class="panel-default panel">
<div class="col-md-9 col-md-offset-3"> <div class="panel-heading">
<div class="controls"> <legend>{% trans "Voucher details" %}</legend>
<div class="alert alert-info"> </div>
{% blocktrans trimmed %} <div class="panel-body">
If you choose "any product" for a specific quota and choose to reserve quota for this {% bootstrap_field form.valid_until layout="control" %}
voucher above, the product can still be unavailable to the voucher holder if another quota {% bootstrap_field form.block_quota layout="control" %}
associated with the product is sold out! {% bootstrap_field form.allow_ignore_quota layout="control" %}
{% endblocktrans %} <div class="form-group">
<label class="col-md-3 control-label" for="id_tag">{% trans "Price effect" %}</label>
<div class="col-md-5">
{% bootstrap_field form.price_mode show_label=False form_group_class="" %}
</div>
<div class="col-md-4">
{% bootstrap_field form.value show_label=False form_group_class="" %}
</div>
</div>
{% bootstrap_field form.itemvar layout="control" %}
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<div class="controls">
<div class="alert alert-info">
{% blocktrans trimmed %}
If you choose "any product" for a specific quota and choose to reserve quota for
this
voucher above, the product can still be unavailable to the voucher holder if another
quota
associated with the product is sold out!
{% endblocktrans %}
</div>
</div> </div>
</div> </div>
</div> </div>
{% if form.subevent %}
{% bootstrap_field form.subevent layout="control" %}
{% endif %}
{% bootstrap_field form.tag layout="control" %}
{% bootstrap_field form.comment layout="control" %}
{% eventsignal request.event "pretix.control.signals.voucher_form_html" form=form %}
</div> </div>
{% if form.subevent %}
{% bootstrap_field form.subevent layout="control" %}
{% endif %}
{% bootstrap_field form.tag layout="control" %}
{% bootstrap_field form.comment layout="control" %}
</fieldset> </fieldset>
{% eventsignal request.event "pretix.control.signals.voucher_form_html" form=form %}
<div class="form-group submit-group"> <div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save"> <button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %} {% trans "Save" %}
@@ -3,17 +3,27 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Delete voucher" %}{% endblock %} {% block title %}{% trans "Delete voucher" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Delete voucher" %}</h1> <div class="panel panel-default">
<form action="" method="post" class="form-horizontal"> <div class="panel-heading">
{% csrf_token %} <h1 class="panel-title">{% trans "Delete voucher" %}</h1>
<p>{% blocktrans %}Are you sure you want to delete the voucher <strong>{{ voucher }}</strong>?{% endblocktrans %}</p>
<div class="form-group submit-group">
<a href="{% url "control:event.vouchers" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default btn-cancel">
{% trans "Cancel" %}
</a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Delete" %}
</button>
</div> </div>
</form> <div class="panel-body">
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to delete the voucher <strong>{{ voucher }}</strong>
?{% endblocktrans %}</p>
<div class="form-group submit-group">
<a href="{% url "control:event.vouchers" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-default btn-cancel">
{% trans "Cancel" %}
</a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Delete" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}
@@ -4,16 +4,16 @@
{% load eventsignal %} {% load eventsignal %}
{% block title %}{% trans "Voucher" %}{% endblock %} {% block title %}{% trans "Voucher" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Voucher" %}</h1>
{% if voucher.redeemed %} {% if voucher.redeemed %}
<div class="alert alert-warning"> <div class="alert alert-warning">
{% trans "This voucher already has been used. It is not recommended to modify it." %} {% trans "This voucher already has been used. It is not recommended to modify it." %}
<ul> <ul>
{% for op in voucher.orderposition_set.all %} {% for op in voucher.orderposition_set.all %}
<li><a href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=op.order.code %}"> <li>
{% blocktrans with code=op.order.code %}Order {{ code }}{% endblocktrans %} <a href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=op.order.code %}">
</a></li> {% blocktrans with code=op.order.code %}Order {{ code }}{% endblocktrans %}
{% endfor %} </a></li>
{% endfor %}
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
@@ -22,43 +22,52 @@
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<div class="row"> <div class="row">
<div class="col-xs-12 col-lg-10"> <div class="col-xs-12 col-lg-10">
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Voucher details" %}</legend> <div class="panel-heading">
{% bootstrap_field form.code layout="control" %} <legend>{% trans "Voucher details" %}</legend>
{% bootstrap_field form.max_usages layout="control" %}
{% bootstrap_field form.valid_until layout="control" %}
{% bootstrap_field form.block_quota layout="control" %}
{% bootstrap_field form.allow_ignore_quota layout="control" %}
<div class="form-group">
<label class="col-md-3 control-label" for="id_tag">{% trans "Price effect" %}</label>
<div class="col-md-5">
{% bootstrap_field form.price_mode show_label=False form_group_class="" %}
</div>
<div class="col-md-4">
{% bootstrap_field form.value show_label=False form_group_class="" %}
</div>
</div> </div>
{% bootstrap_field form.itemvar layout="control" %} <div class="panel-body">
<div class="form-group"> {% bootstrap_field form.code layout="control" %}
<div class="col-md-9 col-md-offset-3"> {% bootstrap_field form.max_usages layout="control" %}
<div class="controls"> {% bootstrap_field form.valid_until layout="control" %}
<div class="alert alert-info"> {% bootstrap_field form.block_quota layout="control" %}
{% blocktrans trimmed %} {% bootstrap_field form.allow_ignore_quota layout="control" %}
If you choose "any product" for a specific quota and choose to reserve quota for this <div class="form-group">
voucher above, the product can still be unavailable to the voucher holder if another quota <label class="col-md-3 control-label" for="id_tag">{% trans "Price effect" %}</label>
associated with the product is sold out! <div class="col-md-5">
{% endblocktrans %} {% bootstrap_field form.price_mode show_label=False form_group_class="" %}
</div>
<div class="col-md-4">
{% bootstrap_field form.value show_label=False form_group_class="" %}
</div>
</div>
{% bootstrap_field form.itemvar layout="control" %}
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<div class="controls">
<div class="alert alert-info">
{% blocktrans trimmed %}
If you choose "any product" for a specific quota and choose to reserve quota
for this voucher above, the product can still be unavailable to the voucher holder if
another quota associated with the product is sold out!
{% endblocktrans %}
</div>
</div> </div>
</div> </div>
</div> </div>
{% if form.subevent %}
{% bootstrap_field form.subevent layout="control" %}
{% endif %}
{% bootstrap_field form.tag layout="control" %}
{% bootstrap_field form.comment layout="control" %}
{% eventsignal request.event "pretix.control.signals.voucher_form_html" form=form %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</div> </div>
{% if form.subevent %}
{% bootstrap_field form.subevent layout="control" %}
{% endif %}
{% bootstrap_field form.tag layout="control" %}
{% bootstrap_field form.comment layout="control" %}
</fieldset> </fieldset>
{% eventsignal request.event "pretix.control.signals.voucher_form_html" form=form %}
</div> </div>
<div class="col-xs-12 col-lg-2"> <div class="col-xs-12 col-lg-2">
<div class="panel panel-default"> <div class="panel panel-default">
@@ -71,10 +80,5 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form> </form>
{% endblock %} {% endblock %}
@@ -4,135 +4,146 @@
{% load urlreplace %} {% load urlreplace %}
{% block title %}{% trans "Vouchers" %}{% endblock %} {% block title %}{% trans "Vouchers" %}{% endblock %}
{% block inside %} {% block inside %}
<p> <div class="panel panel-default">
{% blocktrans trimmed %} <div class="panel-heading">
Vouchers allow you to assign tickets to specific persons for a lower price. They also enable you to <h1 class="panel-title">{% trans "Vouchers" %}</h1>
reserve some quota for your very special guests. </div>
{% endblocktrans %} <div class="panel-body">
</p> {% blocktrans trimmed %}
<div class="row filter-form"> Vouchers allow you to assign tickets to specific persons for a lower price. They also enable you to
<form class="col-lg-2 col-sm-6 col-xs-6" reserve some quota for your very special guests.
action="{% url "control:event.vouchers.go" event=request.event.slug organizer=request.event.organizer.slug %}"> {% endblocktrans %}
<div class="input-group"> </div>
<input type="text" name="code" class="form-control" placeholder="{% trans "Voucher code" %}" autofocus> </div>
<span class="input-group-btn"> <div class="panel panel-default">
<div class="row filter-form panel-body">
<form class="col-lg-2 col-sm-6 col-xs-6"
action="{% url "control:event.vouchers.go" event=request.event.slug organizer=request.event.organizer.slug %}">
<div class="input-group">
<input type="text" name="code" class="form-control" placeholder="{% trans "Voucher code" %}"
autofocus>
<span class="input-group-btn">
<button class="btn btn-primary" type="submit">{% trans "Go!" %}</button> <button class="btn btn-primary" type="submit">{% trans "Go!" %}</button>
</span> </span>
</div>
</form>
<form class="" action="" method="get">
<div class="col-lg-2 col-sm-3 col-xs-6">
{% bootstrap_field filter_form.search layout='inline' %}
</div>
<div class="col-lg-1 col-sm-3 col-xs-6">
{% bootstrap_field filter_form.tag layout='inline' %}
</div>
{% if request.event.has_subevents %}
<div class="col-lg-1 col-sm-3 col-xs-6">
{% bootstrap_field filter_form.status layout='inline' %}
</div> </div>
</form>
<form class="" action="" method="get">
<div class="col-lg-2 col-sm-3 col-xs-6"> <div class="col-lg-2 col-sm-3 col-xs-6">
{% bootstrap_field filter_form.subevent layout='inline' %} {% bootstrap_field filter_form.search layout='inline' %}
</div> </div>
{% else %} <div class="col-lg-1 col-sm-3 col-xs-6">
<div class="col-lg-3 col-sm-6 col-xs-6"> {% bootstrap_field filter_form.tag layout='inline' %}
{% bootstrap_field filter_form.status layout='inline' %}
</div> </div>
{% endif %} {% if request.event.has_subevents %}
<div class="col-lg-2 col-sm-6 col-xs-6"> <div class="col-lg-1 col-sm-3 col-xs-6">
{% bootstrap_field filter_form.itemvar layout='inline' %} {% bootstrap_field filter_form.status layout='inline' %}
</div> </div>
<div class="col-lg-1 col-sm-6 col-xs-6"> <div class="col-lg-2 col-sm-3 col-xs-6">
{% bootstrap_field filter_form.qm layout='inline' %} {% bootstrap_field filter_form.subevent layout='inline' %}
</div> </div>
<div class="col-lg-1 col-sm-6 col-xs-6"> {% else %}
<button class="btn btn-primary btn-block" type="submit"> <div class="col-lg-3 col-sm-6 col-xs-6">
<span class="fa fa-filter"></span> {% bootstrap_field filter_form.status layout='inline' %}
<span class="hidden-md"> </div>
{% endif %}
<div class="col-lg-2 col-sm-6 col-xs-6">
{% bootstrap_field filter_form.itemvar layout='inline' %}
</div>
<div class="col-lg-1 col-sm-6 col-xs-6">
{% bootstrap_field filter_form.qm layout='inline' %}
</div>
<div class="col-lg-1 col-sm-6 col-xs-6">
<button class="btn btn-primary btn-block" type="submit">
<span class="fa fa-filter"></span>
<span class="hidden-md">
{% trans "Filter" %} {% trans "Filter" %}
</span> </span>
</button> </button>
</div> </div>
</form> </form>
</div>
{% if vouchers|length == 0 %}
<div class="empty-collection">
<p>
{% if request.GET.search or request.GET.tag or request.GET.status or request.GET.subevent %}
{% trans "Your search did not match any vouchers." %}
{% else %}
{% blocktrans trimmed %}
You haven't created any vouchers yet.
{% endblocktrans %}
{% endif %}
</p>
<a href="{% url "control:event.vouchers.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 voucher" %}</a>
<a href="{% url "control:event.vouchers.bulk" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create multiple new vouchers" %}</a>
</div> </div>
{% else %} {% if vouchers|length == 0 %}
<p> <div class="empty-collection panel-body">
<a href="{% url "control:event.vouchers.add" organizer=request.event.organizer.slug event=request.event.slug %}" <p>
class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new voucher" %}</a> {% if request.GET.search or request.GET.tag or request.GET.status or request.GET.subevent %}
<a href="{% url "control:event.vouchers.bulk" organizer=request.event.organizer.slug event=request.event.slug %}" {% trans "Your search did not match any vouchers." %}
class="btn btn-default"><i class="fa fa-plus"></i> {% else %}
{% trans "Create multiple new vouchers" %}</a> {% blocktrans trimmed %}
<a href="?{% url_replace request "download" "yes" %}" You haven't created any vouchers yet.
class="btn btn-default"><i class="fa fa-download"></i> {% endblocktrans %}
{% trans "Download list" %}</a>
</p>
<div class="table-responsive">
<table class="table table-hover table-quotas">
<thead>
<tr>
<th>{% trans "Voucher code" %}</th>
<th>{% trans "Redemptions" %}</th>
<th>{% trans "Expiry" %}</th>
<th>{% trans "Tag" %}</th>
<th>{% trans "Product" %}</th>
{% if request.event.has_subevents %}
<th>{% trans "Date" context "subevent" %}</th>
{% endif %} {% endif %}
<th></th> </p>
</tr>
</thead> <a href="{% url "control:event.vouchers.add" organizer=request.event.organizer.slug event=request.event.slug %}"
<tbody> class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new voucher" %}</a>
{% for v in vouchers %} <a href="{% url "control:event.vouchers.bulk" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create multiple new vouchers" %}
</a>
</div>
{% else %}
<div class="panel-heading">
<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>
<a href="{% url "control:event.vouchers.bulk" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-default"><i class="fa fa-plus"></i>
{% trans "Create multiple new vouchers" %}</a>
<a href="?{% url_replace request "download" "yes" %}"
class="btn btn-default"><i class="fa fa-download"></i>
{% trans "Download list" %}</a>
</div>
<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 "Redemptions" %}</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 "Tag" %}</th>
<td>{{ v.redeemed }} / {{ v.max_usages }}</td> <th>{% trans "Product" %}</th>
<td>{{ v.valid_until|date }}</td>
<td>
{{ v.tag }}
</td>
<td>
{% if v.item %}
{{ v.item }}
{% if v.variation %}
{{ v.variation }}
{% endif %}
{% else %}
{% blocktrans trimmed with quota=v.quota.name %}
Any product in quota "{{ quota }}"
{% endblocktrans %}
{% endif %}
</td>
{% if request.event.has_subevents %} {% if request.event.has_subevents %}
<td>{{ v.subevent.name }} {{ v.subevent.get_date_range_display }}</td> <th>{% trans "Date" context "subevent" %}</th>
{% endif %} {% endif %}
<td class="text-right"> <th></th>
<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>
{% endif %} <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>{{ v.redeemed }} / {{ v.max_usages }}</td>
<td>{{ v.valid_until|date }}</td>
<td>
{{ v.tag }}
</td>
<td>
{% if v.item %}
{{ v.item }}
{% if v.variation %}
{{ v.variation }}
{% endif %}
{% else %}
{% blocktrans trimmed with quota=v.quota.name %}
Any product in quota "{{ quota }}"
{% endblocktrans %}
{% endif %}
</td>
{% if request.event.has_subevents %}
<td>{{ v.subevent.name }} {{ v.subevent.get_date_range_display }}</td>
{% endif %}
<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>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}
@@ -1,47 +1,54 @@
{% extends "pretixcontrol/vouchers/base.html" %} {% extends "pretixcontrol/vouchers/base.html" %}
{% load i18n %} {% load i18n %}
{% block inside %} {% block inside %}
<p> <div class="panel panel-default">
{% blocktrans trimmed %} <div class="panel-heading">
If you add a "tag" to a voucher, you can here see statistics on their usage. <h1 class="panel-title">{% trans "Voucher tags" %}</h1>
{% endblocktrans %}
</p>
{% if tags|length == 0 %}
<div class="empty-collection">
<p>
{% blocktrans trimmed %}
You haven't added any tags to vouchers yet.
{% endblocktrans %}
</p>
</div> </div>
{% else %} <div class="panel-body">
<div class="table-responsive"> {% blocktrans trimmed %}
<table class="table table-hover table-condensed"> If you add a "tag" to a voucher, you can here see statistics on their usage.
<thead> {% endblocktrans %}
<tr> </div>
<th>{% trans "Tag" %}</th> {% if tags|length == 0 %}
<th>{% trans "Redeemed vouchers" %}</th> <div class="empty-collection panel-body">
</tr> <p>
</thead> {% blocktrans trimmed %}
<tbody> You haven't added any tags to vouchers yet.
{% for t in tags %} {% endblocktrans %}
</p>
</div>
{% else %}
<div class="table-responsive">
<table class="table table-hover table-condensed">
<thead>
<tr> <tr>
<td> <th>{% trans "Tag" %}</th>
<strong><a <th>{% trans "Redeemed vouchers" %}</th>
href="{% url "control:event.vouchers" organizer=request.event.organizer.slug event=request.event.slug %}?tag={{ t.tag|urlencode }}">
{{ t.tag }}
</a></strong> <small>({{ t.redeemed }} / {{ t.total }})</small>
</td>
<td>
<div class="progress">
<div class="progress-bar progress-bar-{{ t.percentage }}">
</div>
</div>
</td>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for t in tags %}
</div> <tr>
{% endif %} <td>
<strong><a
href="{% url "control:event.vouchers" organizer=request.event.organizer.slug event=request.event.slug %}?tag={{ t.tag|urlencode }}">
{{ t.tag }}
</a></strong>
<small>({{ t.redeemed }} / {{ t.total }})</small>
</td>
<td>
<div class="progress">
<div class="progress-bar progress-bar-{{ t.percentage }}">
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}
@@ -114,7 +114,7 @@
.panel-default { .panel-default {
border: none; border: none;
} }
.panel-default > .panel-heading, .panel-default > .panel-footer { .panel-default > .panel-heading, .panel-default .panel-footer {
background: white; background: white;
} }