Compare commits

...

15 Commits

Author SHA1 Message Date
Raphael Michel
55d246f82e REmove totod 2018-07-16 10:34:55 +02:00
Raphael Michel
e9f0af1898 More views 2018-07-16 10:34:23 +02:00
Raphael Michel
053de88173 Navigational context selector 2018-07-14 16:39:19 +02:00
Raphael Michel
886b938f08 Allow plugins to add sub navigation points 2018-07-14 15:07:35 +02:00
Raphael Michel
59245c4ec3 New navi mechanism 2018-07-14 14:23:12 +02:00
Raphael Michel
71664e5203 Navigation behaviour 2018-07-09 15:40:06 +02:00
Raphael Michel
ce3ae5c218 CSS changes 2018-07-09 13:41:45 +02:00
Raphael Michel
9be5ec2417 Check-in and voucher templates 2018-07-09 08:56:01 +02:00
Raphael Michel
93b07a476d Minor css changes 2018-07-09 00:23:34 +02:00
Raphael Michel
d583775132 Order-related templates 2018-07-09 00:14:22 +02:00
Raphael Michel
0daded8af5 Item-related templates 2018-07-08 23:55:26 +02:00
Raphael Michel
7b230726b0 More pages 2018-07-08 22:31:28 +02:00
Raphael Michel
365d78f63c control stylesheet 2018-07-08 18:51:34 +02:00
Raphael Michel
50aa186197 Error pages 2018-07-08 18:15:14 +02:00
Raphael Michel
32f401e423 Login page 2018-07-08 17:44:13 +02:00
158 changed files with 6473 additions and 4906 deletions

View File

@@ -1151,3 +1151,15 @@ class Quota(LoggedModel):
else: else:
if subevent: if subevent:
raise ValidationError(_('The subevent does not belong to this event.')) raise ValidationError(_('The subevent does not belong to this event.'))
def get_items_display(self):
parts = []
vars = self.variations.all()
for i in self.items.all():
if i.has_variations:
for v in vars:
if v.item_id == i.pk:
parts.append('{} {}'.format(i, v))
else:
parts.append(str(i))
return parts

View File

@@ -2,12 +2,14 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Bad Request" %}{% endblock %} {% block title %}{% trans "Bad Request" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-frown-o big-icon"></i> <i class="fa fa-frown-o fa-fw big-icon"></i>
<h1>{% trans "Bad Request" %}</h1> <div class="error-details">
<p>{% trans "We were unable to parse your request." %}</p> <h1>{% trans "Bad Request" %}</h1>
<p>{{ exception }}</p> <p>{% trans "We were unable to parse your request." %}</p>
<p class="links"> <p>{{ exception }}</p>
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <p class="links">
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a> <a id='goback' href='#'>{% trans "Take a step back" %}</a>
</p> &middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,12 +2,14 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Permission denied" %}{% endblock %} {% block title %}{% trans "Permission denied" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-lock big-icon"></i> <i class="fa fa-fw fa-lock big-icon"></i>
<h1>{% trans "Permission denied" %}</h1> <div class="error-details">
<p>{% trans "You do not have access to this page." %}</p> <h1>{% trans "Permission denied" %}</h1>
<p>{{ exception }}</p> <p>{% trans "You do not have access to this page." %}</p>
<p class="links"> <p>{{ exception }}</p>
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <p class="links">
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a> <a id='goback' href='#'>{% trans "Take a step back" %}</a>
</p> &middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,11 +2,13 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Not found" %}{% endblock %} {% block title %}{% trans "Not found" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-meh-o big-icon"></i> <i class="fa fa-meh-o fa-fw big-icon"></i>
<h1>{% trans "Not found" %}</h1> <div class="error-details">
<p>{% trans "I'm afraid we could not find the the resource you requested." %}</p> <h1>{% trans "Not found" %}</h1>
<p>{{ exception }}</p> <p>{% trans "I'm afraid we could not find the the resource you requested." %}</p>
<p class="links"> <p>{{ exception }}</p>
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <p class="links">
</p> <a id='goback' href='#'>{% trans "Take a step back" %}</a>
</p>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,22 +2,24 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Internal Server Error" %}{% endblock %} {% block title %}{% trans "Internal Server Error" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-bolt big-icon"></i> <i class="fa fa-bolt big-icon fa-fw"></i>
<h1>{% trans "Internal Server Error" %}</h1> <div class="error-details">
<p>{% trans "We had trouble processing your request." %}</p> <h1>{% trans "Internal Server Error" %}</h1>
<p>{% trans "If this problem persists, please contact us." %}</p> <p>{% trans "We had trouble processing your request." %}</p>
{% if request.sentry.id %} <p>{% trans "If this problem persists, please contact us." %}</p>
<p> {% if request.sentry.id %}
{% blocktrans trimmed %} <p>
If you contact us, please send us the following code: {% blocktrans trimmed %}
{% endblocktrans %} If you contact us, please send us the following code:
<br> {% endblocktrans %}
{{ request.sentry.id }} <br>
{{ request.sentry.id }}
</p>
{% endif %}
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p> </p>
{% endif %} </div>
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p>
{% endblock %} {% endblock %}

View File

@@ -2,23 +2,27 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Verification failed" %}{% endblock %} {% block title %}{% trans "Verification failed" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-frown-o big-icon"></i> <i class="fa fa-frown-o big-icon fa-fw"></i>
<h1>{% trans "Verification failed" %}</h1> <div class="error-details">
<p>{% blocktrans trimmed %} <h1>{% trans "Verification failed" %}</h1>
We could not verify that this request really was sent from you. For security reasons, we therefore cannot process it.
{% endblocktrans %}</p>
{% if no_referer %}
<p>{{ no_referer1 }}</p>
<p>{{ no_referer2 }}</p>
{% elif no_cookie %}
<p>{{ no_cookie1 }}</p>
<p>{{ no_cookie2 }}</p>
{% else %}
<p>{% blocktrans trimmed %} <p>{% blocktrans trimmed %}
Please go back to the last page, refresh this page and then try again. If the problem persists, please get in touch with us. We could not verify that this request really was sent from you. For security reasons, we therefore cannot
process it.
{% endblocktrans %}</p> {% endblocktrans %}</p>
{% endif %} {% if no_referer %}
<p class="links"> <p>{{ no_referer1 }}</p>
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <p>{{ no_referer2 }}</p>
</p> {% elif no_cookie %}
<p>{{ no_cookie1 }}</p>
<p>{{ no_cookie2 }}</p>
{% else %}
<p>{% blocktrans trimmed %}
Please go back to the last page, refresh this page and then try again. If the problem persists, please
get in touch with us.
{% endblocktrans %}</p>
{% endif %}
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
</p>
</div>
{% endblock %} {% endblock %}

View File

@@ -8,11 +8,14 @@ from django.utils.translation import get_language
from pretix.base.models.auth import StaffSession from pretix.base.models.auth import StaffSession
from pretix.base.settings import GlobalSettingsObject from pretix.base.settings import GlobalSettingsObject
from pretix.control.navigation import (
get_event_navigation, get_global_navigation, get_organizer_navigation,
)
from ..helpers.i18n import ( from ..helpers.i18n import (
get_javascript_format, get_javascript_output_format, get_moment_locale, get_javascript_format, get_javascript_output_format, get_moment_locale,
) )
from .signals import html_head, nav_event, nav_global, nav_topbar from .signals import html_head, nav_topbar
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
@@ -40,10 +43,9 @@ def contextprocessor(request):
ctx['html_head'] = "".join(_html_head) ctx['html_head'] = "".join(_html_head)
_js_payment_weekdays_disabled = '[]' _js_payment_weekdays_disabled = '[]'
_nav_event = []
if getattr(request, 'event', None) and hasattr(request, 'organizer') and request.user.is_authenticated: if getattr(request, 'event', None) and hasattr(request, 'organizer') and request.user.is_authenticated:
for receiver, response in nav_event.send(request.event, request=request): ctx['nav_items'] = get_event_navigation(request)
_nav_event += response
if request.event.settings.get('payment_term_weekdays'): if request.event.settings.get('payment_term_weekdays'):
_js_payment_weekdays_disabled = '[0,6]' _js_payment_weekdays_disabled = '[0,6]'
@@ -65,17 +67,13 @@ def contextprocessor(request):
if request.GET.get('subevent', ''): if request.GET.get('subevent', ''):
# Do not use .get() for lazy evaluation # Do not use .get() for lazy evaluation
ctx['selected_subevents'] = request.event.subevents.filter(pk=request.GET.get('subevent')) ctx['selected_subevents'] = request.event.subevents.filter(pk=request.GET.get('subevent'))
elif getattr(request, 'organizer', None) and request.user.is_authenticated:
ctx['nav_items'] = get_organizer_navigation(request)
elif request.user.is_authenticated:
ctx['nav_items'] = get_global_navigation(request)
ctx['nav_event'] = _nav_event
ctx['js_payment_weekdays_disabled'] = _js_payment_weekdays_disabled ctx['js_payment_weekdays_disabled'] = _js_payment_weekdays_disabled
_nav_global = []
if not hasattr(request, 'event') and request.user.is_authenticated:
for receiver, response in nav_global.send(request, request=request):
_nav_global += response
ctx['nav_global'] = sorted(_nav_global, key=lambda n: n['label'])
_nav_topbar = [] _nav_topbar = []
if request.user.is_authenticated: if request.user.is_authenticated:
for receiver, response in nav_topbar.send(request, request=request): for receiver, response in nav_topbar.send(request, request=request):

View File

@@ -0,0 +1,440 @@
from django.http import HttpRequest
from django.urls import reverse
from django.utils.translation import pgettext_lazy, ugettext_lazy as _
from pretix.control.signals import (
nav_event, nav_event_settings, nav_global, nav_organizer,
)
def get_event_navigation(request: HttpRequest):
url = request.resolver_match
nav = [
{
'label': _('Dashboard'),
'url': reverse('control:event.index', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': (url.url_name == 'event.index'),
'icon': 'dashboard',
}
]
if 'can_change_event_settings' in request.eventpermset:
event_settings = [
{
'label': _('General'),
'url': reverse('control:event.settings', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings',
},
{
'label': _('Payment'),
'url': reverse('control:event.settings.payment', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings.payment',
},
{
'label': _('Plugins'),
'url': reverse('control:event.settings.plugins', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings.plugins',
},
{
'label': _('Display'),
'url': reverse('control:event.settings.display', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings.display',
},
{
'label': _('Tickets'),
'url': reverse('control:event.settings.tickets', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings.tickets',
},
{
'label': _('E-mail'),
'url': reverse('control:event.settings.mail', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings.mail',
},
{
'label': _('Tax rules'),
'url': reverse('control:event.settings.tax', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings.tax',
},
{
'label': _('Invoicing'),
'url': reverse('control:event.settings.invoice', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings.invoice',
},
{
'label': _('Widget'),
'url': reverse('control:event.settings.widget', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name == 'event.settings.widget',
},
]
event_settings += sorted(
sum((list(a[1]) for a in nav_event_settings.send(request.event, request=request)), []),
key=lambda r: r['label']
)
nav.append({
'label': _('Settings'),
'url': reverse('control:event.settings', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': False,
'icon': 'wrench',
'children': event_settings
})
if request.event.has_subevents:
nav.append({
'label': pgettext_lazy('subevent', 'Dates'),
'url': reverse('control:event.subevents', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': ('event.subevent' in url.url_name),
'icon': 'calendar',
})
if 'can_change_items' in request.eventpermset:
nav.append({
'label': _('Products'),
'url': reverse('control:event.items', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': False,
'icon': 'ticket',
'children': [
{
'label': _('Products'),
'url': reverse('control:event.items', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name in (
'event.item', 'event.items.add', 'event.items') or "event.item." in url.url_name,
},
{
'label': _('Quotas'),
'url': reverse('control:event.items.quotas', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': 'event.items.quota' in url.url_name,
},
{
'label': _('Categories'),
'url': reverse('control:event.items.categories', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': 'event.items.categories' in url.url_name,
},
{
'label': _('Questions'),
'url': reverse('control:event.items.questions', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': 'event.items.questions' in url.url_name,
},
]
})
if 'can_view_orders' in request.eventpermset:
nav.append({
'label': _('Orders'),
'url': reverse('control:event.orders', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': False,
'icon': 'shopping-cart',
'children': [
{
'label': _('All orders'),
'url': reverse('control:event.orders', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name in ('event.orders', 'event.order') or "event.order." in url.url_name,
},
{
'label': _('Overview'),
'url': reverse('control:event.orders.overview', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': 'event.orders.overview' in url.url_name,
},
{
'label': _('Export'),
'url': reverse('control:event.orders.export', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': 'event.orders.export' in url.url_name,
},
{
'label': _('Waiting list'),
'url': reverse('control:event.orders.waitinglist', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': 'event.orders.waitinglist' in url.url_name,
},
]
})
if 'can_view_vouchers' in request.eventpermset:
nav.append({
'label': _('Vouchers'),
'url': reverse('control:event.vouchers', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': False,
'icon': 'tags',
'children': [
{
'label': _('All vouchers'),
'url': reverse('control:event.vouchers', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': url.url_name != 'event.vouchers.tags' and "event.vouchers" in url.url_name,
},
{
'label': _('Tags'),
'url': reverse('control:event.vouchers.tags', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': 'event.vouchers.tags' in url.url_name,
},
]
})
if 'can_view_orders' in request.eventpermset:
nav.append({
'label': pgettext_lazy('navigation', 'Check-in'),
'url': reverse('control:event.orders.checkinlists', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': False,
'icon': 'check-square-o',
'children': [
{
'label': _('Check-in lists'),
'url': reverse('control:event.orders.checkinlists', kwargs={
'event': request.event.slug,
'organizer': request.event.organizer.slug,
}),
'active': 'event.orders.checkin' in url.url_name,
},
]
})
merge_in(nav, sorted(
sum((list(a[1]) for a in nav_event.send(request.event, request=request)), []),
key=lambda r: r['label']
))
return nav
def get_global_navigation(request):
url = request.resolver_match
has_staff_session = request.user.has_active_staff_session(request.session.session_key)
nav = [
{
'label': _('Dashboard'),
'url': reverse('control:index'),
'active': (url.url_name == 'index'),
'icon': 'dashboard',
},
{
'label': _('Events'),
'url': reverse('control:events'),
'active': 'events' in url.url_name,
'icon': 'calendar',
},
{
'label': _('Organizers'),
'url': reverse('control:organizers'),
'active': 'organizers' in url.url_name,
'icon': 'group',
},
{
'label': _('Order search'),
'url': reverse('control:search.orders'),
'active': 'search.orders' in url.url_name,
'icon': 'search',
},
{
'label': _('User settings'),
'url': reverse('control:user.settings'),
'active': False,
'icon': 'user',
'children': [
{
'label': _('General'),
'url': reverse('control:user.settings'),
'active': 'user.settings' == url.url_name,
},
{
'label': _('Notifications'),
'url': reverse('control:user.settings.notifications'),
'active': 'user.settings.notifications' == url.url_name,
},
{
'label': _('2FA'),
'url': reverse('control:user.settings.2fa'),
'active': 'user.settings.2fa' in url.url_name,
},
{
'label': _('Authorized apps'),
'url': reverse('control:user.settings.oauth.list'),
'active': 'user.settings.oauth' in url.url_name,
},
{
'label': _('Account history'),
'url': reverse('control:user.settings.history'),
'active': 'user.settings.history' in url.url_name,
},
]
},
]
if has_staff_session:
nav.append({
'label': _('Users'),
'url': reverse('control:users'),
'active': False,
'icon': 'user',
'children': [
{
'label': _('All users'),
'url': reverse('control:users'),
'active': ('users' in url.url_name),
},
{
'label': _('Admin sessions'),
'url': reverse('control:user.sudo.list'),
'active': ('sudo' in url.url_name),
},
]
})
nav.append({
'label': _('Global settings'),
'url': reverse('control:global.settings'),
'active': False,
'icon': 'wrench',
'children': [
{
'label': _('Settings'),
'url': reverse('control:global.settings'),
'active': (url.url_name == 'global.settings'),
},
{
'label': _('Update check'),
'url': reverse('control:global.update'),
'active': (url.url_name == 'global.update'),
},
]
})
merge_in(nav, sorted(
sum((list(a[1]) for a in nav_global.send(request, request=request)), []),
key=lambda r: r['label']
))
return nav
def get_organizer_navigation(request):
url = request.resolver_match
nav = [
{
'label': _('Events'),
'url': reverse('control:organizer', kwargs={
'organizer': request.organizer.slug
}),
'active': url.url_name == 'organizer',
'icon': 'calendar',
},
]
if 'can_change_organizer_settings' in request.orgapermset:
nav.append({
'label': _('Settings'),
'url': reverse('control:organizer.edit', kwargs={
'organizer': request.organizer.slug
}),
'icon': 'wrench',
'children': [
{
'label': _('General'),
'url': reverse('control:organizer.edit', kwargs={
'organizer': request.organizer.slug
}),
'active': url.url_name == 'organizer.edit',
},
{
'label': _('Display'),
'url': reverse('control:organizer.display', kwargs={
'organizer': request.organizer.slug
}),
'active': url.url_name == 'organizer.display',
},
]
})
if 'can_change_teams' in request.orgapermset:
nav.append({
'label': _('Teams'),
'url': reverse('control:organizer.teams', kwargs={
'organizer': request.organizer.slug
}),
'active': 'organizer.team' in url.url_name,
'icon': 'group',
})
merge_in(nav, sorted(
sum((list(a[1]) for a in nav_organizer.send(request.organizer, request=request, organizer=request.organizer)),
[]),
key=lambda r: r['label']
))
return nav
def merge_in(nav, newnav):
for item in newnav:
if 'parent' in item:
parents = [n for n in nav if n['url'] == item['parent']]
if parents:
parents[0]['children'].append(item)
else:
nav.append(item)

View File

@@ -8,6 +8,7 @@
{% csrf_token %} {% csrf_token %}
{% bootstrap_field form.email %} {% bootstrap_field form.email %}
{% bootstrap_field form.password %} {% bootstrap_field form.password %}
{% if form.keep_logged_in %} {% if form.keep_logged_in %}
{% bootstrap_field form.keep_logged_in %} {% bootstrap_field form.keep_logged_in %}
{% endif %} {% endif %}

View File

@@ -59,138 +59,125 @@
data-payment-weekdays-disabled="{{ js_payment_weekdays_disabled }}" data-payment-weekdays-disabled="{{ js_payment_weekdays_disabled }}"
data-select2-locale="{{ select2locale }}" data-longdateformat="{{ js_long_date_format }}" class="nojs"> data-select2-locale="{{ select2locale }}" data-longdateformat="{{ js_long_date_format }}" class="nojs">
<div id="wrapper"> <div id="wrapper">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation"> <nav class="navbar-static-top" role="navigation">
<div class="navbar-header"> <div class="navbar navbar-fixed navbar-inverse ">
<button type="button" class="navbar-toggle" <div class="navbar-header">
data-toggle="collapse" data-target=".navbar-nav-collapse"> <button type="button" class="navbar-toggle"
<span class="sr-only">{% trans "Toggle navigation" %}</span> data-toggle="collapse" data-target=".navbar-nav-collapse">
<span class="icon-bar"></span> <span class="sr-only">{% trans "Toggle navigation" %}</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> <span class="icon-bar"></span>
<button type="button" class="navbar-toggle navbar-events" </button>
data-toggle="collapse" data-target=".navbar-events-collapse"> <button type="button" class="navbar-toggle navbar-events"
<i class="fa fa-calendar"></i><span class="caret"></span> data-toggle="collapse" data-target=".navbar-events-collapse">
</button> <i class="fa fa-calendar"></i><span class="caret"></span>
{% if request.event %} </button>
{% if has_domain and not request.event.live %} {% if request.event %}
<form action="{% eventurl request.event "presale:event.auth" %}" method="post"
target="_blank" class="mobile-navbar-view-form visible-xs-block">
<input type="hidden" value="{{ new_session }}" name="session">
<button type="submit" class="btn btn-link navbar-toggle">
<i class="fa fa-eye"></i>
</button>
</form>
{% else %}
<a href="{% eventurl request.event "presale:event.index" %}" title="{% trans "Go to Shop" %}"
target="_blank" class="navbar-toggle mobile-navbar-view-link">
<i class="fa fa-eye"></i>
</a>
{% endif %}
{% endif %}
<a class="navbar-brand" href="{% url "control:index" %}">
<img src="{% static "pretixbase/img/pretix-icon.svg" %}" />
{{ settings.PRETIX_INSTANCE_NAME }}
</a>
</div>
<ul class="nav navbar-nav navbar-top-links navbar-left hidden-xs">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-calendar"></i>
<span class="event-name">{{ request.event }}</span>
<span class="caret"></span></a>
<ul class="dropdown-menu event-dropdown" role="menu" data-event-typeahead
data-source="{% url "control:events.typeahead" %}">
<li class="query-holder">
<div class="form-box">
<input type="text" class="form-control"
placeholder="{% trans "Search for events" %}"
data-typeahead-query>
</div>
</li>
</ul>
</li>
{% if request.event %}
<li>
{% if has_domain and not request.event.live %} {% if has_domain and not request.event.live %}
<form action="{% eventurl request.event "presale:event.auth" %}" method="post" target="_blank"> <form action="{% eventurl request.event "presale:event.auth" %}" method="post"
target="_blank" class="mobile-navbar-view-form visible-xs-block">
<input type="hidden" value="{{ new_session }}" name="session"> <input type="hidden" value="{{ new_session }}" name="session">
<button type="submit" class="btn btn-link" id="button-shop"> <button type="submit" class="btn btn-link navbar-toggle">
<i class="fa fa-eye"></i> {% trans "Go to shop" %} <i class="fa fa-eye"></i>
</button> </button>
</form> </form>
{% else %} {% else %}
<a href="{% eventurl request.event "presale:event.index" %}" title="{% trans "Go to Shop" %}" target="_blank"> <a href="{% eventurl request.event "presale:event.index" %}" title="{% trans "Go to Shop" %}"
<i class="fa fa-eye"></i> {% trans "Go to shop" %} target="_blank" class="navbar-toggle mobile-navbar-view-link">
<i class="fa fa-eye"></i>
</a> </a>
{% endif %} {% endif %}
</li> {% endif %}
{% endif %} <a class="navbar-brand" href="{% url "control:index" %}">
</ul> <img src="{% static "pretixbase/img/pretix-icon.svg" %}" />
<ul class="nav navbar-nav navbar-top-links navbar-right"> {{ settings.PRETIX_INSTANCE_NAME }}
{% for nav in nav_topbar %} </a>
<li {% if nav.children %}class="dropdown"{% endif %}> </div>
<a href="{{ nav.url }}" title="{{ nav.title }}" {% if nav.active %}class="active"{% endif %} <ul class="nav navbar-nav navbar-top-links navbar-left hidden-xs">
{% if nav.children %}class="dropdown-toggle" data-toggle="dropdown"{% endif %}> {% if request.event %}
{% if nav.icon %} <li>
<span class="fa fa-{{ nav.icon }}"></span> {% if has_domain and not request.event.live %}
<span class="visible-xs-inline">{{ nav.label }}</span> <form action="{% eventurl request.event "presale:event.auth" %}" method="post" target="_blank">
<input type="hidden" value="{{ new_session }}" name="session">
<button type="submit" class="btn btn-link" id="button-shop">
<i class="fa fa-eye"></i> {% trans "Go to shop" %}
</button>
</form>
{% else %} {% else %}
{{ nav.label }} <a href="{% eventurl request.event "presale:event.index" %}" title="{% trans "Go to Shop" %}" target="_blank">
<i class="fa fa-eye"></i> {% trans "Go to shop" %}
</a>
{% endif %} {% endif %}
</a> </li>
{% if nav.children %} {% endif %}
<ul class="dropdown-menu" role="menu"> </ul>
{% for item in nav.children %} <ul class="nav navbar-nav navbar-top-links navbar-right">
<li> {% for nav in nav_topbar %}
<a href="{{ item.url }}" <li {% if nav.children %}class="dropdown"{% endif %}>
{% if item.active %}class="active"{% endif %}> <a href="{{ nav.url }}" title="{{ nav.title }}" {% if nav.active %}class="active"{% endif %}
{% if item.icon %} {% if nav.children %}class="dropdown-toggle" data-toggle="dropdown"{% endif %}>
<span class="fa fa-{{ item.icon }}"></span> {% if nav.icon %}
{% endif %} <span class="fa fa-{{ nav.icon }}"></span>
{{ item.label|safe }} <span class="visible-xs-inline">{{ nav.label }}</span>
</a> {% else %}
</li> {{ nav.label }}
{% endfor %} {% endif %}
</ul> </a>
{% endif %} {% if nav.children %}
</li> <ul class="dropdown-menu" role="menu">
{% endfor %} {% for item in nav.children %}
<li>
<a href="{{ item.url }}"
{% if item.active %}class="active"{% endif %}>
{% if item.icon %}
<span class="fa fa-{{ item.icon }}"></span>
{% endif %}
{{ item.label|safe }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
{% if request.user.is_staff and not staff_session %} {% if request.user.is_staff and not staff_session %}
<li>
<form action="{% url 'control:user.sudo' %}?next={{ request.path|urlencode }}" method="post">
{% csrf_token %}
<button type="submit" class="btn btn-link" id="button-sudo">
<i class="fa fa-id-card"></i> {% trans "Admin mode" %}
</button>
</form>
</li>
{% elif request.user.is_staff and staff_session %}
<li>
<a href="{% url 'control:user.sudo.stop' %}" class="danger">
<i class="fa fa-id-card"></i> {% trans "End admin session" %}
</a>
</li>
{% endif %}
{% if warning_update_available %}
<li>
<a href="{% url 'control:global.update' %}" class="danger">
<i class="fa fa-bell"></i>
</a>
</li>
{% endif %}
<li> <li>
<form action="{% url 'control:user.sudo' %}?next={{ request.path|urlencode }}" method="post"> <a href="{% url 'control:user.settings' %}" title="{% trans "Account Settings" %}" >
{% csrf_token %} <i class="fa fa-user"></i> {{ request.user.get_full_name }}
<button type="submit" class="btn btn-link" id="button-sudo">
<i class="fa fa-id-card"></i> {% trans "Admin mode" %}
</button>
</form>
</li>
{% elif request.user.is_staff and staff_session %}
<li>
<a href="{% url 'control:user.sudo.stop' %}" class="danger">
<i class="fa fa-id-card"></i> {% trans "End admin session" %}
</a> </a>
</li> </li>
{% endif %}
{% if warning_update_available %}
<li> <li>
<a href="{% url 'control:global.update' %}" class="danger"> <a href="{% url 'control:auth.logout' %}" title="{% trans "Log out" %}">
<i class="fa fa-bell"></i> <i class="fa fa-sign-out"></i>
<span class="visible-xs-inline">{% trans "Log out" %}</span>
</a> </a>
</li> </li>
{% endif %} </ul>
<li> </div>
<a href="{% url 'control:user.settings' %}" title="{% trans "Account Settings" %}" >
<i class="fa fa-user"></i> {{ request.user.get_full_name }}
</a>
</li>
<li>
<a href="{% url 'control:auth.logout' %}" title="{% trans "Log out" %}">
<i class="fa fa-sign-out"></i>
<span class="visible-xs-inline">{% trans "Log out" %}</span>
</a>
</li>
</ul>
<div class="navbar-default sidebar" role="navigation"> <div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-events-collapse navbar-collapse hidden-sm hidden-md hidden-lg mobile-event-dropdown"> <div class="sidebar-nav navbar-events-collapse navbar-collapse hidden-sm hidden-md hidden-lg mobile-event-dropdown">
<ul class="nav" data-event-typeahead data-source="{% url "control:events.typeahead" %}"> <ul class="nav" data-event-typeahead data-source="{% url "control:events.typeahead" %}">
@@ -204,59 +191,37 @@
</ul> </ul>
</div> </div>
<div class="sidebar-nav navbar-nav-collapse navbar-collapse"> <div class="sidebar-nav navbar-nav-collapse navbar-collapse">
<div class="dropdown context-selector">
{% if request.event %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-calendar fa-fw"></i>
<span class="event-name">{{ request.event }}</span>
<span class="caret"></span></a>
{% elif request.organizer %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-group fa-fw"></i>
<span class="event-name">{{ request.organizer }}</span>
<span class="caret"></span></a>
{% else %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-user fa-fw"></i>
<span class="event-name">{{ request.user }}</span>
<span class="caret"></span></a>
{% endif %}
<ul class="dropdown-menu event-dropdown" role="menu" data-event-typeahead
data-source="{% url "control:nav.typeahead" %}">
<li class="query-holder">
<div class="form-box">
<input type="text" class="form-control"
placeholder="{% trans "Search for events" %}"
data-typeahead-query>
</div>
</li>
</ul>
</div>
<ul class="nav" id="side-menu"> <ul class="nav" id="side-menu">
{% block nav %} {% block nav %}
<li> {% for nav in nav_items %}
<a href="{% url 'control:index' %}" {% if url_name == "index" %}class="active"{% endif %}>
<i class="fa fa-dashboard fa-fw"></i>
{% trans "Dashboard" %}
</a>
</li>
{% if staff_session %}
<li>
<a href="{% url 'control:global.settings' %}"
{% if "global.settings" in url_name %}class="active"{% endif %}>
<i class="fa fa-wrench fa-fw"></i>
{% trans "Global settings" %}
</a>
</li>
{% endif %}
<li>
<a href="{% url 'control:events' %}" {% if "events" in url_name %}class="active"{% endif %}>
<i class="fa fa-calendar fa-fw"></i>
{% trans "Events" %}
</a>
</li>
<li>
<a href="{% url 'control:organizers' %}" {% if "organizer" in url_name %}class="active"{% endif %}>
<i class="fa fa-users fa-fw"></i>
{% trans "Organizers" %}
</a>
</li>
<li>
<a href="{% url 'control:search.orders' %}"
{% if url_name == "search.orders" %}class="active"{% endif %}>
<i class="fa fa-search fa-fw"></i>
{% trans "Order search" %}
</a>
</li>
{% if staff_session %}
<li>
<a href="{% url 'control:users' %}"
{% if "users" in url_name %}class="active"{% endif %}>
<i class="fa fa-user fa-fw"></i>
{% trans "Users" %}
</a>
</li>
<li>
<a href="{% url 'control:user.sudo.list' %}"
{% if "sudo" in url_name %}class="active"{% endif %}>
<i class="fa fa-id-card fa-fw"></i>
{% trans "Admin sessions" %}
</a>
</li>
{% endif %}
{% for nav in nav_global %}
<li> <li>
<a href="{{ nav.url }}" {% if nav.active %}class="active"{% endif %} <a href="{{ nav.url }}" {% if nav.active %}class="active"{% endif %}
{% if nav.children %}class="has-children"{% endif %}> {% if nav.children %}class="has-children"{% endif %}>

View File

@@ -7,73 +7,113 @@
{% 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"> <div class="panel-body">
{% bootstrap_field filter_form.status layout='inline' %} <dl class="dl-horizontal dl-left">
<dt>{% trans "Products" %}</dt>
<dd>
{% if checkinlist.all_products %}
{% trans "All" %}
{% else %}
{{ checkinlist.limit_products.all|join:"<br>" }}
{% endif %}
</dd>
<dt>{% trans "Orders" %}</dt>
<dd>{% if checkinlist.include_pending %}{% trans "Pending and paid" %}{% else %}{% trans "Only paid orders" %}{% endif %}</dd>
{% if checkinlist.subevent %}
<dt>{% trans "Date" context "subevent" %}</dt>
<dd>{{ checkinlist.subevent }}</dd>
{% endif %}
</dl>
</div> </div>
<div class="col-md-3 col-sm-6 col-xs-12"> </div>
{% bootstrap_field filter_form.item layout='inline' %} <div class="panel panel-default">
</div> <form class="panel-body row filter-form" action="" method="get">
<div class="col-md-2 col-sm-6 col-xs-12"> <div class="col-md-4 col-sm-6 col-xs-12">
<button class="btn btn-primary btn-block" type="submit"> {% bootstrap_field filter_form.user layout='inline' %}
<span class="fa fa-filter"></span> </div>
<span class="hidden-md"> <div class="col-md-3 col-sm-6 col-xs-12">
{% bootstrap_field filter_form.status layout='inline' %}
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
{% bootstrap_field filter_form.item layout='inline' %}
</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 +121,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 +157,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 %}

View File

@@ -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 %}

View File

@@ -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">

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -2,152 +2,3 @@
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load staticfiles %}
{% block title %}{{ request.event.name }}{% endblock %} {% block title %}{{ request.event.name }}{% endblock %}
{% block nav %}
<li>
<a href="{% url 'control:event.index' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if url_name == "event.index" %}class="active"{% endif %}>
<i class="fa fa-dashboard fa-fw"></i>
{% trans "Event dashboard" %}
</a>
</li>
{% if 'can_change_event_settings' in request.eventpermset %}
<li>
<a href="{% url 'control:event.settings' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if is_event_settings or "event.settings" == url_name or "event.settings." in url_name %}class="active"{% endif %}>
<i class="fa fa-wrench fa-fw"></i>
{% trans "Settings" %}
</a>
</li>
{% if request.event.has_subevents %}
<li>
<a href="{% url 'control:event.subevents' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.subevent" in url_name %}class="active"{% endif %}>
<i class="fa fa-calendar fa-fw"></i>
{% trans "Dates" context "subevent" %}
</a>
</li>
{% endif %}
{% endif %}
{% if 'can_change_items' in request.eventpermset %}
<li>
<a href="{% url 'control:event.items' organizer=request.event.organizer.slug event=request.event.slug %}"
class="has-children">
<i class="fa fa-ticket fa-fw"></i>
{% trans "Products" %}
</a>
<a href="#" class="arrow">
<span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
<li>
<a href="{% url 'control:event.items' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.items" == url_name or "event.item." in url_name or "event.items.add" == url_name or url_name == "event.item" %}class="active"{% endif %}>
{% trans "Products" %}</a>
</li>
<li>
<a href="{% url 'control:event.items.quotas' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.items.quotas" in url_name %}class="active"{% endif %}>
{% trans "Quotas" %}
</a>
</li>
<li>
<a href="{% url 'control:event.items.categories' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.items.categories" in url_name %}class="active"{% endif %}>
{% trans "Categories" %}
</a>
</li>
<li>
<a href="{% url 'control:event.items.questions' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.items.questions" in url_name %}class="active"{% endif %}>
{% trans "Questions" %}
</a>
</li>
</ul>
</li>
{% endif %}
{% if 'can_view_orders' in request.eventpermset %}
<li>
<a href="{% url 'control:event.orders' organizer=request.event.organizer.slug event=request.event.slug %}"
class="has-children">
<i class="fa fa-shopping-cart fa-fw"></i>
{% trans "Orders" %}
</a>
<a href="#" class="arrow">
<span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
<li>
<a href="{% url 'control:event.orders' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if url_name == "event.orders" or "event.order." in url_name or url_name == "event.order" %}class="active"{% endif %}>
{% trans "All orders" %}
</a>
</li>
<li>
<a href="{% url 'control:event.orders.overview' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if url_name == "event.orders.overview" %}class="active"{% endif %}>
{% trans "Overview" %}
</a>
</li>
<li>
<a href="{% url 'control:event.orders.export' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if url_name == "event.orders.export" %}class="active"{% endif %}>
{% trans "Export" %}
</a>
</li>
<li>
<a href="{% url 'control:event.orders.waitinglist' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if url_name == "event.orders.waitinglist" %}class="active"{% endif %}>
{% trans "Waiting list" %}
</a>
</li>
</ul>
</li>
{% endif %}
{% if 'can_view_vouchers' in request.eventpermset %}
<li>
<a href="{% url 'control:event.vouchers' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if url_name == "event.voucher" %}class="active"{% endif %}>
<i class="fa fa-tags fa-fw"></i>
{% trans "Vouchers" %}
</a>
</li>
{% endif %}
{% if 'can_view_orders' in request.eventpermset %}
<li>
<a href="{% url 'control:event.orders.checkinlists' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.orders.checkin" in url_name %}class="active"{% endif %}>
<i class="fa fa-check-square-o fa-fw"></i>
{% trans "Check-in lists" %}
</a>
</li>
{% endif %}
{% for nav in nav_event %}
<li>
<a href="{{ nav.url }}" {% if nav.active %}class="active"{% endif %}
{% if nav.children %}class="has-children"{% endif %}>
{% if nav.icon and "." in nav.icon %}
<img src="{% static nav.icon %}" class="fa-img">
{% elif nav.icon %}
<i class="fa fa-{{ nav.icon }} fa-fw"></i>
{% endif %}
{{ nav.label }}
</a>
{% if nav.children %}
<a href="#" class="arrow">
<span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
{% for item in nav.children %}
<li>
<a href="{{ item.url }}"
{% if item.active %}class="active"{% endif %}>
{{ item.label }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
{% endblock %}

View File

@@ -2,81 +2,89 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block content %} {% block content %}
<h1>{% trans "Delete event" %}</h1> <div class="panel panel-default">
{% if request.event.allow_delete %} <div class="panel-heading">
{% bootstrap_form_errors form layout="inline" %} <h2 class="panel-title">{% trans "Delete event" %}</h2>
<p> </div>
{% blocktrans trimmed %} <div class="panel-body">
This operation will destroy your event including all configuration, products, quotas, questions, {% if request.event.allow_delete %}
vouchers, lists, etc. {% bootstrap_form_errors form layout="inline" %}
{% endblocktrans %}
</p>
<p><strong>
{% blocktrans trimmed %}
This operation is irreversible and there is no way to bring your data back.
{% endblocktrans %}
</strong></p>
<form action="" method="post">
{% csrf_token %}
<p> <p>
{% blocktrans trimmed with slug=request.event.slug %} {% blocktrans trimmed %}
To confirm you really want this, please type out the event's short name ("{{ slug }}") here: This operation will destroy your event including all configuration, products, quotas, questions,
vouchers, lists, etc.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
{% bootstrap_field form.slug layout="inline" %} <p><strong>
<p> {% blocktrans trimmed %}
{% blocktrans trimmed with slug=request.event.slug %} This operation is irreversible and there is no way to bring your data back.
Also, to make sure it's really you, please enter your user password here:
{% endblocktrans %} {% endblocktrans %}
</p> </strong></p>
{% bootstrap_field form.user_pw layout="inline" %} <form action="" method="post">
<div class="form-group submit-group">
<button type="submit" class="btn btn-danger btn-save">
{% trans "Delete" %}
</button>
</div>
</form>
{% else %}
<p>
{% trans "Your event can not be deleted as it already contains orders." %}
</p>
<p>
{% blocktrans trimmed %}
pretix does not allow deleting orders once they have been placed in order to be audit-proof and
trustable by financial authorities.
{% endblocktrans %}
</p>
{% if request.event.live %}
<p>
{% trans "You can instead take your shop offline. This will hide it from everyone except from the organizer teams you configured to have access to the event." %}
</p>
<form action="{% url "control:event.live" event=request.event.slug organizer=request.organizer.slug %}"
method="post">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="live" value="false"> <p>
{% blocktrans trimmed with slug=request.event.slug %}
To confirm you really want this, please type out the event's short name ("{{ slug }}") here:
{% endblocktrans %}
</p>
{% bootstrap_field form.slug layout="inline" %}
<p>
{% blocktrans trimmed with slug=request.event.slug %}
Also, to make sure it's really you, please enter your user password here:
{% endblocktrans %}
</p>
{% bootstrap_field form.user_pw layout="inline" %}
<div class="form-group submit-group"> <div class="form-group submit-group">
<a href="{% url "control:event.shredder.start" event=request.event.slug organizer=request.organizer.slug %}" class="btn btn-danger btn-save"> <button type="submit" class="btn btn-danger btn-save">
<span class="fa fa-eraser"></span> {% trans "Delete" %}
{% trans "Delete personal data" %}
</a>
<button type="submit" class="btn btn-primary btn-save">
<span class="fa fa-power-off"></span>
{% trans "Go offline" %}
</button> </button>
</div> </div>
</form> </form>
{% else %} {% else %}
<p> <p>
{% trans "However, since your shop is offline, it is only visible to the organizing team according to the permissions you configured." %} {% trans "Your event can not be deleted as it already contains orders." %}
</p>
<p>
{% blocktrans trimmed %}
pretix does not allow deleting orders once they have been placed in order to be audit-proof and
trustable by financial authorities.
{% endblocktrans %}
</p>
{% if request.event.live %}
<p>
{% trans "You can instead take your shop offline. This will hide it from everyone except from the organizer teams you configured to have access to the event." %}
</p>
<form action="{% url "control:event.live" event=request.event.slug organizer=request.organizer.slug %}"
method="post">
{% csrf_token %}
<input type="hidden" name="live" value="false">
<div class="form-group submit-group">
<a href="{% url "control:event.shredder.start" event=request.event.slug organizer=request.organizer.slug %}"
class="btn btn-danger btn-save">
<span class="fa fa-eraser"></span>
{% trans "Delete personal data" %}
</a>
<button type="submit" class="btn btn-primary btn-save">
<span class="fa fa-power-off"></span>
{% trans "Go offline" %}
</button>
</div>
</form>
{% else %}
<p>
{% trans "However, since your shop is offline, it is only visible to the organizing team according to the permissions you configured." %}
<div class="form-group submit-group"> <div class="form-group submit-group">
<a href="{% url "control:event.shredder.start" event=request.event.slug organizer=request.organizer.slug %}" class="btn btn-danger btn-save"> <a href="{% url "control:event.shredder.start" event=request.event.slug organizer=request.organizer.slug %}"
class="btn btn-danger btn-save">
<span class="fa fa-eraser"></span> <span class="fa fa-eraser"></span>
{% trans "Delete personal data" %} {% trans "Delete personal data" %}
</a> </a>
</div> </div>
</p> </p>
{% endif %}
{% endif %} {% endif %}
{% endif %} </div>
</div>
{% endblock %} {% endblock %}

View File

@@ -6,22 +6,30 @@
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Event page" %}</legend> <div class="panel-heading">
{% bootstrap_field form.logo_image layout="control" %} <legend>{% trans "Event page" %}</legend>
{% bootstrap_field form.frontpage_text layout="control" %} </div>
{% bootstrap_field form.show_variations_expanded layout="control" %} <div class="panel-body">
{% if form.frontpage_subevent_ordering %} {% bootstrap_field form.logo_image layout="control" %}
{% bootstrap_field form.frontpage_subevent_ordering layout="control" %} {% bootstrap_field form.frontpage_text layout="control" %}
{% endif %} {% bootstrap_field form.show_variations_expanded layout="control" %}
{% if form.frontpage_subevent_ordering %}
{% bootstrap_field form.frontpage_subevent_ordering layout="control" %}
{% endif %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Shop design" %}</legend> <div class="panel-heading">
{% url "control:organizer.display" organizer=request.organizer.slug as org_url %} <legend>{% trans "Shop design" %}</legend>
{% propagated request.event org_url "primary_color" "primary_font" %} </div>
{% bootstrap_field form.primary_color layout="control" %} <div class="panel-body">
{% bootstrap_field form.primary_font layout="control" %} {% url "control:organizer.display" organizer=request.organizer.slug as org_url %}
{% endpropagated %} {% propagated request.event org_url "primary_color" "primary_font" %}
{% bootstrap_field form.primary_color layout="control" %}
{% bootstrap_field form.primary_font layout="control" %}
{% endpropagated %}
</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">

View File

@@ -5,16 +5,20 @@
{% load staticfiles %} {% load staticfiles %}
{% block title %}{{ request.event.name }}{% endblock %} {% block title %}{{ request.event.name }}{% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default">
{{ request.event.name }} <div class="panel-body">
<small> <h1>
{% if request.event.has_subevents %} {{ request.event.name }}
{% trans "Event series" %} <small>
{% else %} {% if request.event.has_subevents %}
{{ request.event.get_date_range_display }} {% trans "Event series" %}
{% endif %} {% else %}
</small> {{ request.event.get_date_range_display }}
</h1> {% endif %}
</small>
</h1>
</div>
</div>
{% if actions|length > 0 %} {% if actions|length > 0 %}
<div class="panel panel-danger"> <div class="panel panel-danger">
<div class="panel-heading"> <div class="panel-heading">
@@ -71,7 +75,6 @@
{% endfor %} {% endfor %}
</div> </div>
<p>&nbsp;</p>
<div class="panel panel-default items"> <div class="panel panel-default items">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"> <h3 class="panel-title">

View File

@@ -5,33 +5,38 @@
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Invoicing" %}</legend> <div class="panel-heading">
{% bootstrap_field form.invoice_address_asked layout="control" %} <legend>{% trans "Invoicing" %}</legend>
{% bootstrap_field form.invoice_address_required layout="control" %} </div>
{% bootstrap_field form.invoice_name_required layout="control" %} <div class="panel-body">
{% bootstrap_field form.invoice_generate layout="control" %} {% bootstrap_field form.invoice_address_asked layout="control" %}
{% bootstrap_field form.invoice_email_attachment layout="control" %} {% bootstrap_field form.invoice_address_required layout="control" %}
{% bootstrap_field form.invoice_address_vatid layout="control" %} {% bootstrap_field form.invoice_name_required layout="control" %}
{% bootstrap_field form.invoice_numbers_consecutive layout="control" %} {% bootstrap_field form.invoice_generate layout="control" %}
{% bootstrap_field form.invoice_numbers_prefix layout="control" %} {% bootstrap_field form.invoice_email_attachment layout="control" %}
{% bootstrap_field form.invoice_renderer layout="control" %} {% bootstrap_field form.invoice_address_vatid layout="control" %}
{% bootstrap_field form.invoice_language layout="control" %} {% bootstrap_field form.invoice_numbers_consecutive layout="control" %}
{% bootstrap_field form.invoice_include_free layout="control" %} {% bootstrap_field form.invoice_numbers_prefix layout="control" %}
{% bootstrap_field form.invoice_attendee_name layout="control" %} {% bootstrap_field form.invoice_renderer layout="control" %}
{% bootstrap_field form.invoice_address_from layout="control" %} {% bootstrap_field form.invoice_language layout="control" %}
{% bootstrap_field form.invoice_introductory_text layout="control" %} {% bootstrap_field form.invoice_include_free layout="control" %}
{% bootstrap_field form.invoice_additional_text layout="control" %} {% bootstrap_field form.invoice_attendee_name layout="control" %}
{% bootstrap_field form.invoice_footer_text layout="control" %} {% bootstrap_field form.invoice_address_from layout="control" %}
{% bootstrap_field form.invoice_logo_image layout="control" %} {% bootstrap_field form.invoice_introductory_text layout="control" %}
{% bootstrap_field form.invoice_additional_text layout="control" %}
{% bootstrap_field form.invoice_footer_text layout="control" %}
{% bootstrap_field form.invoice_logo_image layout="control" %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-default btn-lg" name="preview" value="preview"
formtarget="_blank">
{% trans "Save and show preview" %}
</button>
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</div>
</fieldset> </fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-default btn-lg" name="preview" value="preview" formtarget="_blank">
{% trans "Save and show preview" %}
</button>
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form> </form>
{% endblock %} {% endblock %}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -6,56 +6,61 @@
mail-preview-url="{% url "control:event.settings.mail.preview" event=request.event.slug organizer=request.event.organizer.slug %}"> mail-preview-url="{% url "control:event.settings.mail.preview" event=request.event.slug organizer=request.event.organizer.slug %}">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "E-mail settings" %}</legend> <div class="panel-heading">
{% bootstrap_field form.mail_prefix layout="control" %} <legend>{% trans "E-mail settings" %}</legend>
{% bootstrap_field form.mail_from layout="control" %} </div>
{% bootstrap_field form.mail_text_signature layout="control" %} <div class="panel-body">
{% bootstrap_field form.mail_bcc layout="control" %} {% bootstrap_field form.mail_prefix layout="control" %}
</fieldset> {% bootstrap_field form.mail_from layout="control" %}
<fieldset> {% bootstrap_field form.mail_text_signature layout="control" %}
<legend>{% trans "E-mail content" %}</legend> {% bootstrap_field form.mail_bcc layout="control" %}
<div class="panel-group" id="questions_group">
{% blocktrans asvar title_placed_order %}Placed order{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_placed" title=title_placed_order items="mail_text_order_placed" %}
{% blocktrans asvar title_paid_order %}Paid order{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_paid" title=title_paid_order items="mail_text_order_paid" %}
{% blocktrans asvar title_free_order %}Free order{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_free" title=title_free_order items="mail_text_order_free" %}
{% blocktrans asvar title_resend_link %}Resend link{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="resend_link" title=title_resend_link items="mail_text_resend_link,mail_text_resend_all_links" %}
{% blocktrans asvar title_order_changed %}Order changed{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_changed" title=title_order_changed items="mail_text_order_changed" %}
{% blocktrans asvar title_payment_reminder %}Payment reminder{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_expirew" title=title_payment_reminder items="mail_days_order_expire_warning,mail_text_order_expire_warning" exclude="mail_days_order_expire_warning" %}
{% blocktrans asvar title_waiting_list_notification %}Waiting list notification{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="waiting_list" title=title_waiting_list_notification items="mail_text_waiting_list" %}
{% blocktrans asvar title_order_canceled %}Order canceled{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_canceled" title=title_order_canceled items="mail_text_order_canceled" %}
{% blocktrans asvar title_order_custom_mail %}Order custom mail{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="custom_mail" title=title_order_custom_mail items="mail_text_order_custom_mail" %}
{% blocktrans asvar title_download_tickets_reminder %}Reminder to download tickets{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="ticket_reminder" title=title_download_tickets_reminder items="mail_days_download_reminder,mail_text_download_reminder" exclude="mail_days_download_reminder" %}
</div> </div>
</fieldset> </fieldset>
<fieldset> <div class="" id="questions_group">
<legend>{% trans "SMTP settings" %}</legend> {% blocktrans asvar title_placed_order %}Placed order{% endblocktrans %}
{% bootstrap_field form.smtp_use_custom layout="control" %} {% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_placed" title=title_placed_order items="mail_text_order_placed" %}
{% bootstrap_field form.smtp_host layout="control" %}
{% bootstrap_field form.smtp_port layout="control" %} {% blocktrans asvar title_paid_order %}Paid order{% endblocktrans %}
{% bootstrap_field form.smtp_username layout="control" %} {% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_paid" title=title_paid_order items="mail_text_order_paid" %}
{% bootstrap_field form.smtp_password layout="control" %}
{% bootstrap_field form.smtp_use_tls layout="control" %} {% blocktrans asvar title_free_order %}Free order{% endblocktrans %}
{% bootstrap_field form.smtp_use_ssl layout="control" %} {% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_free" title=title_free_order items="mail_text_order_free" %}
{% blocktrans asvar title_resend_link %}Resend link{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="resend_link" title=title_resend_link items="mail_text_resend_link,mail_text_resend_all_links" %}
{% blocktrans asvar title_order_changed %}Order changed{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_changed" title=title_order_changed items="mail_text_order_changed" %}
{% blocktrans asvar title_payment_reminder %}Payment reminder{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_expirew" title=title_payment_reminder items="mail_days_order_expire_warning,mail_text_order_expire_warning" exclude="mail_days_order_expire_warning" %}
{% blocktrans asvar title_waiting_list_notification %}Waiting list notification{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="waiting_list" title=title_waiting_list_notification items="mail_text_waiting_list" %}
{% blocktrans asvar title_order_canceled %}Order canceled{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="order_canceled" title=title_order_canceled items="mail_text_order_canceled" %}
{% blocktrans asvar title_order_custom_mail %}Order custom mail{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="custom_mail" title=title_order_custom_mail items="mail_text_order_custom_mail" %}
{% blocktrans asvar title_download_tickets_reminder %}Reminder to download tickets{% endblocktrans %}
{% include "pretixcontrol/event/mail_settings_fragment.html" with pid="ticket_reminder" title=title_download_tickets_reminder items="mail_days_download_reminder,mail_text_download_reminder" exclude="mail_days_download_reminder" %}
</div>
<fieldset class="panel panel-default">
<div class="panel-heading">
<legend>{% trans "SMTP settings" %}</legend>
</div>
<div class="panel-body">
{% bootstrap_field form.smtp_use_custom layout="control" %}
{% bootstrap_field form.smtp_host layout="control" %}
{% bootstrap_field form.smtp_port layout="control" %}
{% bootstrap_field form.smtp_username layout="control" %}
{% bootstrap_field form.smtp_password layout="control" %}
{% bootstrap_field form.smtp_use_tls layout="control" %}
{% bootstrap_field form.smtp_use_ssl 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">

View File

@@ -4,7 +4,10 @@
<details class="panel panel-default"> <details class="panel panel-default">
<summary class="panel-heading"> <summary class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<strong>{% trans title %}</strong> <span>
{% trans "E-mail content:" %}
<strong>{% trans title %}</strong>
</span>
<i class="fa fa-angle-down collapse-indicator"></i> <i class="fa fa-angle-down collapse-indicator"></i>
</h4> </h4>
</summary> </summary>

View File

@@ -4,8 +4,10 @@
{% block inside %} {% block inside %}
<form action="" method="post" class="form-horizontal form-plugins"> <form action="" method="post" class="form-horizontal form-plugins">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Payment providers" %}</legend> <div class="panel-heading">
<legend>{% trans "Payment providers" %}</legend>
</div>
<table class="table table-payment-providers"> <table class="table table-payment-providers">
<tbody> <tbody>
{% for provider in providers %} {% for provider in providers %}
@@ -28,13 +30,13 @@
</td> </td>
<td class="text-right"> <td class="text-right">
<a href="{% url 'control:event.settings.payment.provider' event=request.event.slug organizer=request.organizer.slug provider=provider.identifier %}" <a href="{% url 'control:event.settings.payment.provider' event=request.event.slug organizer=request.organizer.slug provider=provider.identifier %}"
class="btn btn-default"> class="btn btn-default">
<span class="fa fa-cog"></span> <span class="fa fa-cog"></span>
{% trans "Settings" %} {% trans "Settings" %}
</a> </a>
</td> </td>
</tr> </tr>
{% empty %} {% empty %}
<tr> <tr>
<td colspan="3"> <td colspan="3">
{% trans "There are no payment providers available. Please go to the plugin settings and activate one or more payment plugins." %} {% trans "There are no payment providers available. Please go to the plugin settings and activate one or more payment plugins." %}
@@ -44,20 +46,24 @@
</tbody> </tbody>
</table> </table>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "General payment settings" %}</legend> <div class="panel-heading">
{% bootstrap_form_errors form layout="control" %} <legend>{% trans "General payment settings" %}</legend>
{% bootstrap_field form.payment_term_days layout="control" %} </div>
{% bootstrap_field form.payment_term_last layout="control" %} <div class="panel-body">
{% bootstrap_field form.payment_term_weekdays layout="control" %} {% bootstrap_form_errors form layout="control" %}
{% bootstrap_field form.payment_term_expire_automatically layout="control" %} {% bootstrap_field form.payment_term_days layout="control" %}
{% bootstrap_field form.payment_term_accept_late layout="control" %} {% bootstrap_field form.payment_term_last layout="control" %}
{% bootstrap_field form.tax_rate_default layout="control" %} {% bootstrap_field form.payment_term_weekdays layout="control" %}
{% bootstrap_field form.payment_term_expire_automatically layout="control" %}
{% bootstrap_field form.payment_term_accept_late layout="control" %}
{% bootstrap_field form.tax_rate_default layout="control" %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</div>
</fieldset> </fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form> </form>
{% endblock %} {% endblock %}

View File

@@ -4,30 +4,37 @@
{% block inside %} {% block inside %}
<form action="" method="post" class="form-horizontal form-plugins"> <form action="" method="post" class="form-horizontal form-plugins">
{% csrf_token %} {% csrf_token %}
<fieldset> <p>
<legend> <a href="{% url 'control:event.settings.payment' event=request.event.slug organizer=request.organizer.slug %}"
<a href="{% url 'control:event.settings.payment' event=request.event.slug organizer=request.organizer.slug %}" class="btn btn-default">
class="btn btn-default btn-sm btn-link"> <span class="fa fa-caret-left"></span>
<span class="fa fa-caret-left"></span> {% trans "Back" %}
{% trans "Back" %} </a>
</a> </p>
{% trans "Payment provider:" %} {{ provider.verbose_name }} <fieldset class="panel panel-default">
</legend> <div class="panel-heading">
{% bootstrap_form form layout='control' %} <legend>
{% if settings_content %}{{ settings_content|safe }}{% endif %} {% trans "Payment provider:" %} {{ provider.verbose_name }}
<p>&nbsp;</p> </legend>
<div class="alert alert-legal"> </div>
<strong>{% trans "Warning:" %}</strong> <div class="panel-body">
{% blocktrans trimmed %} {% bootstrap_form form layout='control' %}
Please note that EU Directive 2015/2366 bans surcharging payment fees for most common payment {% if settings_content %}{{ settings_content|safe }}{% endif %}
methods within the European Union. If in doubt, consult a lawyer or refrain from charging payment <p>&nbsp;</p>
fees. <div class="alert alert-legal">
{% endblocktrans %} <strong>{% trans "Warning:" %}</strong>
<br> {% blocktrans trimmed %}
{% blocktrans trimmed %} Please note that EU Directive 2015/2366 bans surcharging payment fees for most common payment
In simple terms, this means you need to pay any fees imposed by the payment providers and cannot methods within the European Union. If in doubt, consult a lawyer or refrain from charging
pass it on to your customers. payment
{% endblocktrans %} fees.
{% endblocktrans %}
<br>
{% blocktrans trimmed %}
In simple terms, this means you need to pay any fees imposed by the payment providers and cannot
pass it on to your customers.
{% endblocktrans %}
</div>
</div> </div>
</fieldset> </fieldset>
<div class="form-group submit-group"> <div class="form-group submit-group">

View File

@@ -2,78 +2,79 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inside %} {% block inside %}
<form action="" method="post" class="form-horizontal form-plugins"> <form action="" method="post" class="form-horizontal form-plugins">
{% csrf_token %} {% csrf_token %}
<fieldset> {% if "success" in request.GET %}
<legend>{% trans "Installed plugins" %}</legend> <div class="alert alert-success">
{% if "success" in request.GET %} {% trans "Your changes have been saved." %}
<div class="alert alert-success"> </div>
{% trans "Your changes have been saved." %} {% endif %}
</div> <div class="row row-plugins">
{% endif %} {% for plugin in plugins %}
<div class="row row-plugins"> <div class="col-md-6 col-sm-12">
{% for plugin in plugins %} <div class="panel panel-{% if plugin.app.compatibility_errors %}warning{% elif plugin.module in plugins_active %}success{% else %}default{% endif %}">
<div class="col-md-6 col-sm-12"> <div class="panel-heading">
<div class="panel panel-{% if plugin.app.compatibility_errors %}warning{% elif plugin.module in plugins_active %}success{% else %}default{% endif %}"> <div class="row">
<div class="panel-heading"> <div class="col-sm-8">
<div class="row"> <h3 class="panel-title">{{ plugin.name }}</h3>
<div class="col-sm-8"> </div>
<h3 class="panel-title">{{ plugin.name }}</h3> <div class="col-sm-4">
</div> {% if plugin.app.compatibility_errors %}
<div class="col-sm-4"> <button class="btn disabled btn-block btn-default"
{% if plugin.app.compatibility_errors %} disabled="disabled">{% trans "Incompatible" %}</button>
<button class="btn disabled btn-block btn-default" disabled="disabled">{% trans "Incompatible" %}</button>
{% elif plugin.restricted and not staff_session %} {% elif plugin.restricted and not staff_session %}
<button class="btn disabled btn-block btn-default" disabled="disabled">{% trans "Not available" %}</button> <button class="btn disabled btn-block btn-default"
disabled="disabled">{% trans "Not available" %}</button>
{% elif plugin.module in plugins_active %} {% elif plugin.module in plugins_active %}
<button class="btn btn-default btn-block" name="plugin:{{ plugin.module }}" value="disable">{% trans "Disable" %}</button> <button class="btn btn-default btn-block" name="plugin:{{ plugin.module }}"
{% else %} value="disable">{% trans "Disable" %}</button>
<button class="btn btn-default btn-block" name="plugin:{{ plugin.module }}" value="enable">{% trans "Enable" %}</button> {% else %}
{% endif %} <button class="btn btn-default btn-block" name="plugin:{{ plugin.module }}"
</div> value="enable">{% trans "Enable" %}</button>
{% endif %}
</div> </div>
</div> </div>
<div class="panel-body"> </div>
{% if plugin.author %} <div class="panel-body">
<p class="meta">{% blocktrans trimmed with v=plugin.version a=plugin.author %} {% if plugin.author %}
Version {{ v }} by <em>{{ a }}</em> <p class="meta">{% blocktrans trimmed with v=plugin.version a=plugin.author %}
{% endblocktrans %}</p> Version {{ v }} by <em>{{ a }}</em>
{% else %} {% endblocktrans %}</p>
<p class="meta">{% blocktrans trimmed with v=plugin.version a=plugin.author %} {% else %}
Version {{ v }} <p class="meta">{% blocktrans trimmed with v=plugin.version a=plugin.author %}
{% endblocktrans %}</p> Version {{ v }}
{% endif %} {% endblocktrans %}</p>
<p>{{ plugin.description }}</p> {% endif %}
{% if plugin.restricted and not request.user.is_staff %} <p>{{ plugin.description }}</p>
<div class="alert alert-warning"> {% if plugin.restricted and not request.user.is_staff %}
{% trans "This plugin needs to be enabled by a system administrator for your event." %} <div class="alert alert-warning">
</div> {% trans "This plugin needs to be enabled by a system administrator for your event." %}
{% endif %} </div>
{% if plugin.app.compatibility_errors %} {% endif %}
<div class="alert alert-warning"> {% if plugin.app.compatibility_errors %}
{% trans "This plugin cannot be enabled for the following reasons:" %} <div class="alert alert-warning">
<ul> {% trans "This plugin cannot be enabled for the following reasons:" %}
{% for e in plugin.app.compatibility_errors %} <ul>
<li>{{ e }}</li> {% for e in plugin.app.compatibility_errors %}
{% endfor %} <li>{{ e }}</li>
</ul> {% endfor %}
</div> </ul>
{% endif %} </div>
{% if plugin.app.compatibility_warnings %} {% endif %}
<div class="alert alert-warning"> {% if plugin.app.compatibility_warnings %}
{% trans "This plugin reports the following problems:" %} <div class="alert alert-warning">
<ul> {% trans "This plugin reports the following problems:" %}
{% for e in plugin.app.compatibility_warnings %} <ul>
<li>{{ e }}</li> {% for e in plugin.app.compatibility_warnings %}
{% endfor %} <li>{{ e }}</li>
</ul> {% endfor %}
</div> </ul>
{% endif %} </div>
</div> {% endif %}
</div> </div>
</div> </div>
{% endfor %} </div>
</div> {% endfor %}
</fieldset> </div>
</form> </form>
{% endblock %} {% endblock %}

View File

@@ -4,34 +4,37 @@
{% load formset_tags %} {% load formset_tags %}
{% block title %}{{ request.event.name }}{% endblock %} {% block title %}{{ request.event.name }}{% endblock %}
{% block content %} {% block content %}
<div class="quick-setup-step"> <div class="panel panel-default">
<div class="quick-icon"> <div class="panel-body">
<span class="fa fa-fw fa-check-circle text-success"></span> <div class="quick-setup-step">
</div> <div class="quick-icon">
<div class="quick-content"> <span class="fa fa-fw fa-check-circle text-success"></span>
</div>
<h2>{% trans "Congratulations!" %}</h2> <div class="quick-content">
<p> <h2>{% trans "Congratulations!" %}</h2>
<strong>{% trans "You just created an event!" %}</strong> <p>
</p> <strong>{% trans "You just created an event!" %}</strong>
<p> </p>
{% blocktrans trimmed %} <p>
You can scroll down and create your first ticket products quickly, or you can use the navigation {% blocktrans trimmed %}
on the left to modify the settings of your event in much more detail. You can scroll down and create your first ticket products quickly, or you can use the
{% endblocktrans %} navigation
</p> on the left to modify the settings of your event in much more detail.
<div class="clearfix"></div> {% endblocktrans %}
</p>
<div class="clearfix"></div>
</div>
</div>
</div> </div>
</div> </div>
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% csrf_token %} {% csrf_token %}
<fieldset class="quick-setup-step"> <fieldset class="panel panel-default">
<div class="quick-icon"> <div class="panel-heading">
<span class="fa fa-fw fa-ticket text-muted"></span>
</div>
<div class="quick-content">
<legend>{% trans "Create ticket types" %}</legend> <legend>{% trans "Create ticket types" %}</legend>
</div>
<div class="panel-body">
<div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}"> <div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}">
{{ formset.management_form }} {{ formset.management_form }}
{% bootstrap_formset_errors formset %} {% bootstrap_formset_errors formset %}
@@ -104,7 +107,9 @@
<strong>{% trans "Total capacity:" %}</strong> <strong>{% trans "Total capacity:" %}</strong>
<span id="total-capacity"></span> <span id="total-capacity"></span>
{% bootstrap_field form.total_quota layout="inline" field_class="sr-only" %} {% bootstrap_field form.total_quota layout="inline" field_class="sr-only" %}
<a href="#" data-toggle="tooltip" title="{% trans 'You can set a limit on the total number of tickets sold for your event, regardless of the ticket type.' %}" id="total-capacity-edit"> <a href="#" data-toggle="tooltip"
title="{% trans 'You can set a limit on the total number of tickets sold for your event, regardless of the ticket type.' %}"
id="total-capacity-edit">
<span class="fa fa-edit"></span> <span class="fa fa-edit"></span>
</a> </a>
</div> </div>
@@ -114,20 +119,19 @@
<p>&nbsp;</p> <p>&nbsp;</p>
<p class="bigger"> <p class="bigger">
{% blocktrans trimmed %} {% blocktrans trimmed %}
If you want to use more advanced features like non-admission products, product variations, custom If you want to use more advanced features like non-admission products, product variations,
quotas, add-on products or want to modify your ticket types in more detail, you can later do so custom quotas, add-on products or want to modify your ticket types in more detail, you can later
in the "Products" section in the navigation. Don't worry, you can change everything you input here. do so in the "Products" section in the navigation. Don't worry, you can change everything you
input here.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
<p>&nbsp;</p>
</div> </div>
</fieldset> </fieldset>
<fieldset class="quick-setup-step"> <fieldset class="panel panel-default">
<div class="quick-icon"> <div class="panel-heading">
<span class="fa fa-fw fa-wrench text-muted"></span>
</div>
<div class="quick-content">
<legend>{% trans "Features" %}</legend> <legend>{% trans "Features" %}</legend>
</div>
<div class="panel-body">
<p class="bigger"> <p class="bigger">
{% blocktrans trimmed %} {% blocktrans trimmed %}
We recommend that you take some time to go through the "Settings" part of your event, but if We recommend that you take some time to go through the "Settings" part of your event, but if
@@ -138,15 +142,13 @@
{% bootstrap_field form.waiting_list_enabled layout="control" label_class="sr-only" field_class="col-md-12" %} {% bootstrap_field form.waiting_list_enabled layout="control" label_class="sr-only" field_class="col-md-12" %}
{% bootstrap_field form.show_quota_left layout="control" label_class="sr-only" field_class="col-md-12" %} {% bootstrap_field form.show_quota_left layout="control" label_class="sr-only" field_class="col-md-12" %}
{% bootstrap_field form.attendee_names_required layout="control" label_class="sr-only" field_class="col-md-12" %} {% bootstrap_field form.attendee_names_required layout="control" label_class="sr-only" field_class="col-md-12" %}
<p>&nbsp;</p>
</div> </div>
</fieldset> </fieldset>
<fieldset class="quick-setup-step" id="quick-setup-step-payment"> <fieldset class="panel panel-default" id="quick-setup-step-payment">
<div class="quick-icon"> <div class="panel-heading">
<span class="fa fa-fw fa-money text-muted"></span>
</div>
<div class="quick-content">
<legend>{% trans "Payment" %}</legend> <legend>{% trans "Payment" %}</legend>
</div>
<div class="panel-body">
<p class="bigger"> <p class="bigger">
{% blocktrans trimmed %} {% blocktrans trimmed %}
pretix supports a pretix supports a
@@ -164,21 +166,20 @@
<div data-display-dependency="#id_payment_stripe__enabled"> <div data-display-dependency="#id_payment_stripe__enabled">
<div class="alert alert-info"> <div class="alert alert-info">
{% blocktrans trimmed %} {% blocktrans trimmed %}
After you saved this page, we will redirect you to Stripe to create or connect an account After you saved this page, we will redirect you to Stripe to create or connect an
account
there. Once you completed this, you will be taken back to pretix. there. Once you completed this, you will be taken back to pretix.
{% endblocktrans %} {% endblocktrans %}
</div> </div>
</div> </div>
{% endif %} {% endif %}
<p>&nbsp;</p>
</div> </div>
</fieldset> </fieldset>
<fieldset class="quick-setup-step"> <fieldset class="panel panel-default">
<div class="quick-icon"> <div class="panel-heading">
<span class="fa fa-fw fa-envelope text-muted"></span>
</div>
<div class="quick-content">
<legend>{% trans "Getting in touch with you" %}</legend> <legend>{% trans "Getting in touch with you" %}</legend>
</div>
<div class="quick-content panel-body">
<p class="bigger"> <p class="bigger">
{% blocktrans trimmed %} {% blocktrans trimmed %}
In case something goes wrong or is unclear, we strongly suggest that you provide ways for your In case something goes wrong or is unclear, we strongly suggest that you provide ways for your

View File

@@ -5,74 +5,94 @@
<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" %} <legend>{% trans "General information" %}</legend>
{% bootstrap_field form.slug layout="control" %} </div>
{% bootstrap_field form.date_from layout="control" %} <div class="panel-body">
{% bootstrap_field form.date_to layout="control" %} {% bootstrap_field form.name layout="control" %}
{% bootstrap_field form.location layout="control" %} {% bootstrap_field form.slug layout="control" %}
{% bootstrap_field form.date_admission layout="control" %} {% bootstrap_field form.date_from layout="control" %}
{% bootstrap_field form.currency layout="control" %} {% bootstrap_field form.date_to layout="control" %}
{% bootstrap_field form.is_public layout="control" %} {% bootstrap_field form.location layout="control" %}
{% bootstrap_field form.date_admission layout="control" %}
{% bootstrap_field form.currency layout="control" %}
{% bootstrap_field form.is_public layout="control" %}
{% if meta_forms %} {% if meta_forms %}
<div class="form-group metadata-group"> <div class="form-group metadata-group">
<label class="col-md-3 control-label">{% trans "Meta data" %}</label> <label class="col-md-3 control-label">{% trans "Meta data" %}</label>
<div class="col-md-9"> <div class="col-md-9">
{% for form in meta_forms %} {% for form in meta_forms %}
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<label for="{{ form.value.id_for_label }}"> <label for="{{ form.value.id_for_label }}">
{{ form.property.name }} {{ form.property.name }}
</label> </label>
</div>
<div class="col-md-8">
{% bootstrap_form form layout="inline" %}
</div>
</div> </div>
<div class="col-md-8"> {% endfor %}
{% bootstrap_form form layout="inline" %} </div>
</div>
</div>
{% endfor %}
</div> </div>
</div> {% endif %}
{% endif %} </div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Display settings" %}</legend> <div class="panel-heading">
{% bootstrap_field sform.locales layout="control" %} <legend>{% trans "Display settings" %}</legend>
{% bootstrap_field sform.locale layout="control" %} </div>
{% bootstrap_field sform.timezone layout="control" %} <div class="panel-body">
{% bootstrap_field sform.show_date_to layout="control" %} {% bootstrap_field sform.locales layout="control" %}
{% bootstrap_field sform.show_times layout="control" %} {% bootstrap_field sform.locale layout="control" %}
{% bootstrap_field sform.contact_mail layout="control" %} {% bootstrap_field sform.timezone layout="control" %}
{% bootstrap_field sform.imprint_url layout="control" %} {% bootstrap_field sform.show_date_to layout="control" %}
{% bootstrap_field sform.confirm_text layout="control" %} {% bootstrap_field sform.show_times layout="control" %}
{% bootstrap_field sform.show_quota_left layout="control" %} {% bootstrap_field sform.contact_mail layout="control" %}
{% bootstrap_field sform.display_net_prices layout="control" %} {% bootstrap_field sform.imprint_url layout="control" %}
{% bootstrap_field sform.confirm_text layout="control" %}
{% bootstrap_field sform.show_quota_left layout="control" %}
{% bootstrap_field sform.display_net_prices layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Timeline" %}</legend> <div class="panel-heading">
{% bootstrap_field form.presale_start layout="control" %} <legend>{% trans "Timeline" %}</legend>
{% bootstrap_field sform.presale_start_show_date layout="control" %} </div>
{% bootstrap_field form.presale_end layout="control" %} <div class="panel-body">
{% bootstrap_field sform.show_items_outside_presale_period layout="control" %} {% bootstrap_field form.presale_start layout="control" %}
{% bootstrap_field sform.last_order_modification_date layout="control" %} {% bootstrap_field sform.presale_start_show_date layout="control" %}
{% bootstrap_field form.presale_end layout="control" %}
{% bootstrap_field sform.show_items_outside_presale_period layout="control" %}
{% bootstrap_field sform.last_order_modification_date layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Orders" %}</legend> <div class="panel-heading">
{% bootstrap_field sform.reservation_time layout="control" %} <legend>{% trans "Orders" %}</legend>
{% bootstrap_field sform.max_items_per_order layout="control" %} </div>
{% bootstrap_field sform.attendee_names_asked layout="control" %} <div class="panel-body">
{% bootstrap_field sform.attendee_names_required layout="control" %} {% bootstrap_field sform.reservation_time layout="control" %}
{% bootstrap_field sform.order_email_asked_twice layout="control" %} {% bootstrap_field sform.max_items_per_order layout="control" %}
{% bootstrap_field sform.attendee_emails_asked layout="control" %} {% bootstrap_field sform.attendee_names_asked layout="control" %}
{% bootstrap_field sform.attendee_emails_required layout="control" %} {% bootstrap_field sform.attendee_names_required layout="control" %}
{% bootstrap_field sform.cancel_allow_user layout="control" %} {% bootstrap_field sform.order_email_asked_twice layout="control" %}
{% bootstrap_field sform.attendee_emails_asked layout="control" %}
{% bootstrap_field sform.attendee_emails_required layout="control" %}
{% bootstrap_field sform.cancel_allow_user layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Waiting list" %}</legend> <div class="panel-heading">
{% bootstrap_field sform.waiting_list_enabled layout="control" %} <legend>{% trans "Waiting list" %}</legend>
{% bootstrap_field sform.waiting_list_auto layout="control" %} </div>
{% bootstrap_field sform.waiting_list_hours layout="control" %} <div class="panel-body">
{% bootstrap_field sform.waiting_list_enabled layout="control" %}
{% bootstrap_field sform.waiting_list_auto layout="control" %}
{% bootstrap_field sform.waiting_list_hours 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">
@@ -80,12 +100,12 @@
</button> </button>
<div class="pull-left"> <div class="pull-left">
<a href="{% url "control:event.delete" organizer=request.organizer.slug event=request.event.slug %}" <a href="{% url "control:event.delete" organizer=request.organizer.slug event=request.event.slug %}"
class="btn {% if request.event.allow_delete %}{% endif %} btn-danger btn-lg"> class="btn {% if request.event.allow_delete %}{% endif %} btn-danger btn-lg">
<span class="fa fa-trash"></span> <span class="fa fa-trash"></span>
{% trans "Delete event" %} {% trans "Delete event" %}
</a> </a>
<a href="{% url "control:event.shredder.start" organizer=request.organizer.slug event=request.event.slug %}" <a href="{% url "control:event.shredder.start" organizer=request.organizer.slug event=request.event.slug %}"
class="btn btn-danger btn-lg"> class="btn btn-danger btn-lg">
<span class="fa fa-eraser"></span> <span class="fa fa-eraser"></span>
{% trans "Delete personal data" %} {% trans "Delete personal data" %}
</a> </a>

View File

@@ -4,91 +4,34 @@
{% block title %}{{ request.event.name }}{% endblock %} {% block title %}{{ request.event.name }}{% endblock %}
{% block content %} {% block content %}
{% if "congratulations" in request.GET %} {% if "congratulations" in request.GET %}
<div class="thank-you"> <div class="panel panel-default">
<span class="fa fa-check-circle"></span> <div class="panel-body">
<div class="thank-you">
<span class="fa fa-check-circle"></span>
<h2>{% trans "Congratulations!" %}</h2> <h2>{% trans "Congratulations!" %}</h2>
<p> <p>
<strong>{% trans "You just created an event!" %}</strong> <strong>{% trans "You just created an event!" %}</strong>
</p> </p>
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
You can now scroll down and modify the settings in more detail, if you want, or you can create your You can now scroll down and modify the settings in more detail, if you want, or you can
first product to start selling tickets right away! create your
{% endblocktrans %} first product to start selling tickets right away!
</p> {% endblocktrans %}
<p> </p>
<a href="{% url "control:event.items.add" organizer=request.organizer.slug event=request.event.slug %}" <p>
class="btn btn-default"> <a href="{% url "control:event.items.add" organizer=request.organizer.slug event=request.event.slug %}"
{% trans "Create a first product" %} class="btn btn-default">
</a> {% trans "Create a first product" %}
</p> </a>
<div class="clearfix"></div> </p>
<div class="clearfix"></div>
</div>
</div>
</div> </div>
{% endif %} {% endif %}
<h1>{% trans "Settings" %}</h1>
<ul class="nav nav-pills">
{% if 'can_change_event_settings' in request.eventpermset %}
<li {% if "event.settings" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "General" %}
</a>
</li>
<li {% if "event.settings.payment" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.payment' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Payment" %}
</a>
</li>
<li {% if "event.settings.plugins" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.plugins' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Plugins" %}
</a>
</li>
<li {% if "event.settings.display" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.display' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Display" %}
</a>
</li>
<li {% if "event.settings.tickets" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.tickets' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Tickets" %}
</a>
</li>
<li {% if "event.settings.mail" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.mail' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "E-mail" %}
</a>
</li>
<li {% if "event.settings.tax" in url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.tax' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Tax rules" %}
</a>
</li>
<li {% if "event.settings.invoice" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.invoice' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Invoicing" %}
</a>
</li>
<li {% if "event.settings.permissions" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.permissions' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Permissions" %}
</a>
</li>
<li {% if "event.settings.widget" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:event.settings.widget' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Widget" %}
</a>
</li>
{% endif %}
{% for nav in nav_event_settings %}
<li {% if nav.active %}class="active"{% endif %}>
<a href="{{ nav.url }}">
{{ nav.label }}
</a>
</li>
{% endfor %}
</ul>
{% block inside %} {% block inside %}
{% endblock %} {% endblock %}
{% endblock %} {% endblock %}

View File

@@ -3,24 +3,33 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Delete tax rule" %}{% endblock %} {% block title %}{% trans "Delete tax rule" %}{% endblock %}
{% block inside %} {% block inside %}
<legend>{% trans "Delete tax rule" %}</legend>
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% csrf_token %} <div class="panel panel-default">
{% if possible %} <div class="panel-heading">
<p>{% blocktrans %}Are you sure you want to delete the tax rule <strong>{{ taxrule }}</strong>?{% endblocktrans %}</p> <legend>{% trans "Delete tax rule" %}</legend>
{% else %} </div>
<p>{% blocktrans %}You cannot delete a tax rule that is in use for a product or has been in use for any existing orders.{% endblocktrans %}</p> <div class="panel-body">
{% endif %} {% csrf_token %}
<div class="form-group submit-group"> {% if possible %}
<a href="{% url "control:event.settings.tax" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn <p>{% blocktrans %}Are you sure you want to delete the tax rule <strong>{{ taxrule }}</strong>
?{% endblocktrans %}</p>
{% else %}
<p>{% blocktrans %}You cannot delete a tax rule that is in use for a product or has been in use for
any existing orders.{% endblocktrans %}</p>
{% endif %}
<div class="form-group submit-group">
<a href="{% url "control:event.settings.tax" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn
btn-default btn-cancel"> btn-default btn-cancel">
{% trans "Cancel" %} {% trans "Cancel" %}
</a> </a>
{% if possible %} {% if possible %}
<button type="submit" class="btn btn-danger btn-save"> <button type="submit" class="btn btn-danger btn-save">
{% trans "Delete" %} {% trans "Delete" %}
</button> </button>
{% endif %} {% endif %}
</div>
</div>
</div> </div>
</form> </form>
{% endblock %} {% endblock %}

View File

@@ -10,19 +10,25 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block inside %} {% block inside %}
{% if rule %}
<legend>{% blocktrans with name=rule.name %}Tax rule: {{ name }}{% endblocktrans %}</legend>
{% else %}
<legend>{% trans "Tax rule" %}</legend>
{% endif %}
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% csrf_token %} <div class="panel panel-default">
{% bootstrap_form_errors form %} <div class="panel-heading">
{% bootstrap_field form.name layout="control" %} {% if rule %}
{% bootstrap_field form.rate addon_after="%" layout="control" %} <legend>{% blocktrans with name=rule.name %}Tax rule: {{ name }}{% endblocktrans %}</legend>
{% else %}
<legend>{% trans "Tax rule" %}</legend>
{% endif %}
</div>
{% csrf_token %}
<div class="panel-body">
{% bootstrap_form_errors form %}
{% bootstrap_field form.name layout="control" %}
{% bootstrap_field form.rate addon_after="%" layout="control" %}
</div>
</div>
<details class="panel panel-default" <details class="panel panel-default"
{% if rule.eu_reverse_charge or rule.has_custom_rules or form.errors %}open{% endif %}> {% if rule.eu_reverse_charge or rule.has_custom_rules or form.errors %}open{% endif %}>
<summary class="panel-heading"> <summary class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<strong>{% trans "Advanced settings" %}</strong> <strong>{% trans "Advanced settings" %}</strong>
@@ -31,7 +37,6 @@
</summary> </summary>
<div id="advanced"> <div id="advanced">
<div class="panel-body"> <div class="panel-body">
<legend>{% trans "Advanced settings" %}</legend>
<div class="alert alert-legal"> <div class="alert alert-legal">
{% blocktrans trimmed with docs="https://docs.pretix.eu/en/latest/user/events/taxes.html" %} {% blocktrans trimmed with docs="https://docs.pretix.eu/en/latest/user/events/taxes.html" %}
These settings are intended for advanced users. See the These settings are intended for advanced users. See the
@@ -47,8 +52,10 @@
<div class="alert alert-warning"> <div class="alert alert-warning">
{% blocktrans trimmed %} {% blocktrans trimmed %}
These settings are intended for professional users with very specific taxation situations. These settings are intended for professional users with very specific taxation situations.
If you create any rule here, the reverse charge settings above will be ignored. The rules will be If you create any rule here, the reverse charge settings above will be ignored. The rules
checked in order and once the first rule matches the order, it will be used and all further rules will will be
checked in order and once the first rule matches the order, it will be used and all further
rules will
be ignored. If no rule matches, tax will be charged. be ignored. If no rule matches, tax will be charged.
{% endblocktrans %} {% endblocktrans %}
{% trans "All of these rules will only apply if an invoice address is set." %} {% trans "All of these rules will only apply if an invoice address is set." %}

View File

@@ -2,50 +2,65 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Tax rules" %}{% endblock %} {% block title %}{% trans "Tax rules" %}{% endblock %}
{% block inside %} {% block inside %}
<legend>{% trans "Tax rules" %}</legend> <div class="panel panel-default">
{% if taxrules|length == 0 %} <div class="panel-heading">
<div class="empty-collection"> <legend>{% trans "Tax rules" %}</legend>
<p> </div>
{% blocktrans trimmed %} <div class="panel-body">
You haven't created any tax rules yet. {% trans "You can create one or multiple tax rules that you can apply to your products." %}
{% endblocktrans %} </div>
</p> </div>
<div class="panel panel-default">
{% if taxrules|length == 0 %}
<div class="panel-body empty-collection">
<p>
{% blocktrans trimmed %}
You haven't created any tax rules yet.
{% endblocktrans %}
</p>
<a href="{% url "control:event.settings.tax.add" organizer=request.event.organizer.slug event=request.event.slug %}" <a href="{% url "control:event.settings.tax.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 tax rule" %}</a> class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new tax rule" %}</a>
</div> </div>
{% else %} {% else %}
<p> <div class="panel-body">
<a href="{% url "control:event.settings.tax.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new tax rule" %} <a href="{% url "control:event.settings.tax.add" organizer=request.event.organizer.slug event=request.event.slug %}"
</a> class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new tax rule" %}
</p> </a>
<div class="table-responsive"> </div>
<table class="table table-hover table-quotas"> <div class="table-responsive">
<thead> <table class="table table-hover table-quotas">
<tr> <thead>
<th>{% trans "Name" %}</th>
<th>{% trans "Rate" %}</th>
<th class="action-col-2"></th>
</tr>
</thead>
<tbody>
{% for tr in taxrules %}
<tr> <tr>
<td> <th>{% trans "Name" %}</th>
<strong><a href="{% url "control:event.settings.tax.edit" organizer=request.event.organizer.slug event=request.event.slug rule=tr.id %}"> <th>{% trans "Rate" %}</th>
{{ tr.name }} <th class="action-col-2"></th>
</a></strong>
</td>
<td>{{ tr.rate }} %</td>
<td class="text-right">
<a href="{% url "control:event.settings.tax.edit" organizer=request.event.organizer.slug event=request.event.slug rule=tr.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:event.settings.tax.delete" organizer=request.event.organizer.slug event=request.event.slug rule=tr.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for tr in taxrules %}
</div> <tr>
{% endif %} <td>
{% include "pretixcontrol/pagination.html" %} <strong><a
href="{% url "control:event.settings.tax.edit" organizer=request.event.organizer.slug event=request.event.slug rule=tr.id %}">
{{ tr.name }}
</a></strong>
</td>
<td>{{ tr.rate }} %</td>
<td class="text-right">
<a href="{% url "control:event.settings.tax.edit" organizer=request.event.organizer.slug event=request.event.slug rule=tr.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:event.settings.tax.delete" organizer=request.event.organizer.slug event=request.event.slug rule=tr.id %}"
class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="panel-body">
{% include "pretixcontrol/pagination.html" %}
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -4,45 +4,50 @@
{% block inside %} {% block inside %}
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Ticket download" %}</legend> <div class="panel-heading">
{% if request.event.settings.ticket_download and not any_enabled %} <legend>{% trans "Ticket download" %}</legend>
<div class="alert alert-warning"> </div>
{% blocktrans trimmed %} <div class="panel-body">
You activated ticket downloads but no output provider is enabled. Be sure to enable a plugin and {% if request.event.settings.ticket_download and not any_enabled %}
activate an output provider. <div class="alert alert-warning">
{% endblocktrans %} {% blocktrans trimmed %}
</div> You activated ticket downloads but no output provider is enabled. Be sure to enable a plugin
{% endif %} and
{% bootstrap_form_errors form %} activate an output provider.
{% bootstrap_field form.ticket_download layout="control" %} {% endblocktrans %}
{% bootstrap_field form.ticket_download_date layout="control" %}
{% bootstrap_field form.ticket_download_addons layout="control" %}
{% bootstrap_field form.ticket_download_nonadm layout="control" %}
{% for provider in providers %}
<div class="panel panel-default ticketoutput-panel">
<div class="panel-heading">
<a href="{% url "control:event.settings.tickets.preview" event=request.event.slug organizer=request.organizer.slug output=provider.identifier %}"
class="btn btn-default btn-sm pull-right {% if not provider.preview_allowed %}disabled{% endif %}"
target="_blank">
{% trans "Preview" %}
</a>
<h3 class="panel-title">{{ provider.verbose_name }}</h3>
<div class="clear"></div>
</div> </div>
<div class="panel-body"> {% endif %}
{% bootstrap_form provider.form layout='horizontal' %} {% bootstrap_form_errors form %}
{% with c=provider.settings_content %} {% bootstrap_field form.ticket_download layout="control" %}
{% if c %}{{ c|safe }}{% endif %} {% bootstrap_field form.ticket_download_date layout="control" %}
{% endwith %} {% bootstrap_field form.ticket_download_addons layout="control" %}
</div> {% bootstrap_field form.ticket_download_nonadm layout="control" %}
</div> </div>
{% empty %}
<div class="alert alert-warning">
{% trans "There are no ticket outputs available. Please go to the plugin settings and activate one or more ticket output plugins." %}</em>
</div>
{% endfor %}
</fieldset> </fieldset>
{% for provider in providers %}
<div class="panel panel-default ticketoutput-panel">
<div class="panel-heading">
<a href="{% url "control:event.settings.tickets.preview" event=request.event.slug organizer=request.organizer.slug output=provider.identifier %}"
class="btn btn-default btn-sm pull-right {% if not provider.preview_allowed %}disabled{% endif %}"
target="_blank">
{% trans "Preview" %}
</a>
<h3 class="panel-title">{{ provider.verbose_name }}</h3>
<div class="clear"></div>
</div>
<div class="panel-body">
{% bootstrap_form provider.form layout='horizontal' %}
{% with c=provider.settings_content %}
{% if c %}{{ c|safe }}{% endif %}
{% endwith %}
</div>
</div>
{% empty %}
<div class="alert alert-warning">
{% trans "There are no ticket outputs available. Please go to the plugin settings and activate one or more ticket output plugins." %}</em>
</div>
{% endfor %}
<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" %}

View File

@@ -5,47 +5,55 @@
{% load eventurl %} {% load eventurl %}
{% load eventsignal %} {% load eventsignal %}
{% block inside %} {% block inside %}
<legend>{% trans "Widget" %}</legend> <fieldset class="panel panel-default">
<p> <div class="panel-heading">
{% blocktrans trimmed %} <legend>{% trans "Widget" %}</legend>
The pretix widget is a way to embed your ticket shop into your event website. This way, your visitors can </div>
buy their ticket right away without leaving your website. <div class="panel-body">
{% endblocktrans %} <p>
</p> {% blocktrans trimmed %}
{% if valid %} The pretix widget is a way to embed your ticket shop into your event website. This way, your
<p> visitors can
{% blocktrans trimmed %} buy their ticket right away without leaving your website.
To embed the widget onto your website, simply copy the following code to the <code>&lt;head&gt;</code> {% endblocktrans %}
section of your website: </p>
{% endblocktrans %} {% if valid %}
</p> <p>
<pre>&lt;link rel="stylesheet" type="text/css" href="{% abseventurl request.event "presale:event.widget.css" %}"&gt; {% blocktrans trimmed %}
To embed the widget onto your website, simply copy the following code to the
<code>&lt;head&gt;</code>
section of your website:
{% endblocktrans %}
</p>
<pre>&lt;link rel="stylesheet" type="text/css" href="{% abseventurl request.event "presale:event.widget.css" %}"&gt;
&lt;script type="text/javascript" src="{{ urlprefix }}{% url "presale:widget.js" lang=form.cleaned_data.language %}" async&gt;&lt;/script&gt;</pre> &lt;script type="text/javascript" src="{{ urlprefix }}{% url "presale:widget.js" lang=form.cleaned_data.language %}" async&gt;&lt;/script&gt;</pre>
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
Then, copy the following code to the place of your website where you want the widget to show up: Then, copy the following code to the place of your website where you want the widget to show up:
{% endblocktrans %} {% endblocktrans %}
</p> </p>
{% if form.cleaned_data.subevent %} {% if form.cleaned_data.subevent %}
{% abseventurl request.event "presale:event.index" subevent=form.cleaned_data.subevent.pk as indexurl %} {% abseventurl request.event "presale:event.index" subevent=form.cleaned_data.subevent.pk as indexurl %}
{% else %} {% else %}
{% abseventurl request.event "presale:event.index" as indexurl %} {% abseventurl request.event "presale:event.index" as indexurl %}
{% endif %} {% endif %}
{% if form.cleaned_data.compatibility_mode %} {% if form.cleaned_data.compatibility_mode %}
<pre>&lt;div class="pretix-widget-compat" event="{% abseventurl request.event "presale:event.index" %}"{% if form.cleaned_data.subevent %} subevent="{{ form.cleaned_data.subevent.pk }}"{% endif %}{% if form.cleaned_data.voucher %} voucher="{{ form.cleaned_data.voucher }}"{% endif %}&gt;&lt;/div&gt; <pre>&lt;div class="pretix-widget-compat" event="{% abseventurl request.event "presale:event.index" %}"
{% if form.cleaned_data.subevent %} subevent="{{ form.cleaned_data.subevent.pk }}"{% endif %}
{% if form.cleaned_data.voucher %} voucher="{{ form.cleaned_data.voucher }}"{% endif %}&gt;&lt;/div&gt;
&lt;noscript&gt; &lt;noscript&gt;
&lt;div class="pretix-widget"&gt; &lt;div class="pretix-widget"&gt;
&lt;div class="pretix-widget-info-message"&gt; &lt;div class="pretix-widget-info-message"&gt;
{% blocktrans trimmed with a_attr='target="_blank" rel="noopener" href="'|add:indexurl|add:'"'|safe %} {% blocktrans trimmed with a_attr='target="_blank" rel="noopener" href="'|add:indexurl|add:'"'|safe %}
JavaScript is disabled in your browser. To access our ticket shop without JavaScript, JavaScript is disabled in your browser. To access our ticket shop without JavaScript,
please &lt;a {{ a_attr }}&gt;click here&lt;/a&gt;. please &lt;a {{ a_attr }}&gt;click here&lt;/a&gt;.
{% endblocktrans %} {% endblocktrans %}
&lt;/div&gt; &lt;/div&gt;
&lt;/div&gt; &lt;/div&gt;
&lt;/noscript&gt; &lt;/noscript&gt;
</pre> </pre>
{% else %} {% else %}
<pre>&lt;pretix-widget event="{% abseventurl request.event "presale:event.index" %}"{% if form.cleaned_data.subevent %} subevent="{{ form.cleaned_data.subevent.pk }}"{% endif %}{% if form.cleaned_data.voucher %} voucher="{{ form.cleaned_data.voucher }}"{% endif %}&gt;&lt;/pretix-widget&gt; <pre>&lt;pretix-widget event="{% abseventurl request.event "presale:event.index" %}" {% if form.cleaned_data.subevent %} subevent="{{ form.cleaned_data.subevent.pk }}"{% endif %} {% if form.cleaned_data.voucher %} voucher="{{ form.cleaned_data.voucher }}"{% endif %}&gt;&lt;/pretix-widget&gt;
&lt;noscript&gt; &lt;noscript&gt;
&lt;div class="pretix-widget"&gt; &lt;div class="pretix-widget"&gt;
&lt;div class="pretix-widget-info-message"&gt; &lt;div class="pretix-widget-info-message"&gt;
@@ -57,30 +65,32 @@
&lt;/div&gt; &lt;/div&gt;
&lt;/noscript&gt; &lt;/noscript&gt;
</pre> </pre>
{% endif %}
<p>
<a href="https://docs.pretix.eu/en/latest/user/events/widget.html" target="_blank" rel="noopener">
<span class="fa fa-question-circle"></span>
{% trans "Read our documentation for more information" %}
</a>
</p>
{% else %}
<p>
{% blocktrans trimmed %}
Using this form, you can generate a code to copy and paste to your website source.
{% endblocktrans %}
</p>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
{% bootstrap_form form layout="control" %}
<div class="form-group">
<div class="col-md-offset-3 col-md-9">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Generate widget code" %}
</button>
</div>
</div>
</form>
{% endif %} {% endif %}
<p> </div>
<a href="https://docs.pretix.eu/en/latest/user/events/widget.html" target="_blank" rel="noopener"> </fieldset>
<span class="fa fa-question-circle"></span> {% eventsignal request.event "pretix.control.signals.event_settings_widget" request=request %}
{% trans "Read our documentation for more information" %}
</a>
</p>
{% else %}
<p>
{% blocktrans trimmed %}
Using this form, you can generate a code to copy and paste to your website source.
{% endblocktrans %}
</p>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
{% bootstrap_form form layout="control" %}
<div class="form-group">
<div class="col-md-offset-3 col-md-9">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Generate widget code" %}
</button>
</div>
</div>
</form>
{% endif %}
{% eventsignal request.event "pretix.control.signals.event_settings_widget" request=request %}
{% endblock %} {% endblock %}

View File

@@ -3,9 +3,6 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Create a new event" %}{% endblock %} {% block title %}{% trans "Create a new event" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Create a new event" %} <small>{% blocktrans trimmed with step=wizard.steps.step1 %}
Step {{ step }}
{% endblocktrans %}</small></h1>
{% if has_organizer %} {% if has_organizer %}
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% csrf_token %} {% csrf_token %}
@@ -13,17 +10,6 @@
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
{% block form %} {% block form %}
{% endblock %} {% endblock %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save pull-right">
{% trans "Continue" %}
</button>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}"
class="btn btn-default btn-lg pull-left">
{% trans "Back" %}
</button>
{% endif %}
</div>
</form> </form>
{% else %} {% else %}
<div class="alert alert-danger"> <div class="alert alert-danger">

View File

@@ -2,54 +2,81 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block form %} {% block form %}
<fieldset> <div class="panel panel-default">
<legend>{% trans "General information" %}</legend> <div class="panel-heading">
{% bootstrap_field form.name layout="control" %} <h1 class="panel-title">{% trans "Create a new event" %}
<div class="form-group"> <small>{% blocktrans trimmed with step=wizard.steps.step1 %}
<label class="col-md-3 control-label" for="{{ form.slug.id_for_label }}">{{ form.slug.label }}</label> Step {{ step }}
<div class="col-md-9 form-inline"> {% endblocktrans %}</small>
<button class="btn btn-default pull-right" type="button" id="event-slug-random-generate" </h1>
data-rng-url="{% url "control:events.add.slugrng" organizer=organizer.slug %}"> </div>
{% trans "Set to random" %} <fieldset class="panel-body">
</button> {% bootstrap_field form.name layout="control" %}
{% bootstrap_field form.slug form_group_class="helper-display-inline" show_label=False layout="inline" %} <div class="form-group">
<div class="help-block"> <label class="col-md-3 control-label" for="{{ form.slug.id_for_label }}">{{ form.slug.label }}</label>
{% blocktrans trimmed %} <div class="col-md-9 form-inline">
This is the address users can buy your tickets at. Should be short, only contain lowercase <button class="btn btn-default pull-right" type="button" id="event-slug-random-generate"
letters and numbers, and must be unique among your events. We recommend some kind of data-rng-url="{% url "control:events.add.slugrng" organizer=organizer.slug %}">
abbreviation or a date with less than 10 characters that can be easily remembered, but you {% trans "Set to random" %}
can also choose to use a random value. </button>
{% endblocktrans %} {% bootstrap_field form.slug form_group_class="helper-display-inline" show_label=False layout="inline" %}
</div> <div class="help-block">
<div class="help-block"> {% blocktrans trimmed %}
{% blocktrans trimmed %} This is the address users can buy your tickets at. Should be short, only contain lowercase
We will also use this in some places like order codes, invoice numbers or bank transfer letters and numbers, and must be unique among your events. We recommend some kind of
references as an abbreviation to reference this event. abbreviation or a date with less than 10 characters that can be easily remembered, but you
{% endblocktrans %} can also choose to use a random value.
</div> {% endblocktrans %}
<div class="slug-length alert alert-warning helper-display-none-soft"> </div>
{% blocktrans trimmed %} <div class="help-block">
We strongly recommend against using short forms of more then 16 characters. {% blocktrans trimmed %}
{% endblocktrans %} We will also use this in some places like order codes, invoice numbers or bank transfer
references as an abbreviation to reference this event.
{% endblocktrans %}
</div>
<div class="slug-length alert alert-warning helper-display-none-soft">
{% blocktrans trimmed %}
We strongly recommend against using short forms of more then 16 characters.
{% endblocktrans %}
</div>
</div> </div>
</div> </div>
{% bootstrap_field form.date_from layout="control" %}
{% bootstrap_field form.date_to layout="control" %}
{% bootstrap_field form.location layout="control" %}
{% bootstrap_field form.currency layout="control" %}
{% bootstrap_field form.tax_rate addon_after="%" layout="control" %}
</fieldset>
</div>
<fieldset class="panel panel-default">
<div class="panel-heading">
<legend>{% trans "Display settings" %}</legend>
</div>
<div class="panel-body">
{% bootstrap_field form.locale layout="control" %}
{% bootstrap_field form.timezone layout="control" %}
</div> </div>
{% bootstrap_field form.date_from layout="control" %}
{% bootstrap_field form.date_to layout="control" %}
{% bootstrap_field form.location layout="control" %}
{% bootstrap_field form.currency layout="control" %}
{% bootstrap_field form.tax_rate addon_after="%" layout="control" %}
</fieldset>
<fieldset>
<legend>{% trans "Display settings" %}</legend>
{% bootstrap_field form.locale layout="control" %}
{% bootstrap_field form.timezone layout="control" %}
</fieldset> </fieldset>
{% if form.presale_start %} {% if form.presale_start %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Timeline" %}</legend> <div class="panel-heading">
{% bootstrap_field form.presale_start layout="control" %} <legend>{% trans "Timeline" %}</legend>
{% bootstrap_field form.presale_end layout="control" %} </div>
<div class="panel-body">
{% bootstrap_field form.presale_start layout="control" %}
{% bootstrap_field form.presale_end layout="control" %}
</div>
</fieldset> </fieldset>
{% endif %} {% endif %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save pull-right">
{% trans "Continue" %}
</button>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}"
class="btn btn-default btn-lg pull-left">
{% trans "Back" %}
</button>
{% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -2,19 +2,41 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block form %} {% block form %}
<p> <div class="panel panel-default">
{% blocktrans trimmed %} <div class="panel-heading">
Do you want to copy over your configuration from a different event? We will copy all <h1 class="panel-title">{% trans "Create a new event" %}
products, categories, quotas, and questions as well as general event settings. <small>{% blocktrans trimmed with step=wizard.steps.step1 %}
{% endblocktrans %} Step {{ step }}
</p> {% endblocktrans %}</small>
<div class="alert alert-info"> </h1>
<strong> </div>
{% blocktrans trimmed %} <div class="panel-body">
Please make sure to review all settings extensively. You will probably still need to change some <p>
settings manually, e.g. date and time settings and texts that contain the event name. {% blocktrans trimmed %}
{% endblocktrans %} Do you want to copy over your configuration from a different event? We will copy all
</strong> products, categories, quotas, and questions as well as general event settings.
{% endblocktrans %}
</p>
<div class="alert alert-info">
<strong>
{% blocktrans trimmed %}
Please make sure to review all settings extensively. You will probably still need to change some
settings manually, e.g. date and time settings and texts that contain the event name.
{% endblocktrans %}
</strong>
</div>
{% bootstrap_field form.copy_from_event layout="control" %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save pull-right">
{% trans "Continue" %}
</button>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}"
class="btn btn-default btn-lg pull-left">
{% trans "Back" %}
</button>
{% endif %}
</div>
</div>
</div> </div>
{% bootstrap_field form.copy_from_event layout="control" %}
{% endblock %} {% endblock %}

View File

@@ -2,11 +2,33 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block form %} {% block form %}
{% bootstrap_field form.organizer layout="horizontal" %} <div class="panel panel-default">
{% bootstrap_field form.locales layout="horizontal" %} <div class="panel-heading">
{% bootstrap_field form.has_subevents layout="horizontal" %} <h1 class="panel-title">{% trans "Create a new event" %}
<p> <small>{% blocktrans trimmed with step=wizard.steps.step1 %}
<span class="fa fa-info-circle"></span> Step {{ step }}
{% trans "Please note that you will only be able to delete your event until the first order has been created." %} {% endblocktrans %}</small>
</p> </h1>
</div>
<div class="panel-body">
{% bootstrap_field form.organizer layout="horizontal" %}
{% bootstrap_field form.locales layout="horizontal" %}
{% bootstrap_field form.has_subevents layout="horizontal" %}
<p class="help-block">
<span class="fa fa-info-circle"></span>
{% trans "Please note that you will only be able to delete your event until the first order has been created." %}
</p>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save pull-right">
{% trans "Continue" %}
</button>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}"
class="btn btn-default btn-lg pull-left">
{% trans "Back" %}
</button>
{% endif %}
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -4,134 +4,150 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Events" %}{% endblock %} {% block title %}{% trans "Events" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Events" %}</h1> <div class="panel panel-default">
<p>{% trans "The list below shows all events you have administrative access to. Click on the event name to access event details." %}</p> <div class="panel-heading">
{% if events|length == 0 and not filter_form.filtered %} <h1 class="panel-title">{% trans "Events" %}</h1>
<div class="empty-collection">
<p>
{% blocktrans trimmed %}
You currently do not have access to any events.
{% endblocktrans %}
</p>
<a href="{% url "control:events.add" %}" class="btn btn-primary btn-lg">
<span class="fa fa-plus"></span>
{% trans "Create a new event" %}
</a>
</div> </div>
{% else %} <div class="panel-body">{% trans "The list below shows all events you have administrative access to. Click on the event name to access event details." %}</div>
<form class="row filter-form" action="" method="get"> </div>
<div class="col-md-4 col-sm-6 col-xs-12"> <div class="panel panel-default">
{% bootstrap_field filter_form.query layout='inline' %} {% if events|length == 0 and not filter_form.filtered %}
<div class="empty-collection panel-body">
<p>
{% blocktrans trimmed %}
You currently do not have access to any events.
{% endblocktrans %}
</p>
<a href="{% url "control:events.add" %}" class="btn btn-primary btn-lg">
<span class="fa fa-plus"></span>
{% trans "Create a new event" %}
</a>
</div> </div>
<div class="col-md-3 col-sm-6 col-xs-12"> {% else %}
{% bootstrap_field filter_form.status layout='inline' %} <form class="panel-body row filter-form" action="" method="get">
</div> <div class="col-md-4 col-sm-6 col-xs-12">
<div class="col-md-3 col-sm-6 col-xs-12"> {% bootstrap_field filter_form.query layout='inline' %}
{% bootstrap_field filter_form.organizer layout='inline' %} </div>
</div> <div class="col-md-3 col-sm-6 col-xs-12">
<div class="col-md-2 col-sm-6 col-xs-12"> {% bootstrap_field filter_form.status layout='inline' %}
<button class="btn btn-primary btn-block" type="submit"> </div>
<span class="fa fa-filter"></span> <div class="col-md-3 col-sm-6 col-xs-12">
<span class="hidden-md"> {% bootstrap_field filter_form.organizer layout='inline' %}
</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>
</form>
<div class="panel-body">
<a href="{% url "control:events.add" %}" class="btn btn-default">
<span class="fa fa-plus"></span>
{% trans "Create a new event" %}
</a>
</div> </div>
</form> <table class="table table-condensed table-hover">
<p> <thead>
<a href="{% url "control:events.add" %}" class="btn btn-default">
<span class="fa fa-plus"></span>
{% trans "Create a new event" %}
</a>
</p>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>
{% trans "Event name" %}
</th>
{% if not hide_orga %}
<th>
{% trans "Organizer" %}
<a href="?{% url_replace request 'ordering' '-organizer' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'organizer' %}"><i class="fa fa-caret-up"></i></a>
</th>
{% endif %}
<th>
{% trans "Start date" %}
<a href="?{% url_replace request 'ordering' '-date_from' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'date_from' %}"><i class="fa fa-caret-up"></i></a>
/
{% trans "End date" %}
<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 "Paid tickets per quota" %}
<a href="?{% url_replace request 'ordering' '-sum_tickets_paid' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'sum_tickets_paid' %}"><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>
<a href="?{% url_replace request 'ordering' 'live' %}"><i class="fa fa-caret-up"></i></a>
</th>
</tr>
</thead>
<tbody>
{% for e in events %}
<tr> <tr>
<td class="event-name-col"> <th>
<strong><a href="{% url "control:event.index" organizer=e.organizer.slug event=e.slug %}">{{ e.name }}</a></strong> {% trans "Event name" %}
<br><small>{{ e.slug }}</small> </th>
</td> {% if not hide_orga %}
{% if not hide_orga %}<td>{{ e.organizer }}</td>{% endif %} <th>
<td class="event-date-col"> {% trans "Organizer" %}
{% if e.has_subevents %} <a href="?{% url_replace request 'ordering' '-organizer' %}"><i
{{ e.min_from|default_if_none:""|date:"SHORT_DATETIME_FORMAT" }} class="fa fa-caret-down"></i></a>
{% else %} <a href="?{% url_replace request 'ordering' 'organizer' %}"><i
{{ e.get_short_date_from_display }} class="fa fa-caret-up"></i></a>
{% endif %} </th>
{% if e.has_subevents %} {% endif %}
<span class="label label-default">{% trans "Series" %}</span> <th>
{% endif %} {% trans "Start date" %}
{% if e.settings.show_date_to and e.date_to %} <a href="?{% url_replace request 'ordering' '-date_from' %}"><i
<br> class="fa fa-caret-down"></i></a>
{% if e.has_subevents %} <a href="?{% url_replace request 'ordering' 'date_from' %}"><i class="fa fa-caret-up"></i></a>
{{ e.max_fromto|default_if_none:e.max_from|default_if_none:e.max_to|default_if_none:""|date:"SHORT_DATETIME_FORMAT" }} /
{% else %} {% trans "End date" %}
{{ e.get_short_date_to_display }} <a href="?{% url_replace request 'ordering' '-date_to' %}"><i class="fa fa-caret-down"></i></a>
{% endif %} <a href="?{% url_replace request 'ordering' 'date_to' %}"><i class="fa fa-caret-up"></i></a>
{% endif %} </th>
</td> <th>
<td> {% trans "Paid tickets per quota" %}
{% for q in e.first_quotas|slice:":3" %} <a href="?{% url_replace request 'ordering' '-sum_tickets_paid' %}"><i
{% include "pretixcontrol/fragment_quota_box_paid.html" with quota=q %} class="fa fa-caret-down"></i></a>
{% endfor %} <a href="?{% url_replace request 'ordering' 'sum_tickets_paid' %}"><i
{% if e.first_quotas|length > 3 %} class="fa fa-caret-up"></i></a>
<a href="{% url "control:event.items.quotas" organizer=e.organizer.slug event=e.slug %}" </th>
class="quotabox-more" data-toggle="tooltip" title="{% trans "More quotas" %}" <th class="text-right">
data-placement="top"> {% trans "Status" %}
&middot;&middot;&middot; <a href="?{% url_replace request 'ordering' '-live' %}"><i class="fa fa-caret-down"></i></a>
</a> <a href="?{% url_replace request 'ordering' 'live' %}"><i class="fa fa-caret-up"></i></a>
{% endif %} </th>
</td>
<td class="text-right">
{% if not e.live %}
<span class="label label-danger">{% trans "Shop disabled" %}</span>
{% elif e.presale_has_ended %}
<span class="label label-warning">{% trans "Presale over" %}</span>
{% elif not e.presale_is_running %}
<span class="label label-warning">{% trans "Presale not started" %}</span>
{% else %}
<span class="label label-success">{% trans "On sale" %}</span>
{% endif %}
</td>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for e in events %}
{% include "pretixcontrol/pagination.html" %} <tr>
{% endif %} <td class="event-name-col">
<strong><a
href="{% url "control:event.index" organizer=e.organizer.slug event=e.slug %}">{{ e.name }}</a></strong>
<br>
<small>{{ e.slug }}</small>
</td>
{% if not hide_orga %}
<td>{{ e.organizer }}</td>{% endif %}
<td class="event-date-col">
{% if e.has_subevents %}
{{ e.min_from|default_if_none:""|date:"SHORT_DATETIME_FORMAT" }}
{% 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 %}
{{ e.max_fromto|default_if_none:e.max_from|default_if_none:e.max_to|default_if_none:""|date:"SHORT_DATETIME_FORMAT" }}
{% else %}
{{ e.get_short_date_to_display }}
{% endif %}
{% endif %}
</td>
<td>
{% for q in e.first_quotas|slice:":3" %}
{% include "pretixcontrol/fragment_quota_box_paid.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>
{% elif e.presale_has_ended %}
<span class="label label-warning">{% trans "Presale over" %}</span>
{% elif not e.presale_is_running %}
<span class="label label-warning">{% trans "Presale not started" %}</span>
{% else %}
<span class="label label-success">{% trans "On sale" %}</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -4,6 +4,12 @@
{% block title %}{% trans "System message" %}{% endblock %} {% block title %}{% trans "System message" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "System message" %}</h1> <div class="panel panel-default">
{{ global_settings.banner_message_detail|rich_text }} <div class="panel-heading">
<h1 class="panel-title">{% trans "System message" %}</h1>
</div>
<div class="panel-body">
{{ global_settings.banner_message_detail|rich_text }}
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -3,14 +3,21 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inner %} {% block inner %}
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <div class="panel panel-default">
{% csrf_token %} <div class="panel-heading">
{% bootstrap_form_errors form %} <h1 class="panel-title">{% trans "Global settings" %}</h1>
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div> </div>
</form> <div class="panel-body">
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %}
{% bootstrap_form_errors form %}
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -4,19 +4,6 @@
{% block title %}{% trans "Global settings" %}{% endblock %} {% block title %}{% trans "Global settings" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Global settings" %}</h1>
<ul class="nav nav-pills">
<li {% if "global.settings" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:global.settings' %}">
{% trans "General" %}
</a>
</li>
<li {% if "global.update" == url_name %}class="active"{% endif %}>
<a href="{% url 'control:global.update' %}">
{% trans "Update check" %}
</a>
</li>
</ul>
{% block inner %} {% block inner %}
{% endblock %} {% endblock %}
{% endblock %} {% endblock %}

View File

@@ -3,55 +3,63 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inner %} {% block inner %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Update check results" %}</legend> <div class="panel-heading">
<legend>{% trans "Update check results" %}</legend>
</div>
{% if not gs.settings.update_check_perform %} {% if not gs.settings.update_check_perform %}
<div class="alert alert-warning"> <div class="panel-body">
{% trans "Update checks are disabled." %} <div class="alert alert-warning">
{% trans "Update checks are disabled." %}
</div>
</div> </div>
{% elif not gs.settings.update_check_last %} {% elif not gs.settings.update_check_last %}
<div class="alert alert-info"> <div class="panel-body">
{% trans "No update check has been performed yet since the last update of this installation. Update checks are performed on a daily basis if your cronjob is set up properly." %} <div class="alert alert-info">
{% trans "No update check has been performed yet since the last update of this installation. Update checks are performed on a daily basis if your cronjob is set up properly." %}
</div>
<form action="" method="post">
{% csrf_token %}
<p>
<button type="submit" name="trigger" value="1" class="btn btn-default">
{% trans "Check for updates now" %}
</button>
</p>
</form>
</div> </div>
<form action="" method="post"> {% elif "error" in gs.settings.update_check_result %}
{% csrf_token %} <div class="panel-body">
<p> <div class="alert alert-danger">
<button type="submit" name="trigger" value="1" class="btn btn-default"> {% trans "The last update check was not successful." %}
{% trans "Check for updates now" %} {% if gs.settings.update_check_result.error == "http_error" %}
</button> {% trans "The pretix.eu server returned an error code." %}
</p> {% elif gs.settings.update_check_result.error == "unavailable" %}
</form> {% trans "The pretix.eu server could not be reached." %}
{% elif "error" in gs.settings.update_check_result %} {% elif gs.settings.update_check_result.error == "development" %}
<div class="alert alert-danger"> {% trans "This installation appears to be a development installation." %}
{% trans "The last update check was not successful." %} {% endif %}
{% if gs.settings.update_check_result.error == "http_error" %} </div>
{% trans "The pretix.eu server returned an error code." %} <form action="" method="post">
{% elif gs.settings.update_check_result.error == "unavailable" %} {% csrf_token %}
{% trans "The pretix.eu server could not be reached." %} <p>
{% elif gs.settings.update_check_result.error == "development" %} <button type="submit" name="trigger" value="1" class="btn btn-default">
{% trans "This installation appears to be a development installation." %} {% trans "Check for updates now" %}
{% endif %} </button>
</p>
</form>
</div> </div>
<form action="" method="post">
{% csrf_token %}
<p>
<button type="submit" name="trigger" value="1" class="btn btn-default">
{% trans "Check for updates now" %}
</button>
</p>
</form>
{% else %} {% else %}
<form action="" method="post"> <div class="panel-body">
{% csrf_token %} <form action="" method="post">
<p> {% csrf_token %}
{% blocktrans trimmed with date=gs.settings.update_check_last|date:"SHORT_DATETIME_FORMAT" %} {% blocktrans trimmed with date=gs.settings.update_check_last|date:"SHORT_DATETIME_FORMAT" %}
Last updated: {{ date }} Last updated: {{ date }}
{% endblocktrans %} {% endblocktrans %}
<button type="submit" name="trigger" value="1" class="btn btn-default btn-xs"> <button type="submit" name="trigger" value="1" class="btn btn-default btn-xs">
{% trans "Check for updates now" %} {% trans "Check for updates now" %}
</button> </button>
</p> </form>
</form> </div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-condensed"> <table class="table table-condensed">
<thead> <thead>
@@ -63,11 +71,11 @@
</thead> </thead>
<tbody> <tbody>
{% for row in tbl %} {% for row in tbl %}
<tr class="{% if row.3 %}danger{% elif row.2 == "?" %}warning{% else %}success{% endif %}"> <tr class="{% if row.3 %}danger{% elif row.2 == "?" %}warning{% else %}success{% endif %}">
<td>{{ row.0 }}</td> <td>{{ row.0 }}</td>
<td>{{ row.1 }}</td> <td>{{ row.1 }}</td>
<td>{{ row.2 }}</td> <td>{{ row.2 }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
@@ -76,15 +84,19 @@
</fieldset> </fieldset>
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Update check settings" %}</legend> <div class="panel-heading">
{% bootstrap_form_errors form %} <legend>{% trans "Update check settings" %}</legend>
{% bootstrap_form form layout='horizontal' %} </div>
<div class="panel-body">
{% bootstrap_form_errors form %}
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</div>
</fieldset> </fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form> </form>
{% endblock %} {% endblock %}

View File

@@ -3,17 +3,21 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% load formset_tags %} {% load formset_tags %}
{% block inside %} {% block inside %}
<p> <div class="panel panel-default">
{% blocktrans trimmed %} <div class="panel-body">
With add-ons, you can specify products that can be bought as an addition to this product. For example, if {% blocktrans trimmed %}
you host a conference with a base conference ticket and a number of workshops, you could define the With add-ons, you can specify products that can be bought as an addition to this product. For example,
workshops as add-ons to the conference ticket. With this configuration, the workshops cannot be bought if
on their own but only in combination with a conference ticket. You can here specify categories of products you host a conference with a base conference ticket and a number of workshops, you could define the
that can be used as add-ons to this product. You can also specify the minimum and maximum number of workshops as add-ons to the conference ticket. With this configuration, the workshops cannot be bought
add-ons of the given category that can or need to be chosen. The user can buy every add-on from the on their own but only in combination with a conference ticket. You can here specify categories of
category at most once. If an add-on product has multiple variations, only one of them can be bought. products
{% endblocktrans %} that can be used as add-ons to this product. You can also specify the minimum and maximum number of
</p> add-ons of the given category that can or need to be chosen. The user can buy every add-on from the
category at most once. If an add-on product has multiple variations, only one of them can be bought.
{% endblocktrans %}
</div>
</div>
<form class="form-horizontal branches" method="post" action=""> <form class="form-horizontal branches" method="post" action="">
{% csrf_token %} {% csrf_token %}
<div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}"> <div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}">

View File

@@ -3,34 +3,35 @@
{% block title %}{{ object.name }} :: {% trans "Product" %}{% endblock %} {% block title %}{{ object.name }} :: {% trans "Product" %}{% endblock %}
{% block content %} {% block content %}
{% if object.id %} {% if object.id %}
<h1>{% trans "Modify product:" %} {{ object.name }}</h1> <div class="panel panel-default">
<ul class="nav nav-pills"> <div class="panel-heading">
<li {% if "event.item" == url_name %}class="active"{% endif %}> <h1 class="panel-title">{% trans "Modify product:" %} {{ object.name }}</h1>
<a href="{% url 'control:event.item' organizer=request.event.organizer.slug event=request.event.slug item=object.id %}"> </div>
{% trans "General information" %} <div class="panel-body">
</a> <ul class="nav nav-pills">
</li> <li {% if "event.item" == url_name %}class="active"{% endif %}>
{% if object.has_variations %} <a href="{% url 'control:event.item' organizer=request.event.organizer.slug event=request.event.slug item=object.id %}">
<li {% if "event.item.variations" == url_name %}class="active"{% endif %}> {% trans "General information" %}
<a href="{% url 'control:event.item.variations' organizer=request.event.organizer.slug event=request.event.slug item=object.id %}"> </a>
{% trans "Variations" %} </li>
</a> {% if object.has_variations %}
</li> <li {% if "event.item.variations" == url_name %}class="active"{% endif %}>
{% endif %} <a href="{% url 'control:event.item.variations' organizer=request.event.organizer.slug event=request.event.slug item=object.id %}">
<li {% if "event.item.addons" == url_name %}class="active"{% endif %}> {% trans "Variations" %}
<a href="{% url 'control:event.item.addons' organizer=request.event.organizer.slug event=request.event.slug item=object.id %}"> </a>
{% trans "Add-Ons" %} </li>
</a> {% endif %}
</li> <li {% if "event.item.addons" == url_name %}class="active"{% endif %}>
</ul> <a href="{% url 'control:event.item.addons' organizer=request.event.organizer.slug event=request.event.slug item=object.id %}">
{% else %} {% trans "Add-Ons" %}
<h1>{% trans "Create product" %}</h1> </a>
<p>{% blocktrans trimmed %} </li>
You will be able to adjust further settings in the next step. </ul>
{% endblocktrans %}</p> </div>
</div>
{% endif %} {% endif %}
{% if object.id and not object.quotas.exists %} {% if object.id and not object.quotas.exists %}
<div class="alert alert-warning"> <div class="alert 1alert-warning">
{% blocktrans trimmed %} {% blocktrans trimmed %}
Please note that your product will <strong>not</strong> be available for sale until you have added your Please note that your product will <strong>not</strong> be available for sale until you have added your
item to an existing or newly created quota. item to an existing or newly created quota.

View File

@@ -1,40 +1,55 @@
{% extends "pretixcontrol/item/base.html" %} {% extends "pretixcontrol/item/base.html" %}
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inside %}
{% load static %} {% load static %}
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/hidequota.js" %}"></script> {% block inside %}
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/hidequota.js" %}"></script>
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "General information" %}</legend> <div class="panel-heading">
{% bootstrap_field form.name layout="control" %} <legend>{% trans "General information" %}</legend>
<div class="internal-name-wrapper"> </div>
{% bootstrap_field form.internal_name layout="control" %} <div class="panel-body">
<p>{% blocktrans trimmed %}
You will be able to adjust further settings in the next step.
{% endblocktrans %}</p>
{% bootstrap_field form.name layout="control" %}
<div class="internal-name-wrapper">
{% bootstrap_field form.internal_name layout="control" %}
</div>
{% bootstrap_field form.copy_from layout="control" %}
{% bootstrap_field form.has_variations layout="control" %}
{% bootstrap_field form.category layout="control" %}
{% bootstrap_field form.admission layout="control" %}
</div> </div>
{% bootstrap_field form.copy_from layout="control" %}
{% bootstrap_field form.has_variations layout="control" %}
{% bootstrap_field form.category layout="control" %}
{% bootstrap_field form.admission layout="control" %}
</fieldset> </fieldset>
{% if form.quota_option %} {% if form.quota_option %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Quota settings" %}</legend> <div class="panel-heading">
{% bootstrap_field form.quota_option layout="control" %} <legend>{% trans "Quota settings" %}</legend>
<div id="existing-quota-group">
{% bootstrap_field form.quota_add_existing layout="control" %}
</div> </div>
<div id="new-quota-group"> <div class="panel-body">
{% bootstrap_field form.quota_add_new_name layout="control" %} {% bootstrap_field form.quota_option layout="control" %}
{% bootstrap_field form.quota_add_new_size layout="control" %} <div id="existing-quota-group">
{% bootstrap_field form.quota_add_existing layout="control" %}
</div>
<div id="new-quota-group">
{% bootstrap_field form.quota_add_new_name layout="control" %}
{% bootstrap_field form.quota_add_new_size layout="control" %}
</div>
</div> </div>
</fieldset> </fieldset>
{% endif %} {% endif %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Price settings" %}</legend> <div class="panel-heading">
{% bootstrap_field form.default_price layout="control" %} <legend>{% trans "Price settings" %}</legend>
{% bootstrap_field form.tax_rule layout="control" %} </div>
<div class="panel-body">
{% bootstrap_field form.default_price layout="control" %}
{% bootstrap_field form.tax_rule 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">

View File

@@ -6,45 +6,70 @@
{% csrf_token %} {% csrf_token %}
<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 "General information" %}</legend> <div class="panel-heading">
{% bootstrap_field form.name layout="control" %} <legend>{% trans "General information" %}</legend>
<div class="internal-name-wrapper"> </div>
{% bootstrap_field form.internal_name layout="control" %} <div class="panel-body">
{% bootstrap_field form.name layout="control" %}
<div class="internal-name-wrapper">
{% bootstrap_field form.internal_name layout="control" %}
</div>
{% bootstrap_field form.active layout="control" %}
{% bootstrap_field form.category layout="control" %}
{% bootstrap_field form.admission layout="control" %}
{% bootstrap_field form.description layout="control" %}
{% bootstrap_field form.picture layout="control" %}
</div> </div>
{% bootstrap_field form.active layout="control" %}
{% bootstrap_field form.category layout="control" %}
{% bootstrap_field form.admission layout="control" %}
{% bootstrap_field form.description layout="control" %}
{% bootstrap_field form.picture layout="control" %}
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Price settings" %}</legend> <div class="panel-heading">
{% bootstrap_field form.default_price addon_after=request.event.currency layout="control" %} <legend>{% trans "Price settings" %}</legend>
{% bootstrap_field form.tax_rule layout="control" %} </div>
{% bootstrap_field form.free_price layout="control" %} <div class="panel-body">
{% bootstrap_field form.default_price addon_after=request.event.currency layout="control" %}
{% bootstrap_field form.tax_rule layout="control" %}
{% bootstrap_field form.free_price layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Availability" %}</legend> <div class="panel-heading">
{% bootstrap_field form.available_from layout="control" %} <legend>{% trans "Availability" %}</legend>
{% bootstrap_field form.available_until layout="control" %} </div>
{% bootstrap_field form.max_per_order layout="control" %} <div class="panel-body">
{% bootstrap_field form.min_per_order layout="control" %} {% bootstrap_field form.available_from layout="control" %}
{% bootstrap_field form.require_voucher layout="control" %} {% bootstrap_field form.available_until layout="control" %}
{% bootstrap_field form.hide_without_voucher layout="control" %} {% bootstrap_field form.max_per_order layout="control" %}
{% bootstrap_field form.allow_cancel layout="control" %} {% bootstrap_field form.min_per_order layout="control" %}
{% bootstrap_field form.require_voucher layout="control" %}
{% bootstrap_field form.hide_without_voucher layout="control" %}
{% bootstrap_field form.allow_cancel layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Check-in" %}</legend> <div class="panel-heading">
{% bootstrap_field form.checkin_attention layout="control" %} <legend>{% trans "Check-in" %}</legend>
</div>
<div class="panel-body">
{% bootstrap_field form.checkin_attention layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Additional settings" %}</legend> <div class="panel-heading">
{% bootstrap_field form.original_price addon_after=request.event.currency layout="control" %} <legend>{% trans "Additional settings" %}</legend>
{% for f in plugin_forms %} </div>
{% bootstrap_form f layout="control" %} <div class="panel-body">
{% endfor %} {% bootstrap_field form.original_price addon_after=request.event.currency layout="control" %}
{% for f in plugin_forms %}
{% bootstrap_form f layout="control" %}
{% endfor %}
</div>
</fieldset> </fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</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">
@@ -57,10 +82,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 %}

View File

@@ -2,56 +2,70 @@
{% 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> <div class="panel panel-default">
<p> <div class="panel-heading">
{% blocktrans trimmed %} <h1 class="panel-title">{% trans "Product categories" %}</h1>
You can use categories to group multiple products together in an organized way. </div>
{% endblocktrans %} <div class="panel-body">
</p> {% trans "You can use categories to group multiple products together in an organized way." %}
{% if categories|length == 0 %} </div>
<div class="empty-collection"> </div>
<p> <div class="panel panel-default">
{% blocktrans trimmed %} {% if categories|length == 0 %}
You haven't created any categories yet. <div class="empty-collection panel-body">
{% endblocktrans %} <p>
</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 %}" <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> class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new category" %}</a>
</div> </div>
{% else %} {% else %}
<p> <div class="panel-body">
<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 href="{% url "control:event.items.categories.add" organizer=request.event.organizer.slug event=request.event.slug %}"
</a> class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new category" %}
</p> </a>
<div class="table-responsive"> </div>
<table class="table table-hover"> <div class="table-responsive">
<thead> <table class="table table-hover">
<tr> <thead>
<th>{% trans "Product categories" %}</th>
<th class="action-col-2"></th>
<th class="action-col-2"></th>
</tr>
</thead>
<tbody>
{% for c in categories %}
<tr> <tr>
<td> <th>{% trans "Product categories" %}</th>
<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> <th class="action-col-2"></th>
</td> <th class="action-col-2"></th>
<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>
<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 class="text-right">
<a href="{% url "control:event.items.categories.edit" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<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> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for c in categories %}
</div> <tr>
{% include "pretixcontrol/pagination.html" %} <td>
{% endif %} <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>
<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>
<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 class="text-right">
<a href="{% url "control:event.items.categories.edit" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<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 %}
</tbody>
</table>
</div>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -3,20 +3,28 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Product category" %}{% endblock %} {% block title %}{% trans "Product category" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Product category" %}</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 %}
<div class="row"> <div class="row">
<div class="col-xs-12{% if category %} col-lg-10{% endif %}"> <div class="col-xs-12{% if category %} col-lg-10{% endif %}">
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "General information" %}</legend> <div class="panel-heading">
{% bootstrap_field form.name layout="control" %} <legend>{% trans "Product category" %}</legend>
<div class="internal-name-wrapper"> </div>
{% bootstrap_field form.internal_name layout="control" %} <div class="panel-body">
{% bootstrap_field form.name layout="control" %}
<div class="internal-name-wrapper">
{% bootstrap_field form.internal_name layout="control" %}
</div>
{% bootstrap_field form.description layout="control" %}
{% bootstrap_field form.is_addon layout="control" %}
</div>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div> </div>
{% bootstrap_field form.description layout="control" %}
{% bootstrap_field form.is_addon layout="control" %}
</fieldset> </fieldset>
</div> </div>
{% if category %} {% if category %}
@@ -32,10 +40,5 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
<div class="form-group submit-group"> </form>
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form>
{% endblock %} {% endblock %}

View File

@@ -3,19 +3,26 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Delete product category" %}{% endblock %} {% block title %}{% trans "Delete product category" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Delete product category" %}</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 product category" %}</h1>
<p>{% blocktrans trimmed with name=category.name %} </div>
Are you sure you want to delete the category <strong>{{ name }}</strong>? <div class="panel-body">
{% endblocktrans %}</p> <form action="" method="post" class="form-horizontal">
<div class="form-group submit-group"> {% csrf_token %}
<a href="{% url "control:event.items.categories" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default btn-cancel"> <p>{% blocktrans trimmed with name=category.name %}
{% trans "Cancel" %} Are you sure you want to delete the category <strong>{{ name }}</strong>?
</a> {% endblocktrans %}</p>
<button type="submit" class="btn btn-danger btn-save"> <div class="form-group submit-group">
{% trans "Delete" %} <a href="{% url "control:event.items.categories" organizer=request.event.organizer.slug event=request.event.slug %}"
</button> class="btn btn-default btn-cancel">
</div> {% trans "Cancel" %}
</form> </a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Delete" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,94 +2,106 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Products" %}{% endblock %} {% block title %}{% trans "Products" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Products" %}</h1> <div class="panel panel-default">
<p> <div class="panel-heading">
{% blocktrans trimmed %} <legend>{% trans "Products" %}</legend>
Below, you find a list of all available products. You can click on a product name to inspect and change </div>
product details. You can also use the buttons on the right to change the order of products within a <div class="panel-body">
give category. {% trans "Products are everything that you sell: Different ticket price categories, additional merchandise items, or parts of your event that you sell individually." %}
{% endblocktrans %} </div>
</p> </div>
{% if items|length == 0 %} <div class="panel panel-default">
<div class="empty-collection"> {% if items|length == 0 %}
<p> <div class="empty-collection panel-body">
{% blocktrans trimmed %} <p>
You haven't created any products yet. {% blocktrans trimmed %}
{% endblocktrans %} You haven't created any products yet.
</p> {% endblocktrans %}
</p>
<a href="{% url "control:event.items.add" organizer=request.event.organizer.slug event=request.event.slug %}" <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> class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new product" %}</a>
</div> </div>
{% else %} {% else %}
<p> <div class="panel-body">
<a href="{% url "control:event.items.add" organizer=request.event.organizer.slug event=request.event.slug %}" <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> class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new product" %}</a>
</p> </div>
<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 "Product name" %}</th> <th>{% trans "Product name" %}</th>
<th class="iconcol"></th> <th class="iconcol"></th>
<th class="iconcol"></th> <th class="iconcol"></th>
<th class="iconcol"></th> <th class="iconcol"></th>
<th class="iconcol"></th> <th class="iconcol"></th>
<th>{% trans "Category" %}</th> <th>{% trans "Category" %}</th>
<th class="action-col-2"></th> <th class="action-col-2"></th>
<th class="action-col-2"></th> <th class="action-col-2"></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 }}</a> {% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}">{{ i }}</a>
{% if not i.active %}</strike>{% endif %} {% if not i.active %}</strike>{% endif %}
</strong> </strong>
</td> </td>
<td> <td>
{% if i.available_from or i.available_until %} {% if i.available_from or i.available_until %}
<span class="fa fa-clock-o fa-fw text-muted" data-toggle="tooltip" title="{% trans "Only available in a limited timeframe" %}"> <span class="fa fa-clock-o fa-fw text-muted" data-toggle="tooltip"
title="{% trans "Only available in a limited timeframe" %}">
</span> </span>
{% endif %} {% endif %}
</td> </td>
<td> <td>
{% if i.admission %} {% if i.admission %}
<span class="fa fa-user fa-fw text-muted" data-toggle="tooltip" title="{% trans "Admission ticket" %}"></span> <span class="fa fa-user fa-fw text-muted" data-toggle="tooltip"
{% endif %} title="{% trans "Admission ticket" %}"></span>
</td> {% endif %}
<td> </td>
{% if i.var_count %} <td>
<span class="fa fa-list-ul fa-fw text-muted" data-toggle="tooltip" title="{% trans "Product with variations" %}"></span> {% if i.var_count %}
{% endif %} <span class="fa fa-list-ul fa-fw text-muted" data-toggle="tooltip"
</td> title="{% trans "Product with variations" %}"></span>
<td> {% endif %}
{% if i.hide_without_voucher %} </td>
<span class="fa fa-ticket fa-fw text-muted" data-toggle="tooltip" title="{% trans "Only visible with a voucher" %}"></span> <td>
{% elif i.require_voucher %} {% if i.hide_without_voucher %}
<span class="fa fa-ticket fa-fw text-muted" data-toggle="tooltip" title="{% trans "Can only bought using a voucher" %}"></span> <span class="fa fa-ticket fa-fw text-muted" data-toggle="tooltip"
{% endif %} title="{% trans "Only visible with a voucher" %}"></span>
</td> {% elif i.require_voucher %}
<td>{% if i.category %}{{ i.category.name }}{% endif %}</td> <span class="fa fa-ticket fa-fw text-muted" data-toggle="tooltip"
<td> title="{% trans "Can only bought using a voucher" %}"></span>
<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> {% endif %}
<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>{% if i.category %}{{ i.category.name }}{% endif %}</td>
<td class="text-right"> <td>
<a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a> <a href="{% url "control:event.items.up" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}"
<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> class="btn btn-default btn-sm {% if forloop.counter0 == 0 %}disabled{% endif %}"><i
</td> class="fa fa-arrow-up"></i></a>
</tr> <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 class="text-right">
<a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<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> {% endif %}
{% include "pretixcontrol/pagination.html" %} </div>
{% endif %}
{% endblock %} {% endblock %}

View File

@@ -5,86 +5,145 @@
{% load formset_tags %} {% load formset_tags %}
{% block title %}{% blocktrans with name=question.question %}Question: {{ name }}{% endblocktrans %}{% endblock %} {% block title %}{% blocktrans with name=question.question %}Question: {{ name }}{% endblocktrans %}{% endblock %}
{% block inside %} {% block inside %}
<h1>
{% blocktrans with name=question.question %}Question: {{ name }}{% endblocktrans %}
<a href="{% url "control:event.items.questions.edit" event=request.event.slug organizer=request.event.organizer.slug question=question.pk %}"
class="btn btn-default">
<span class="fa fa-edit"></span>
{% trans "Edit question" %}
</a>
</h1>
<form class="form-inline helper-display-inline" action="" method="get">
<p>
<select name="status" class="form-control">
<option value="" {% if request.GET.status == "" %}selected="selected"{% endif %}>{% trans "All orders" %}</option>
<option value="p" {% if request.GET.status == "p" %}selected="selected"{% endif %}>{% trans "Paid" %}</option>
<option value="n" {% if request.GET.status == "n" %}selected="selected"{% endif %}>{% trans "Pending" %}</option>
<option value="np" {% if request.GET.status == "np" or "status" not in request.GET %}selected="selected"{% endif %}>{% trans "Pending or paid" %}</option>
<option value="o" {% if request.GET.status == "o" %}selected="selected"{% endif %}>{% trans "Pending (overdue)" %}</option>
<option value="e" {% if request.GET.status == "e" %}selected="selected"{% endif %}>{% trans "Expired" %}</option>
<option value="ne" {% if request.GET.status == "ne" %}selected="selected"{% endif %}>{% trans "Pending or expired" %}</option>
<option value="c" {% if request.GET.status == "c" %}selected="selected"{% endif %}>{% trans "Canceled" %}</option>
<option value="r" {% if request.GET.status == "r" %}selected="selected"{% endif %}>{% trans "Refunded" %}</option>
</select>
<select name="item" class="form-control">
<option value="">{% trans "All products" %}</option>
{% for item in items %}
<option value="{{ item.id }}"
{% if request.GET.item|add:0 == item.id %}selected="selected"{% endif %}>
{{ item.name }}
</option>
{% endfor %}
</select>
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
</p>
</form>
<div class="row" id="question-stats"> <div class="row" id="question-stats">
{% if not stats %} <div class="col-lg-10 col-xs-12">
<div class="empty-collection col-md-10 col-xs-12"> <div class="panel panel-default panel-with-btn">
<p> <div class="panel-heading">
{% blocktrans trimmed %}
No matching answers found.
{% endblocktrans %}
</p>
{% if not items %}
<p>
{% trans "You need to assign the question to a product to collect answers." %}
</p>
<a href="{% url "control:event.items.questions.edit" event=request.event.slug organizer=request.event.organizer.slug question=question.pk %}" <a href="{% url "control:event.items.questions.edit" event=request.event.slug organizer=request.event.organizer.slug question=question.pk %}"
class="btn btn-primary btn-lg"><i class="fa fa-edit"></i> {% trans "Edit question" %}</a> class="btn btn-default btn-sm pull-right">
{% endif %} <span class="fa fa-edit"></span>
</div> {% trans "Edit question" %}
{% else %} </a>
<div class="col-md-5 col-xs-12"> <h1 class="panel-title">
<div class="chart" id="question_chart" data-type="{{ question.type }}"> {% blocktrans with name=question.question %}Question: {{ name }}{% endblocktrans %}
</h1>
</div>
<div class="panel-body">
<dl class="dl-horizontal dl-left">
<dt>{% trans "Products" %}</dt>
<dd>{{ question.items.all|join:"<br>" }}</dd>
<dt>{% trans "Type" %}</dt>
<dd>{{ question.get_type_display }}</dd>
<dt>{% trans "Internal reference" %}</dt>
<dd>{{ question.identifier }}</dd>
<dt>{% trans "Answer required" %}</dt>
<dd>{% if question.required %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}</dd>
<dt>{% trans "Time of question" %}</dt>
<dd>{% if not question.ask_during_checkin %}{% trans "Ticket purchase" %}{% else %}
{% trans "Check-in" %}{% endif %}</dd>
</dl>
</div>
<div class="panel-footer">
<form class="row" action="" method="get">
<div class="col-md-5 col-xs-12">
<select name="status" class="form-control">
<option value=""
{% if request.GET.status == "" %}selected="selected"{% endif %}>{% trans "All orders" %}</option>
<option value="p"
{% if request.GET.status == "p" %}selected="selected"{% endif %}>{% trans "Paid" %}</option>
<option value="n"
{% if request.GET.status == "n" %}selected="selected"{% endif %}>{% trans "Pending" %}</option>
<option value="np"
{% if request.GET.status == "np" or "status" not in request.GET %}selected="selected"{% endif %}>{% trans "Pending or paid" %}</option>
<option value="o"
{% if request.GET.status == "o" %}selected="selected"{% endif %}>{% trans "Pending (overdue)" %}</option>
<option value="e"
{% if request.GET.status == "e" %}selected="selected"{% endif %}>{% trans "Expired" %}</option>
<option value="ne"
{% if request.GET.status == "ne" %}selected="selected"{% endif %}>{% trans "Pending or expired" %}</option>
<option value="c"
{% if request.GET.status == "c" %}selected="selected"{% endif %}>{% trans "Canceled" %}</option>
<option value="r"
{% if request.GET.status == "r" %}selected="selected"{% endif %}>{% trans "Refunded" %}</option>
</select>
</div>
<div class="col-md-5 col-xs-12">
<select name="item" class="form-control">
<option value="">{% trans "All products" %}</option>
{% for item in items %}
<option value="{{ item.id }}"
{% if request.GET.item|add:0 == item.id %}selected="selected"{% endif %}>
{{ item.name }}
</option>
{% endfor %}
</select>
</div>
<div class="col-md-2 col-xs-12">
<button class="btn btn-block btn-primary" type="submit">{% trans "Filter" %}</button>
</div>
</form>
</div> </div>
<script type="application/json" id="question-chart-data">{{ stats_json|escapejson }}</script>
</div> </div>
<div class="col-md-5 col-xs-12"> {% if not stats %}
<table class="table table-bordered table-hover"> <div class="panel panel-default">
<thead> <div class="panel-body empty-collection">
<tr> <p>
<th>{% trans "Answer" %}</th> {% blocktrans trimmed %}
<th>{% trans "Count" %}</th> No matching answers found.
</tr> {% endblocktrans %}
</thead> </p>
<tbody> {% if not items %}
{% for stat in stats %} <p>
<tr> {% trans "You need to assign the question to a product to collect answers." %}
<td> </p>
<a href="{% url "control:event.orders" event=request.event.slug organizer=request.event.organizer.slug %}?status={{ request.GET.status|default:"np" }}&item={{ request.GET.item }}&question={{ question.pk }}&answer={{ stat.alink|default:stat.answer|urlencode }}">
{{ stat.answer }} <a href="{% url "control:event.items.questions.edit" event=request.event.slug organizer=request.event.organizer.slug question=question.pk %}"
</a> class="btn btn-primary btn-lg"><i class="fa fa-edit"></i> {% trans "Edit question" %}
</td> </a>
<td>{{ stat.count }}</td> {% endif %}
</tr> </div>
{% endfor %} </div>
</tbody> {% else %}
</table> <div class="row">
</div> <div class="col-md-6 col-xs-12">
{% endif %} <div class="panel panel-default">
<div class="panel-body">
<div class="chart" id="question_chart" data-type="{{ question.type }}">
</div>
<script type="application/json"
id="question-chart-data">{{ stats_json|escapejson }}</script>
</div>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="panel panel-default">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>{% trans "Answer" %}</th>
<th>{% trans "Count" %}</th>
</tr>
</thead>
<tbody>
{% for stat in stats %}
<tr>
<td>
<a href="{% url "control:event.orders" event=request.event.slug organizer=request.event.organizer.slug %}?status=
{{ request.GET.status|default:"np" }}&item={{ request.GET.item }}&question={{ question.pk }}&answer=
{{ stat.alink|default:stat.answer|urlencode }}">
{{ stat.answer }}
</a>
</td>
<td>{{ stat.count }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}
</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">
<div class="panel-heading"> <div class="panel-heading">

View File

@@ -3,23 +3,36 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Delete question" %}{% endblock %} {% block title %}{% trans "Delete question" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Delete question" %}</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 question" %}</h1>
<p>{% blocktrans %}Are you sure you want to delete the question <strong>{{ question }}</strong>?{% endblocktrans %}</p> </div>
{% if dependent|length > 0 %} <div class="panel-body">
<p>{% blocktrans %}All answers to the question given by the buyers of the following products will be <strong>lost</strong>.{% endblocktrans %}</p> <form action="" method="post" class="form-horizontal">
{% for item in dependent %} {% csrf_token %}
<li><a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.pk %}">{{ item.name }}</a></li> <p>{% blocktrans %}Are you sure you want to delete the question <strong>{{ question }}</strong>
{% endfor %} ?{% endblocktrans %}</p>
{% endif %} {% if dependent|length > 0 %}
<div class="form-group submit-group"> <p>{% blocktrans %}All answers to the question given by the buyers of the following products will be
<a href="{% url "control:event.items.questions" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default btn-cancel"> <strong>lost</strong>.{% endblocktrans %}</p>
{% trans "Cancel" %} <ul>
</a> {% for item in dependent %}
<button type="submit" class="btn btn-danger btn-save"> <li>
{% trans "Delete" %} <a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.pk %}">{{ item.name }}</a>
</button> </li>
</div> {% endfor %}
</form> </ul>
{% endif %}
<div class="form-group submit-group">
<a href="{% url "control:event.items.questions" 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 %}

View File

@@ -10,26 +10,34 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block inside %} {% block inside %}
{% if question %}
<h1>{% blocktrans with name=question.question %}Question: {{ name }}{% endblocktrans %}</h1>
{% else %}
<h1>{% trans "Question" %}</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.question layout="control" %} {% if question %}
{% bootstrap_field form.help_text layout="control" %} <h1 class="panel-title">{% blocktrans with name=question.question %}Question:
{% bootstrap_field form.type layout="control" %} {{ name }}{% endblocktrans %}</h1>
{% bootstrap_field form.identifier layout="control" %} {% else %}
{% bootstrap_field form.ask_during_checkin layout="control" %} <h1 class="panel-title">{% trans "Question" %}</h1>
{% bootstrap_field form.required layout="control" %} {% endif %}
</div>
<div class="panel-body">
{% bootstrap_field form.question layout="control" %}
{% bootstrap_field form.help_text layout="control" %}
{% bootstrap_field form.type layout="control" %}
{% bootstrap_field form.identifier layout="control" %}
{% bootstrap_field form.ask_during_checkin layout="control" %}
{% bootstrap_field form.required layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Apply to products" %}</legend> <div class="panel-heading">
{% bootstrap_field form.items layout="control" %} <legend>{% trans "Apply to products" %}</legend>
</div>
<div class="panel-body">
{% bootstrap_field form.items layout="control" %}
</div>
</fieldset> </fieldset>
<div class="alert alert-info alert-required-boolean"> <div class="alert alert-info alert-required-boolean">
{% blocktrans trimmed %} {% blocktrans trimmed %}
@@ -37,77 +45,81 @@
accepted. If you want to allow both options, do not make this field required. accepted. If you want to allow both options, do not make this field required.
{% endblocktrans %} {% endblocktrans %}
</div> </div>
<fieldset id="answer-options"> <fieldset class="panel panel-default" id="answer-options">
<legend>{% trans "Answer options" %}</legend> <div class="panel-heading">
<noscript> <legend>{% trans "Answer options" %}</legend>
<p>{% trans "Only applicable if you choose 'Choose one/multiple from a list' above." %}</p> </div>
</noscript> <div class="panel-body">
<div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}"> <noscript>
{{ formset.management_form }} <p>{% trans "Only applicable if you choose 'Choose one/multiple from a list' above." %}</p>
{% bootstrap_formset_errors formset %} </noscript>
<div data-formset-body> <div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}">
{% for form in formset %} {{ formset.management_form }}
<div data-formset-form> {% bootstrap_formset_errors formset %}
<div class="sr-only"> <div data-formset-body>
{{ form.id }} {% for form in formset %}
{% bootstrap_field form.DELETE form_group_class="" layout="inline" %} <div data-formset-form>
{% bootstrap_field form.ORDER form_group_class="" layout="inline" %} <div class="sr-only">
</div> {{ form.id }}
<div class="row question-option-row"> {% bootstrap_field form.DELETE form_group_class="" layout="inline" %}
<div class="col-xs-10"> {% bootstrap_field form.ORDER form_group_class="" layout="inline" %}
</div>
<div class="row question-option-row">
<div class="col-xs-10">
<span class="text-muted"> <span class="text-muted">
{% blocktrans trimmed with id=form.instance.identifier %} {% blocktrans trimmed with id=form.instance.identifier %}
Answer option {{ id }} Answer option {{ id }}
{% endblocktrans %} {% endblocktrans %}
</span> </span>
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
{% bootstrap_field form.answer layout='inline' form_group_class="" %} {% bootstrap_field form.answer layout='inline' form_group_class="" %}
</div> </div>
<div class="col-xs-2 text-right"> <div class="col-xs-2 text-right">
<span>&nbsp;</span><br> <span>&nbsp;</span><br>
<button type="button" class="btn btn-default" data-formset-move-up-button> <button type="button" class="btn btn-default" data-formset-move-up-button>
<i class="fa fa-arrow-up"></i></button> <i class="fa fa-arrow-up"></i></button>
<button type="button" class="btn btn-default" data-formset-move-down-button> <button type="button" class="btn btn-default" data-formset-move-down-button>
<i class="fa fa-arrow-down"></i></button> <i class="fa fa-arrow-down"></i></button>
<button type="button" class="btn btn-danger" data-formset-delete-button> <button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button> <i class="fa fa-trash"></i></button>
</div>
</div> </div>
</div> </div>
</div> {% endfor %}
{% endfor %} </div>
</div> <script type="form-template" data-formset-empty-form>
<script type="form-template" data-formset-empty-form> {% escapescript %}
{% escapescript %} <div data-formset-form>
<div data-formset-form> <div class="sr-only">
<div class="sr-only"> {{ formset.empty_form.id }}
{{ formset.empty_form.id }} {% bootstrap_field formset.empty_form.DELETE form_group_class="" layout="inline" %}
{% bootstrap_field formset.empty_form.DELETE form_group_class="" layout="inline" %} {% bootstrap_field formset.empty_form.ORDER form_group_class="" layout="inline" %}
{% bootstrap_field formset.empty_form.ORDER form_group_class="" layout="inline" %} </div>
</div> <div class="row question-option-row">
<div class="row question-option-row"> <div class="col-xs-10">
<div class="col-xs-10">
<span class="text-muted"> <span class="text-muted">
{% trans "New answer option" %} {% trans "New answer option" %}
</span> </span>
{% bootstrap_field formset.empty_form.answer layout='inline' form_group_class="" %} {% bootstrap_field formset.empty_form.answer layout='inline' form_group_class="" %}
</div> </div>
<div class="col-xs-2 text-right"> <div class="col-xs-2 text-right">
<span>&nbsp;</span><br> <span>&nbsp;</span><br>
<button type="button" class="btn btn-default" data-formset-move-up-button> <button type="button" class="btn btn-default" data-formset-move-up-button>
<i class="fa fa-arrow-up"></i></button> <i class="fa fa-arrow-up"></i></button>
<button type="button" class="btn btn-default" data-formset-move-down-button> <button type="button" class="btn btn-default" data-formset-move-down-button>
<i class="fa fa-arrow-down"></i></button> <i class="fa fa-arrow-down"></i></button>
<button type="button" class="btn btn-danger" data-formset-delete-button> <button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button> <i class="fa fa-trash"></i></button>
</div>
</div> </div>
</div> </div>
</div> {% endescapescript %}
{% endescapescript %} </script>
</script> <p>
<p> <button type="button" class="btn btn-default" data-formset-add>
<button type="button" class="btn btn-default" data-formset-add> <i class="fa fa-plus"></i> {% trans "Add a new option" %}</button>
<i class="fa fa-plus"></i> {% trans "Add a new option" %}</button> </p>
</p> </div>
</div> </div>
</fieldset> </fieldset>
<div class="form-group submit-group"> <div class="form-group submit-group">

View File

@@ -2,74 +2,91 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Questions" %}{% endblock %} {% block title %}{% trans "Questions" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Questions" %}</h1> <div class="panel panel-default">
<p> <div class="panel-heading">
{% blocktrans trimmed %} <h1 class="panel-title">{% trans "Questions" %}</h1>
Questions allow your attendees to fill in additional data about their ticket. If you provide food, one </div>
example might be to ask your users about dietary requirements. <div class="panel-body">
{% endblocktrans %} {% blocktrans trimmed %}
</p> Questions allow your attendees to fill in additional data about their ticket. If you provide food, one
{% if questions|length == 0 %} example might be to ask your users about dietary requirements.
<div class="empty-collection"> {% endblocktrans %}
<p> </div>
{% blocktrans trimmed %} </div>
You haven't created any questions yet. <div class="panel panel-default">
{% endblocktrans %} {% if questions|length == 0 %}
</p> <div class="empty-collection panel-body">
<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 %}" <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> class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> {% trans "Create a new question" %}</a>
</div> </div>
{% else %} {% else %}
<p> <div class="panel-body">
<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 href="{% url "control:event.items.questions.add" organizer=request.event.organizer.slug event=request.event.slug %}"
</a> class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new question" %}
</p> </a>
<div class="table-responsive"> </div>
<table class="table table-hover table-quotas"> <div class="table-responsive">
<thead> <table class="table table-hover table-quotas">
<tr> <thead>
<th>{% trans "Question" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Products" %}</th>
<th class="action-col-2"></th>
<th class="action-col-2"></th>
</tr>
</thead>
<tbody>
{% for q in questions %}
<tr> <tr>
<td><strong><a href=" <th>{% trans "Question" %}</th>
{% url "control:event.items.questions.show" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}">{{ q.question }}</a></strong> <th>{% trans "Type" %}</th>
</td> <th>{% trans "Products" %}</th>
<td> <th class="action-col-2"></th>
{{ q.get_type_display }} <th class="action-col-2"></th>
{% if q.required %}
<span class="fa fa-exclamation-circle text-muted"
data-toggle="tooltip" title="{% trans "Required question" %}">
</span>
{% endif %}
</td>
<td>
<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 %}">{{ item }}</a></li>
{% endfor %}
</ul>
</td>
<td>
<a href="{% url "control:event.items.questions.up" organizer=request.event.organizer.slug event=request.event.slug question=q.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.questions.down" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-down"></i></a>
</td>
<td class="text-right">
<a href="{% url "control:event.items.questions.edit" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% 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> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for q in questions %}
</div> <tr>
{% include "pretixcontrol/pagination.html" %} <td><strong><a href="
{% endif %} {% url "control:event.items.questions.show" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}">{{ q.question }}</a></strong>
</td>
<td>
{{ q.get_type_display }}
{% if q.required %}
<span class="fa fa-exclamation-circle text-muted"
data-toggle="tooltip" title="{% trans "Required question" %}">
</span>
{% endif %}
</td>
<td>
<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 %}">{{ item }}</a>
</li>
{% endfor %}
</ul>
</td>
<td>
<a href="{% url "control:event.items.questions.up" organizer=request.event.organizer.slug event=request.event.slug question=q.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.questions.down" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}"
class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 %}disabled{% endif %}"><i
class="fa fa-arrow-down"></i></a>
</td>
<td class="text-right">
<a href="{% url "control:event.items.questions.edit" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% 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 %}
</tbody>
</table>
</div>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -5,65 +5,101 @@
{% load eventsignal %} {% load eventsignal %}
{% block title %}{% blocktrans with name=quota.name %}Quota: {{ name }}{% endblocktrans %}{% endblock %} {% block title %}{% blocktrans with name=quota.name %}Quota: {{ name }}{% endblocktrans %}{% endblock %}
{% block inside %} {% block inside %}
<h1>
{% blocktrans with name=quota.name %}Quota: {{ name }}{% endblocktrans %}
{% if 'can_change_items' in request.eventpermset %}
<a href="{% url "control:event.items.quotas.edit" event=request.event.slug organizer=request.event.organizer.slug quota=quota.pk %}"
class="btn btn-default">
<span class="fa fa-edit"></span>
{% trans "Edit quota" %}
</a>
{% endif %}
</h1>
{% if quota.subevent %}
<p>
<span class="fa fa-calendar"></span> {{ quota.subevent.name }} {{ quota.subevent.get_date_range_display }}
</p>
{% endif %}
<div class="row" id="quota-stats"> <div class="row" id="quota-stats">
<div class="col-md-5 col-xs-12"> <div class="col-lg-10 col-xs-12">
<legend>{% trans "Usage overview" %}</legend> <div class="panel panel-default panel-with-btn">
<div class="chart" id="quota_chart"> <div class="panel-heading">
{% if 'can_change_items' in request.eventpermset %}
</div> <a href="{% url "control:event.items.quotas.edit" event=request.event.slug organizer=request.event.organizer.slug quota=quota.pk %}"
<script type="application/json" id="quota-chart-data">{{ quota_chart_data|escapejson }}</script> class="btn btn-default btn-sm pull-right">
</div> <span class="fa fa-edit"></span>
<div class="col-md-5 col-xs-12"> {% trans "Edit quota" %}
<legend>{% trans "Availability calculation" %}</legend> </a>
{% endif %}
<div class="row"> <h1 class="panel-title">
<div class="col-xs-9">{% trans "Total quota" %}</div> {% blocktrans with name=quota.name %}Quota: {{ name }}{% endblocktrans %}
<div class="col-xs-3 text-right"> <div class="clearfix"></div>
{% if quota.size == None %}{% trans "Infinite" %}{% else %}{{ quota.size }}{% endif %} </h1>
</div>
<div class="panel-body">
<dl class="dl-horizontal dl-left">
<dt>{% trans "Size" %}</dt>
<dd>{{ quota.size|default_if_none:"Unlimited" }}</dd>
<dt>{% trans "Products" %}</dt>
<dd>{{ quota.get_items_display|join:"<br>" }}</dd>
{% if quota.subevent %}
<dt>{% trans "Date" context "subevent" %}</dt>
<dd>{{ quota.subevent }}</dd>
{% endif %}
</dl>
</div> </div>
</div> </div>
{% for row in quota_table_rows %} {% if quota.subevent %}
<div class="row"> <p>
<div class="col-xs-9">{{ row.label }}</div> <span class="fa fa-calendar"></span> {{ quota.subevent.name }}
<div class="col-xs-3 text-right"> {{ row.value }}</div> {{ quota.subevent.get_date_range_display }}
</div> </p>
{% endfor %}
<div class="row">
<div class="col-xs-9"><strong>{% trans "Current availability" %}</strong></div>
<div class="col-xs-3 text-right">
{% if quota.size == None %}{% trans "Infinite" %}{% else %}{{ avail.1 }}{% endif %}
</div>
</div>
{% if quota_overbooked > 0 %}
<div class="alert alert-warning">
{% blocktrans trimmed with num=quota_overbooked %}
This quota is currently overbooked by {{ num }} tickets.
{% endblocktrans %}
</div>
{% endif %} {% endif %}
{% if has_ignore_vouchers %} <div class="row" id="quota-stats">
<div class="alert alert-warning"> <div class="col-md-6 col-xs-12">
{% blocktrans trimmed %} <div class="panel panel-default">
Your event contains vouchers that affect products covered by this quota and that <div class="panel-heading">
allow a user to buy products even if this quota is sold out. <legend>{% trans "Usage overview" %}</legend>
{% endblocktrans %} </div>
<div class="panel-body">
<div class="chart" id="quota_chart">
</div>
<script type="application/json"
id="quota-chart-data">{{ quota_chart_data|escapejson }}</script>
</div>
</div>
</div> </div>
{% endif %} <div class="col-md-6 col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
<legend>{% trans "Availability calculation" %}</legend>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-9">{% trans "Total quota" %}</div>
<div class="col-xs-3 text-right">
{% if quota.size == None %}{% trans "Infinite" %}{% else %}
{{ quota.size }}{% endif %}
</div>
</div>
{% for row in quota_table_rows %}
<div class="row">
<div class="col-xs-9">{{ row.label }}</div>
<div class="col-xs-3 text-right"> {{ row.value }}</div>
</div>
{% endfor %}
<div class="row">
<div class="col-xs-9"><strong>{% trans "Current availability" %}</strong></div>
<div class="col-xs-3 text-right">
{% if quota.size == None %}{% trans "Infinite" %}{% else %}{{ avail.1 }}{% endif %}
</div>
</div>
{% if quota_overbooked > 0 %}
<div class="alert alert-warning">
{% blocktrans trimmed with num=quota_overbooked %}
This quota is currently overbooked by {{ num }} tickets.
{% endblocktrans %}
</div>
{% endif %}
{% if has_ignore_vouchers %}
<div class="alert alert-warning">
{% blocktrans trimmed %}
Your event contains vouchers that affect products covered by this quota and that
allow a user to buy products even if this quota is sold out.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div> </div>
<div class="col-md-2 col-xs-12"> <div class="col-md-2 col-xs-12">
<div class="panel panel-default"> <div class="panel panel-default">

View File

@@ -3,23 +3,36 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Delete quota" %}{% endblock %} {% block title %}{% trans "Delete quota" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Delete quota" %}</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 quota" %}</h1>
<p>{% blocktrans %}Are you sure you want to delete the quota <strong>{{ quota }}</strong>?{% endblocktrans %}</p> </div>
{% if dependent|length > 0 %} <div class="panel-body">
<p>{% blocktrans %}The following products might be no longer available for sale:{% endblocktrans %}</p> <form action="" method="post" class="form-horizontal">
{% for item in dependent %} {% csrf_token %}
<li><a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.pk %}">{{ item.name }}</a></li> <p>{% blocktrans %}Are you sure you want to delete the quota <strong>{{ quota }}</strong>
{% endfor %} ?{% endblocktrans %}</p>
{% endif %} {% if dependent|length > 0 %}
<div class="form-group submit-group"> <p>{% blocktrans %}The following products might be no longer available for
<a href="{% url "control:event.items.quotas" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default btn-cancel"> sale:{% endblocktrans %}</p>
{% trans "Cancel" %} <ul>
</a> {% for item in dependent %}
<button type="submit" class="btn btn-danger btn-save"> <li>
{% trans "Delete" %} <a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.pk %}">{{ item.name }}</a>
</button> </li>
</div> {% endfor %}
</form> </ul>
{% endif %}
<div class="form-group submit-group">
<a href="{% url "control:event.items.quotas" 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 %}

View File

@@ -9,36 +9,37 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block inside %} {% block inside %}
{% if question %} <div class="panel panel-default">
<h1>{% blocktrans with name=quota.name %}Quota: {{ name }}{% endblocktrans %}</h1> <div class="panel-heading">
{% else %} {% if quota %}
<h1>{% trans "Quota" %}</h1> <h1 class="panel-title">{% blocktrans with name=quota.name %}Quota: {{ name }}{% endblocktrans %}</h1>
{% endif %} {% else %}
<form action="" method="post" class="form-horizontal"> <h1 class="panel-title">{% trans "Quota" %}</h1>
{% csrf_token %}
{% bootstrap_form_errors form %}
<fieldset>
<legend>{% trans "General information" %}</legend>
{% bootstrap_field form.name layout="control" %}
{% bootstrap_field form.size layout="control" %}
{% if form.subevent %}
{% bootstrap_field form.subevent layout="control" %}
{% endif %} {% endif %}
<legend>{% trans "Items" %}</legend>
<p>
{% blocktrans trimmed %}
Please select the products or product variations this quota should be applied to. If you apply two
quotas to the same product, it will only be available if
<strong>both</strong> quotas have capacity
left.
{% endblocktrans %}
</p>
{% bootstrap_field form.itemvars layout="control" %}
</fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div> </div>
</form> <form action="" method="post" class="form-horizontal panel-body">
{% csrf_token %}
{% bootstrap_form_errors form %}
<fieldset>
{% bootstrap_field form.name layout="control" %}
{% bootstrap_field form.size layout="control" %}
{% if form.subevent %}
{% bootstrap_field form.subevent layout="control" %}
{% endif %}
{% bootstrap_field form.itemvars layout="control" %}
<p class="help-block">
{% blocktrans trimmed %}
Please select the products or product variations this quota should be applied to. If you apply
two quotas to the same product, it will only be available if <strong>both</strong> quotas have capacity
left.
{% endblocktrans %}
</p>
</fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,82 +2,95 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Quotas" %}{% endblock %} {% block title %}{% trans "Quotas" %}{% endblock %}
{% block inside %} {% block inside %}
<h1>{% trans "Quotas" %}</h1> <div class="panel panel-default">
<p> <div class="panel-heading">
{% blocktrans trimmed %} <h1 class="panel-title">{% trans "Quotas" %}</h1>
To make your products actually available, you also need quotas. Quotas define, how many instances of
your product pretix will sell. This way, you can configure whether your event can take an unlimited
number of attendees or the number of attendees is limited. You can assign a product to multiple quotas
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 request.event.has_subevents %}
<form class="form-inline helper-display-inline" action="" method="get">
{% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %}
</form>
{% endif %}
{% if quotas|length == 0 %}
<div class="empty-collection">
<p>
{% if request.GET.subevent %}
{% trans "Your search did not match any quotas." %}
{% else %}
{% blocktrans trimmed %}
You haven't created any quotas yet.
{% endblocktrans %}
{% endif %}
</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> </div>
{% else %} <div class="panel-body">
<p> {% blocktrans trimmed %}
<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" %} To make your products actually available, you also need quotas. Quotas define, how many instances of
</a> your product pretix will sell. This way, you can configure whether your event can take an unlimited
</p> number of attendees or the number of attendees is limited. You can assign a product to multiple quotas
<div class="table-responsive"> to fulfil more complex requirements, e.g. if you want to limit the total number of tickets sold and the
<table class="table table-hover table-quotas"> number of a specific ticket type at the same time.
<thead> {% endblocktrans %}
<tr> </div>
<th>{% trans "Quota name" %}</th> </div>
<th>{% trans "Products" %}</th> <div class="panel panel-default">
{% if request.event.has_subevents %} {% if request.event.has_subevents %}
<th>{% trans "Date" context "subevent" %}</th> <form class="panel-body form-inline helper-display-inline" action="" method="get">
{% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %}
</form>
{% endif %}
{% if quotas|length == 0 %}
<div class="empty-collection panel-body">
<p>
{% if request.GET.subevent %}
{% trans "Your search did not match any quotas." %}
{% else %}
{% blocktrans trimmed %}
You haven't created any quotas yet.
{% endblocktrans %}
{% endif %} {% endif %}
<th>{% trans "Total capacity" %}</th> </p>
<th>{% trans "Capacity left" %}</th>
<th class="action-col-2"></th> <a href="{% url "control:event.items.quotas.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 quota" %}</a>
</thead> </div>
<tbody> {% else %}
{% for q in quotas %} <div class="panel-body">
<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>
</div>
<div class="table-responsive">
<table class="table table-hover table-quotas">
<thead>
<tr> <tr>
<td> <th>{% trans "Quota name" %}</th>
<strong><a href="{% url "control:event.items.quotas.show" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}">{{ q.name }}</a></strong> <th>{% trans "Products" %}</th>
</td>
<td>
<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 %}">{{ item }}</a></li>
{% endfor %}
</ul>
</td>
{% if request.event.has_subevents %} {% if request.event.has_subevents %}
<td>{{ q.subevent.name }} {{ q.subevent.get_date_range_display }}</td> <th>{% trans "Date" context "subevent" %}</th>
{% endif %} {% endif %}
<td>{% if q.size == None %}Unlimited{% else %}{{ q.size }}{% endif %}</td> <th>{% trans "Total capacity" %}</th>
<td>{% include "pretixcontrol/items/fragment_quota_availability.html" with availability=q.availability %}</td> <th>{% trans "Capacity left" %}</th>
<td class="text-right"> <th class="action-col-2"></th>
<a href="{% url "control:event.items.quotas.edit" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<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> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for q in quotas %}
</div> <tr>
{% endif %} <td>
{% include "pretixcontrol/pagination.html" %} <strong><a href="{% url "control:event.items.quotas.show" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}">{{ q.name }}</a></strong>
</td>
<td>
<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 %}">{{ item }}</a>
</li>
{% endfor %}
</ul>
</td>
{% if request.event.has_subevents %}
<td>{{ q.subevent.name }} {{ q.subevent.get_date_range_display }}</td>
{% endif %}
<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 class="text-right">
<a href="{% url "control:event.items.quotas.edit" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<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 %}
</tbody>
</table>
</div>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -3,17 +3,24 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Disable application" %}{% endblock %} {% block title %}{% trans "Disable application" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Disable application" %}</h1> <div class="panel panel-default">
<form action="" method="post" class="form-horizontal"> <div class="panel-heading">
{% csrf_token %} <h1 class="panel-title">{% trans "Disable application" %}</h1>
<p>{% blocktrans %}Are you sure you want to disable the application <strong>{{ application }}</strong> permanently?{% endblocktrans %}</p> </div>
<div class="form-group submit-group"> <div class="panel-body">
<a href="{% url "control:user.settings.oauth.apps" %}" class="btn btn-default btn-cancel"> <form action="" method="post" class="form-horizontal">
{% trans "Cancel" %} {% csrf_token %}
</a> <p>{% blocktrans %}Are you sure you want to disable the application <strong>{{ application }}</strong>
<button type="submit" class="btn btn-danger btn-save"> permanently?{% endblocktrans %}</p>
{% trans "Disable" %} <div class="form-group submit-group">
</button> <a href="{% url "control:user.settings.oauth.apps" %}" class="btn btn-default btn-cancel">
</div> {% trans "Cancel" %}
</form> </a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Disable" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -3,48 +3,57 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Your applications" %}{% endblock %} {% block title %}{% trans "Your applications" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Your applications" %}</h1> <div class="panel panel-default">
{% if applications %} <div class="panel-heading">
<div class="table-responsive"> <h1 class="panel-title">{% trans "Your applications" %}</h1>
<table class="table table-condensed table-hover"> </div>
<thead> {% if applications %}
<tr> <div class="table-responsive">
<th>{% trans "Name" %}</th> <table class="table table-condensed table-hover">
<th class="action-col-2"></th> <thead>
</tr>
</thead>
<tbody>
{% for application in applications %}
<tr> <tr>
<td><strong><a href="{% url "control:user.settings.oauth.app" pk=application.pk %}">{{ application.name }}</a></strong></td> <th>{% trans "Name" %}</th>
<td class="text-right"> <th class="action-col-2"></th>
<a href="{% url "control:user.settings.oauth.app" pk=application.pk %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:user.settings.oauth.app.roll" pk=application.pk %}" class="btn btn-default btn-sm"><i class="fa fa-repeat"></i></a>
<a href="{% url "control:user.settings.oauth.app.disable" pk=application.pk %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for application in applications %}
</div> <tr>
<p> <td><strong><a
<a class="btn btn-primary" href="{% url "control:user.settings.oauth.apps.register" %}"> href="{% url "control:user.settings.oauth.app" pk=application.pk %}">{{ application.name }}</a></strong>
<span class="fa fa-plus"></span> </td>
{% trans "Create new application" %} <td class="text-right">
</a> <a href="{% url "control:user.settings.oauth.app" pk=application.pk %}"
</p> class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
{% else %} <a href="{% url "control:user.settings.oauth.app.roll" pk=application.pk %}"
<div class="empty-collection"> class="btn btn-default btn-sm"><i class="fa fa-repeat"></i></a>
<p> <a href="{% url "control:user.settings.oauth.app.disable" pk=application.pk %}"
{% blocktrans trimmed %} class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
No applications registered yet. </td>
{% endblocktrans %} </tr>
</p> {% endfor %}
</tbody>
</table>
</div>
<div class="panel-body">
<a class="btn btn-primary" href="{% url "control:user.settings.oauth.apps.register" %}">
<span class="fa fa-plus"></span>
{% trans "Create new application" %}
</a>
</div>
{% else %}
<div class="empty-collection panel-body">
<p>
{% blocktrans trimmed %}
No applications registered yet.
{% endblocktrans %}
</p>
<a href="{% url "control:user.settings.oauth.apps.register" %}" <a href="{% url "control:user.settings.oauth.apps.register" %}"
class="btn btn-primary btn-lg"> class="btn btn-primary btn-lg">
{% trans "Register a new application" %} {% trans "Register a new application" %}
</a> </a>
</div> </div>
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -3,14 +3,20 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Register a new application" %}{% endblock %} {% block title %}{% trans "Register a new application" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Register a new application" %}</h1> <div class="panel panel-default">
<form class="form-horizontal" method="post" action=""> <div class="panel-heading">
{% csrf_token %} <h1 class="panel-title">{% trans "Register a new application" %}</h1>
{% bootstrap_form form layout='control' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div> </div>
</form> <div class="panel-body">
<form class="form-horizontal" method="post" action="">
{% csrf_token %}
{% bootstrap_form form layout='control' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -3,17 +3,24 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Generate new application secret" %}{% endblock %} {% block title %}{% trans "Generate new application secret" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Generate new application secret" %}</h1> <div class="panel panel-default">
<form action="" method="post" class="form-horizontal"> <div class="panel-heading">
{% csrf_token %} <h1 class="panel-title">{% trans "Generate new application secret" %}</h1>
<p>{% blocktrans %}Are you sure you want to generate a new client secret for the application <strong>{{ application }}</strong>?{% endblocktrans %}</p> </div>
<div class="form-group submit-group"> <div class="panel-body">
<a href="{% url "control:user.settings.oauth.apps" %}" class="btn btn-default btn-cancel"> <form action="" method="post" class="form-horizontal">
{% trans "Cancel" %} {% csrf_token %}
</a> <p>{% blocktrans %}Are you sure you want to generate a new client secret for the application
<button type="submit" class="btn btn-danger btn-save"> <strong>{{ application }}</strong>?{% endblocktrans %}</p>
{% trans "Roll secret" %} <div class="form-group submit-group">
</button> <a href="{% url "control:user.settings.oauth.apps" %}" class="btn btn-default btn-cancel">
</div> {% trans "Cancel" %}
</form> </a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Roll secret" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -3,14 +3,20 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Update an application" %}{% endblock %} {% block title %}{% trans "Update an application" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Update an application" %}</h1> <div class="panel panel-default">
<form class="form-horizontal" method="post" action=""> <div class="panel-heading">
{% csrf_token %} <h1 class="panel-title">{% trans "Update an application" %}</h1>
{% bootstrap_form form layout='control' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div> </div>
</form> <div class="panel-body">
<form class="form-horizontal" method="post" action="">
{% csrf_token %}
{% bootstrap_form form layout='control' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -3,17 +3,23 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Revoke access" %}{% endblock %} {% block title %}{% trans "Revoke access" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Revoke access" %}</h1> <div class="panel panel-default">
<form action="" method="post" class="form-horizontal"> <div class="panel-heading">
{% csrf_token %} <h1 class="panel-title">{% trans "Revoke access" %}</h1>
<p>{% blocktrans %}Are you sure you want to revoke access to your account for the application <strong>{{ application }}</strong>?{% endblocktrans %}</p> </div>
<div class="form-group submit-group"> <div class="panel-body">
<a href="{% url "control:user.settings.oauth.list" %}" class="btn btn-default btn-cancel"> <form action="" method="post" class="form-horizontal">
{% trans "Cancel" %} {% csrf_token %}
</a> <p>{% blocktrans %}Are you sure you want to revoke access to your account for the application <strong>{{ application }}</strong>?{% endblocktrans %}</p>
<button type="submit" class="btn btn-danger btn-save"> <div class="form-group submit-group">
{% trans "Revoke" %} <a href="{% url "control:user.settings.oauth.list" %}" class="btn btn-default btn-cancel">
</button> {% trans "Cancel" %}
</div> </a>
</form> <button type="submit" class="btn btn-danger btn-save">
{% trans "Revoke" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -3,12 +3,15 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Authorized applications" %}{% endblock %} {% block title %}{% trans "Authorized applications" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Authorized applications" %}</h1> <div class="panel panel-default">
<p> <div class="panel-heading">
<h1 class="panel-title">{% trans "Authorized applications" %}</h1>
</div>
<div class="panel-body">
<a href="{% url "control:user.settings.oauth.apps" %}" class="btn btn-default"> <a href="{% url "control:user.settings.oauth.apps" %}" class="btn btn-default">
{% trans "Manage your own apps" %} {% trans "Manage your own apps" %}
</a> </a>
</p> </div>
{% if tokens %} {% if tokens %}
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-condensed table-hover table-quotas"> <table class="table table-condensed table-hover table-quotas">
@@ -54,7 +57,7 @@
</table> </table>
</div> </div>
{% else %} {% else %}
<div class="empty-collection"> <div class="empty-collection panel-body">
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
No applications have access to your pretix account. No applications have access to your pretix account.
@@ -62,4 +65,5 @@
</p> </p>
</div> </div>
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -4,35 +4,41 @@
{% trans "Cancel order" %} {% trans "Cancel order" %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default">
{% trans "Cancel order" %} <div class="panel-heading">
</h1> <h1 class="panel-title">
<p>{% blocktrans trimmed %} {% trans "Cancel order" %}
Do you really want to cancel this order? You cannot revert this action. </h1>
{% endblocktrans %}</p> </div>
<div class="panel-body">
<p>{% blocktrans trimmed %}
Do you really want to cancel this order? You cannot revert this action.
{% endblocktrans %}</p>
<form method="post" href=""> <form method="post" href="">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="status" value="c"/> <input type="hidden" name="status" value="c"/>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" name="send_email" value="on" checked="checked"> <input type="checkbox" name="send_email" value="on" checked="checked">
{% trans "Notify user by e-mail" %} {% trans "Notify user by e-mail" %}
</label> </label>
</div>
<div class="row checkout-button-row">
<div class="col-md-4">
<a class="btn btn-block btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "No, take me back" %}
</a>
</div>
<div class="col-md-4 col-md-offset-4">
<button class="btn btn-block btn-danger btn-lg" type="submit">
{% trans "Yes, cancel order" %}
</button>
</div>
<div class="clearfix"></div>
</div>
</form>
</div> </div>
<div class="row checkout-button-row"> </div>
<div class="col-md-4">
<a class="btn btn-block btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "No, take me back" %}
</a>
</div>
<div class="col-md-4 col-md-offset-4">
<button class="btn btn-block btn-danger btn-lg" type="submit">
{% trans "Yes, cancel order" %}
</button>
</div>
<div class="clearfix"></div>
</div>
</form>
{% endblock %} {% endblock %}

View File

@@ -7,49 +7,60 @@
{% endblocktrans %} {% endblocktrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% blocktrans trimmed with code=order.code %} <div class="panel-heading">
Change order: {{ code }} <a class="btn btn-default btn-sm pull-right"
{% endblocktrans %} href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
<a class="btn btn-link btn-lg" {% blocktrans trimmed with order=order.code %}
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> Back to order {{ order }}
{% blocktrans trimmed with order=order.code %} {% endblocktrans %}
Back to order {{ order }} </a>
{% endblocktrans %} <h1 class="panel-title">
</a> {% blocktrans trimmed with code=order.code %}
</h1> Change order: {{ code }}
<p> {% endblocktrans %}
{% blocktrans trimmed %} </h1>
You can use this tool to change the ordered products or to partially cancel the order. Please keep </div>
in mind that changing an order can have several implications, e.g. the payment method fee might change or <div class="panel-body">
additional questions can be added to the order that need to be answered by the user. <p>
{% endblocktrans %} {% blocktrans trimmed %}
</p> You can use this tool to change the ordered products or to partially cancel the order. Please keep
<p> in mind that changing an order can have several implications, e.g. the payment method fee might
{% blocktrans trimmed %} change or
The user will receive a notification about the change but in the case of new required questions, the user additional questions can be added to the order that need to be answered by the user.
will not be forced to answer them. {% endblocktrans %}
{% endblocktrans %} </p>
</p> <p>
<p> {% blocktrans trimmed %}
{% blocktrans trimmed %} The user will receive a notification about the change but in the case of new required questions, the
If an invoice is attached to the order, a cancellation will be created together with a new invoice. user
{% endblocktrans %} will not be forced to answer them.
</p> {% endblocktrans %}
<p> </p>
{% blocktrans trimmed %} <p>
If you chose "split into new order" for multiple positions, they will be all split in one second order {% blocktrans trimmed %}
together, not multiple orders. If an invoice is attached to the order, a cancellation will be created together with a new invoice.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
<div class="alert alert-warning"><strong> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
Please use this tool carefully. Changes you make here are not reversible. Also, if you change an order If you chose "split into new order" for multiple positions, they will be all split in one second
manually, not all constraints (e.g. on required add-ons) will be checked. Therefore, you might construct order
an order that would not be able to exist otherwise. together, not multiple orders.
In most cases it is easier to cancel the order completely and create a new one. {% endblocktrans %}
{% endblocktrans %} </p>
</strong></div> <div class="alert alert-warning"><strong>
{% blocktrans trimmed %}
Please use this tool carefully. Changes you make here are not reversible. Also, if you change an
order
manually, not all constraints (e.g. on required add-ons) will be checked. Therefore, you might
construct
an order that would not be able to exist otherwise.
In most cases it is easier to cancel the order completely and create a new one.
{% endblocktrans %}
</strong></div>
</div>
</div>
<form method="post" href=""> <form method="post" href="">
{% csrf_token %} {% csrf_token %}
{% for position in positions %} {% for position in positions %}
@@ -63,10 +74,10 @@
{% endif %} {% endif %}
{% if position.addon_to %} {% if position.addon_to %}
<em> <em>
{% blocktrans trimmed with posid=position.addon_to.positionid %} {% blocktrans trimmed with posid=position.addon_to.positionid %}
Add-On to position #{{ posid }} Add-On to position #{{ posid }}
{% endblocktrans %} {% endblocktrans %}
</em> </em>
{% endif %} {% endif %}
</h3> </h3>
</div> </div>
@@ -84,14 +95,14 @@
<div class="radio"> <div class="radio">
<label> <label>
<input name="{{ position.form.prefix }}-operation" type="radio" value="" <input name="{{ position.form.prefix }}-operation" type="radio" value=""
{% if not position.form.operation.value %}checked="checked"{% endif %}> {% if not position.form.operation.value %}checked="checked"{% endif %}>
{% trans "Keep unchanged" %} {% trans "Keep unchanged" %}
</label> </label>
</div> </div>
<div class="radio"> <div class="radio">
<label> <label>
<input name="{{ position.form.prefix }}-operation" type="radio" value="product" <input name="{{ position.form.prefix }}-operation" type="radio" value="product"
{% if position.form.operation.value == "product" %}checked="checked"{% endif %}> {% if position.form.operation.value == "product" %}checked="checked"{% endif %}>
{% trans "Change product to" %} {% trans "Change product to" %}
{% bootstrap_field position.form.itemvar layout='inline' %} {% bootstrap_field position.form.itemvar layout='inline' %}
</label> </label>
@@ -100,7 +111,7 @@
<div class="radio"> <div class="radio">
<label> <label>
<input name="{{ position.form.prefix }}-operation" type="radio" value="subevent" <input name="{{ position.form.prefix }}-operation" type="radio" value="subevent"
{% if position.form.operation.value == "subevent" %}checked="checked"{% endif %}> {% if position.form.operation.value == "subevent" %}checked="checked"{% endif %}>
{% trans "Change date to" context "subevent" %} {% trans "Change date to" context "subevent" %}
{% bootstrap_field position.form.subevent layout='inline' %} {% bootstrap_field position.form.subevent layout='inline' %}
</label> </label>
@@ -109,7 +120,7 @@
<div class="radio"> <div class="radio">
<label> <label>
<input name="{{ position.form.prefix }}-operation" type="radio" value="price" <input name="{{ position.form.prefix }}-operation" type="radio" value="price"
{% if position.form.operation.value == "price" %}checked="checked"{% endif %}> {% if position.form.operation.value == "price" %}checked="checked"{% endif %}>
{% trans "Change price to" %} {% trans "Change price to" %}
{% bootstrap_field position.form.price addon_after=request.event.currency layout='inline' %} {% bootstrap_field position.form.price addon_after=request.event.currency layout='inline' %}
{% if position.apply_tax %} {% if position.apply_tax %}
@@ -130,21 +141,21 @@
<div class="radio"> <div class="radio">
<label> <label>
<input name="{{ position.form.prefix }}-operation" type="radio" value="split" <input name="{{ position.form.prefix }}-operation" type="radio" value="split"
{% if position.form.operation.value == "split" %}checked="checked"{% endif %}> {% if position.form.operation.value == "split" %}checked="checked"{% endif %}>
{% trans "Split into new order" %} {% trans "Split into new order" %}
</label> </label>
</div> </div>
<div class="radio"> <div class="radio">
<label> <label>
<input name="{{ position.form.prefix }}-operation" type="radio" value="secret" <input name="{{ position.form.prefix }}-operation" type="radio" value="secret"
{% if position.form.operation.value == "secret" %}checked="checked"{% endif %}> {% if position.form.operation.value == "secret" %}checked="checked"{% endif %}>
{% trans "Generate a new secret" %} {% trans "Generate a new secret" %}
</label> </label>
</div> </div>
<div class="radio"> <div class="radio">
<label> <label>
<input name="{{ position.form.prefix }}-operation" type="radio" value="cancel" <input name="{{ position.form.prefix }}-operation" type="radio" value="cancel"
{% if position.form.operation.value == "cancel" %}checked="checked"{% endif %}> {% if position.form.operation.value == "cancel" %}checked="checked"{% endif %}>
{% trans "Remove from order" %} {% trans "Remove from order" %}
{% if position.addons.exists %} {% if position.addons.exists %}
<em class="text-danger"> <em class="text-danger">
@@ -204,7 +215,7 @@
</div> </div>
<div class="form-group submit-group"> <div class="form-group submit-group">
<a class="btn btn-default btn-lg" <a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %} {% trans "Cancel" %}
</a> </a>
<button class="btn btn-primary btn-save btn-lg" type="submit"> <button class="btn btn-primary btn-save btn-lg" type="submit">

View File

@@ -5,29 +5,34 @@
{% trans "Change contact information" %} {% trans "Change contact information" %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% trans "Change contact information" %} <div class="panel-heading">
<a class="btn btn-link btn-lg" <a class="btn btn-default btn-sm pull-right"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% blocktrans trimmed with order=order.code %} {% blocktrans trimmed with order=order.code %}
Back to order {{ order }} Back to order {{ order }}
{% endblocktrans %} {% endblocktrans %}
</a>
</h1>
<form method="post" class="form-horizontal" href="">
{% csrf_token %}
<input type="hidden" name="status" value="c" />
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %}
</a> </a>
<button class="btn btn-primary btn-save btn-lg" type="submit"> <h1 class="panel-title">
{% trans "Save" %} {% trans "Change contact information" %}
</button> </h1>
<div class="clearfix"></div>
</div> </div>
</form> <div class="panel-body">
<form method="post" class="form-horizontal" href="">
{% csrf_token %}
<input type="hidden" name="status" value="c"/>
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %}
</a>
<button class="btn btn-primary btn-save btn-lg" type="submit">
{% trans "Save" %}
</button>
<div class="clearfix"></div>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -5,34 +5,40 @@
{% trans "Change locale information" %} {% trans "Change locale information" %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% trans "Change locale information" %} <div class="panel-heading">
<a class="btn btn-link btn-lg" <a class="btn btn-default btn-sm pull-right"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% blocktrans trimmed with order=order.code %} {% blocktrans trimmed with order=order.code %}
Back to order {{ order }} Back to order {{ order }}
{% endblocktrans %} {% endblocktrans %}
</a>
</h1>
<p>
{% blocktrans trimmed %}
This language will be used whenever emails are sent to the users.
{% endblocktrans %}
</p>
<form method="post" class="form-horizontal" href="">
{% csrf_token %}
<input type="hidden" name="status" value="c"/>
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %}
</a> </a>
<button class="btn btn-primary btn-save btn-lg" type="submit"> <h1 class="panel-title">
{% trans "Save" %} {% trans "Change locale information" %}
</button> </h1>
<div class="clearfix"></div>
</div> </div>
</form> <div class="panel-body">
<p>
{% blocktrans trimmed %}
This language will be used whenever emails are sent to the users.
{% endblocktrans %}
</p>
<form method="post" class="form-horizontal" href="">
{% csrf_token %}
<input type="hidden" name="status" value="c"/>
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %}
</a>
<button class="btn btn-primary btn-save btn-lg" type="submit">
{% trans "Save" %}
</button>
<div class="clearfix"></div>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -5,26 +5,31 @@
{% trans "Change contact information" %} {% trans "Change contact information" %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% trans "Change order information" %} <div class="panel-heading">
<a class="btn btn-link btn-lg" <a class="btn btn-default btn-sm pull-right"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% blocktrans trimmed with order=order.code %} {% blocktrans trimmed with order=order.code %}
Back to order {{ order }} Back to order {{ order }}
{% endblocktrans %} {% endblocktrans %}
</a> </a>
</h1> <h1 class="panel-title">
{% trans "Change order information" %}
</h1>
</div>
</div>
<form method="post" class="form-horizontal" href="" enctype="multipart/form-data"> <form method="post" class="form-horizontal" href="" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<div class="panel-group" id="questions_accordion"> <div class="" id="questions_accordion">
{% if request.event.settings.invoice_address_asked or order.invoice_address or request.event.settings.invoice_name_required %} {% if request.event.settings.invoice_address_asked or order.invoice_address or request.event.settings.invoice_name_required %}
<details class="panel panel-default" open> <details class="panel panel-default" open>
<summary class="panel-heading"> <summary class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<strong>{% trans "Invoice information" %} {% if not request.event.settings.invoice_address_required %} <strong>{% trans "Invoice information" %}
{% trans "(optional)" %} {% if not request.event.settings.invoice_address_required %}
{% endif %}</strong> {% trans "(optional)" %}
{% endif %}</strong>
<i class="fa fa-angle-down collapse-indicator"></i> <i class="fa fa-angle-down collapse-indicator"></i>
</h4> </h4>
</summary> </summary>
@@ -61,7 +66,7 @@
</div> </div>
<div class="form-group submit-group"> <div class="form-group submit-group">
<a class="btn btn-default btn-lg" <a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %} {% trans "Cancel" %}
</a> </a>
<button class="btn btn-primary btn-save btn-lg" type="submit"> <button class="btn btn-primary btn-save btn-lg" type="submit">

View File

@@ -5,29 +5,34 @@
{% trans "Extend payment term" %} {% trans "Extend payment term" %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% trans "Extend payment term" %} <div class="panel-heading">
<a class="btn btn-link btn-lg" <a class="btn btn-default btn-sm pull-right"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% blocktrans trimmed with order=order.code %} {% blocktrans trimmed with order=order.code %}
Back to order {{ order }} Back to order {{ order }}
{% endblocktrans %} {% endblocktrans %}
</a>
</h1>
<form method="post" class="form-horizontal" href="">
{% csrf_token %}
<input type="hidden" name="status" value="c" />
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %}
</a> </a>
<button class="btn btn-danger btn-save btn-lg" type="submit"> <h1 class="panel-title">
{% trans "Save" %} {% trans "Extend payment term" %}
</button> </h1>
<div class="clearfix"></div>
</div> </div>
</form> <div class="panel-body">
<form method="post" class="form-horizontal" href="">
{% csrf_token %}
<input type="hidden" name="status" value="c"/>
{% bootstrap_form form layout='horizontal' %}
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %}
</a>
<button class="btn btn-danger btn-save btn-lg" type="submit">
{% trans "Save" %}
</button>
<div class="clearfix"></div>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -12,48 +12,6 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% blocktrans asvar s_taxes %}taxes{% endblocktrans %} {% blocktrans asvar s_taxes %}taxes{% endblocktrans %}
<h1>
{% blocktrans trimmed with code=order.code %}
Order details: {{ code }}
{% endblocktrans %}
{% include "pretixcontrol/orders/fragment_order_status.html" with order=order class="pull-right" %}
</h1>
{% if 'can_change_orders' in request.eventpermset %}
<form action="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"
method="post">
{% csrf_token %}
<div class="btn-toolbar" role="toolbar">
<div class="btn-group" role="group">
{% if order.status == 'n' or order.status == 'e' %}
<a href="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}?status=p" class="btn btn-default">
{% trans "Mark as paid" %}
</a>
<a href="{% url "control:event.order.extend" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}" class="btn btn-default">
{% trans "Extend payment term" %}
</a>
{% endif %}
{% if order.cancel_allowed %}
<a href="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}?status=c" class="btn btn-default">
{% trans "Cancel order" %}
</a>
{% elif order.status == 'p' %}
<button name="status" value="n" class="btn btn-default">{% trans "Mark as not paid" %}</button>
<a href="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}?status=r" class="btn btn-default">
{% trans "Refund order" %}
</a>
{% endif %}
<a href="{% eventurl request.event "presale:event.order" order=order.code secret=order.secret %}"
class="btn btn-default" target="_blank">
{% trans "View order as user" %}
</a>
<a href="{% url "control:event.order.mail_history" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}" class="btn btn-default">
{% trans "View email history" %}
</a>
</div>
</div>
</form>
{% endif %}
{% if order.is_expired_by_time %} {% if order.is_expired_by_time %}
<form action="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}" <form action="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"
method="post"> method="post">
@@ -68,13 +26,50 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-lg-10"> <div class="col-xs-12 col-lg-10">
<div class="panel panel-primary items"> <div class="panel items">
<div class="panel-heading">
<h3 class="panel-title">
{% trans "Order details" %}
</h3>
</div>
<div class="panel-body"> <div class="panel-body">
<h1>
{% blocktrans trimmed with code=order.code %}
Order details: {{ code }}
{% endblocktrans %}
{% include "pretixcontrol/orders/fragment_order_status.html" with order=order class="pull-right" %}
</h1>
{% if 'can_change_orders' in request.eventpermset %}
<form action="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"
method="post">
{% csrf_token %}
<div class="btn-toolbar" role="toolbar">
<div class="btn-group" role="group">
{% if order.status == 'n' or order.status == 'e' %}
<a href="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}?status=p" class="btn btn-default">
{% trans "Mark as paid" %}
</a>
<a href="{% url "control:event.order.extend" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}" class="btn btn-default">
{% trans "Extend payment term" %}
</a>
{% endif %}
{% if order.cancel_allowed %}
<a href="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}?status=c" class="btn btn-default">
{% trans "Cancel order" %}
</a>
{% elif order.status == 'p' %}
<button name="status" value="n" class="btn btn-default">{% trans "Mark as not paid" %}</button>
<a href="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}?status=r" class="btn btn-default">
{% trans "Refund order" %}
</a>
{% endif %}
<a href="{% eventurl request.event "presale:event.order" order=order.code secret=order.secret %}"
class="btn btn-default" target="_blank">
{% trans "View order as user" %}
</a>
<a href="{% url "control:event.order.mail_history" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}" class="btn btn-default">
{% trans "View email history" %}
</a>
</div>
</div>
</form>
{% endif %}
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>{% trans "Order code" %}</dt> <dt>{% trans "Order code" %}</dt>
<dd>{{ order.code }}</dd> <dd>{{ order.code }}</dd>

View File

@@ -3,16 +3,18 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Email history" %}{% endblock %} {% block title %}{% trans "Email history" %}{% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% trans "Email history" %} <div class="panel-heading">
<a class="btn btn-link btn-lg" <a class="btn btn-default btn-sm pull-right"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% blocktrans trimmed with order=order.code %} {% blocktrans trimmed with order=order.code %}
Back to order {{ order }} Back to order {{ order }}
{% endblocktrans %} {% endblocktrans %}
</a> </a>
</h1> <h1 class="panel-title">
<div> {% trans "Email history" %}
</h1>
</div>
<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">
@@ -55,6 +57,8 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
</div> </div>
{% include "pretixcontrol/pagination.html" %}
{% endblock %} {% endblock %}

View File

@@ -5,32 +5,38 @@
{% trans "Mark order as paid" %} {% trans "Mark order as paid" %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% trans "Mark order as paid" %} <div class="panel-heading">
<a class="btn btn-link btn-lg" <a class="btn btn-default btn-sm pull-right"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% blocktrans trimmed with order=order.code %} {% blocktrans trimmed with order=order.code %}
Back to order {{ order }} Back to order {{ order }}
{% endblocktrans %} {% endblocktrans %}
</a>
</h1>
<form method="post" class="form-horizontal" href="">
{% csrf_token %}
<p>{% blocktrans trimmed %}
Do you really want to mark this order as paid?
{% endblocktrans %}</p>
<input type="hidden" name="status" value="p" />
{% bootstrap_form form layout='horizontal' horizontal_label_class='sr-only' horizontal_field_class='col-md-12' %}
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %}
</a> </a>
<button class="btn btn-primary btn-save btn-lg" type="submit"> <h1 class="panel-title">
{% trans "Mark as paid" %} {% trans "Mark order as paid" %}
</button> </h1>
<div class="clearfix"></div>
</div> </div>
</form> <div class="panel-body">
<form method="post" class="form-horizontal" href="">
{% csrf_token %}
<p>{% blocktrans trimmed %}
Do you really want to mark this order as paid?
{% endblocktrans %}</p>
<input type="hidden" name="status" value="p"/>
{% bootstrap_form form layout='horizontal' horizontal_label_class='sr-only' horizontal_field_class='col-md-12' %}
<div class="form-group submit-group">
<a class="btn btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "Cancel" %}
</a>
<button class="btn btn-primary btn-save btn-lg" type="submit">
{% trans "Mark as paid" %}
</button>
<div class="clearfix"></div>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -4,37 +4,43 @@
{% trans "Refund order" %} {% trans "Refund order" %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% trans "Refund order" %} <div class="panel-heading">
<a class="btn btn-link btn-lg" <a class="btn btn-default btn-sm pull-right"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% blocktrans trimmed with order=order.code %} {% blocktrans trimmed with order=order.code %}
Back to order {{ order }} Back to order {{ order }}
{% endblocktrans %} {% endblocktrans %}
</a> </a>
</h1> <h1 class="panel-title">
<form method="post" href=""> {% trans "Refund order" %}
<p>{% blocktrans trimmed %} </h1>
Do you really want to refund this order? You cannot revert this action.
{% endblocktrans %}</p>
{{ payment|safe }}
{% csrf_token %}
<input type="hidden" name="status" value="r" />
<div class="row checkout-button-row">
<div class="col-md-4">
<a class="btn btn-block btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "No, take me back" %}
</a>
</div>
<div class="col-md-4 col-md-offset-4">
<button class="btn btn-block btn-danger btn-lg" type="submit">
{% trans "Yes, refund order" %}
</button>
</div>
<div class="clearfix"></div>
</div> </div>
</form> <div class="panel-body">
<form method="post" href="">
<p>{% blocktrans trimmed %}
Do you really want to refund this order? You cannot revert this action.
{% endblocktrans %}</p>
{{ payment|safe }}
{% csrf_token %}
<input type="hidden" name="status" value="r"/>
<div class="row checkout-button-row">
<div class="col-md-4">
<a class="btn btn-block btn-default btn-lg"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% trans "No, take me back" %}
</a>
</div>
<div class="col-md-4 col-md-offset-4">
<button class="btn btn-block btn-danger btn-lg" type="submit">
{% trans "Yes, refund order" %}
</button>
</div>
<div class="clearfix"></div>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -3,43 +3,51 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Send email" %}{% endblock %} {% block title %}{% trans "Send email" %}{% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default panel-with-btn">
{% trans "Send email" %} <div class="panel-heading">
<a class="btn btn-link btn-lg" <a class="btn btn-default btn-sm pull-right"
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
{% blocktrans trimmed with order=order.code %} {% blocktrans trimmed with order=order.code %}
Back to order {{ order }} Back to order {{ order }}
{% endblocktrans %} {% endblocktrans %}
</a> </a>
</h1> <h1 class="panel-title">
{% block inner %} {% trans "Send email" %}
<form class="form-horizontal" method="post" action=""> </h1>
{% csrf_token %} </div>
{% bootstrap_field form.sendto layout='horizontal' %} <div class="panel-body">
{% bootstrap_field form.subject layout='horizontal' %} <form class="form-horizontal" method="post" action="">
{% bootstrap_field form.message layout='horizontal' %} {% csrf_token %}
{% if request.method == "POST" %} {% bootstrap_field form.sendto layout='horizontal' %}
<fieldset> {% bootstrap_field form.subject layout='horizontal' %}
<legend>{% trans "E-mail preview" %}</legend> {% bootstrap_field form.message layout='horizontal' %}
<div class="tab-pane mail-preview-group"> <div class="form-group submit-group">
<pre lang="" class="mail-preview"> <button type="submit" class="btn btn-default btn-save pull-left" name="action" value="preview">
{% for segment in preview_output %} {% trans "Preview email" %}
{% spaceless %} </button>
{{ segment|linebreaksbr }} <button type="submit" class="btn btn-primary btn-save">
{% endspaceless %} {% trans "Send" %}
{% endfor %} </button>
</pre> </div>
</div> </form>
</fieldset> </div>
{% endif %} </div>
<div class="form-group submit-group"> {% if request.method == "POST" %}
<button type="submit" class="btn btn-default btn-save pull-left" name="action" value="preview"> <fieldset class="panel panel-default">
{% trans "Preview email" %} <div class="panel-heading">
</button> <legend>{% trans "E-mail preview" %}</legend>
<button type="submit" class="btn btn-primary btn-save">
{% trans "Send" %}
</button>
</div> </div>
</form> <div class="panel-body">
{% endblock %} <div class="tab-pane mail-preview-group">
<pre lang="" class="mail-preview">
{% for segment in preview_output %}
{% spaceless %}
{{ segment|linebreaksbr }}
{% endspaceless %}
{% endfor %}
</pre>
</div>
</div>
</fieldset>
{% endif %}
{% endblock %} {% endblock %}

View File

@@ -4,12 +4,11 @@
{% load order_overview %} {% load order_overview %}
{% block title %}{% trans "Data export" %}{% endblock %} {% block title %}{% trans "Data export" %}{% endblock %}
{% block content %} {% block content %}
<h1> {% if "identifier" in request.GET %}
{% trans "Data export" %} <p class="text-right">
{% if "identifier" in request.GET %}
<a href="?" class="btn btn-default">{% trans "Show all" %}</a> <a href="?" class="btn btn-default">{% trans "Show all" %}</a>
{% endif %} </p>
</h1> {% endif %}
{% for e in exporters %} {% for e in exporters %}
<details class="panel panel-default" {% if "identifier" in request.GET %}open{% endif %}> <details class="panel panel-default" {% if "identifier" in request.GET %}open{% endif %}>
<summary class="panel-heading"> <summary class="panel-heading">
@@ -21,10 +20,10 @@
<div id="{{ e.identifier }}"> <div id="{{ e.identifier }}">
<div class="panel-body"> <div class="panel-body">
<form action="{% url "control:event.orders.export.do" event=request.event.slug organizer=request.organizer.slug %}" <form action="{% url "control:event.orders.export.do" event=request.event.slug organizer=request.organizer.slug %}"
method="post" class="form-horizontal" data-asynctask data-asynctask-download method="post" class="form-horizontal" data-asynctask data-asynctask-download
data-asynctask-long> data-asynctask-long>
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="exporter" value="{{ e.identifier }}" /> <input type="hidden" name="exporter" value="{{ e.identifier }}"/>
{% bootstrap_form e.form layout='horizontal' %} {% bootstrap_form e.form layout='horizontal' %}
<button class="btn btn-primary pull-right" type="submit"> <button class="btn btn-primary pull-right" type="submit">
<span class="icon icon-upload"></span> {% trans "Start export" %} <span class="icon icon-upload"></span> {% trans "Start export" %}

View File

@@ -6,135 +6,150 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Orders" %}{% endblock %} {% block title %}{% trans "Orders" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Orders" %}</h1> <div class="panel panel-default">
{% if not filter_form.filtered and orders|length == 0 %} {% if not filter_form.filtered and orders|length == 0 %}
<div class="empty-collection"> <div class="empty-collection panel-body">
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
Nobody ordered a ticket yet. Nobody ordered a ticket yet.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
{% if not request.event.live %} {% if not request.event.live %}
<a href="{% url "control:event.live" event=request.event.slug organizer=request.event.organizer.slug %}" <a href="{% url "control:event.live" event=request.event.slug organizer=request.event.organizer.slug %}"
class="btn btn-primary btn-lg"> class="btn btn-primary btn-lg">
{% trans "Take your shop live" %} {% trans "Take your shop live" %}
</a> </a>
{% else %} {% else %}
<a href="{% eventurl request.event "presale:event.index" %}" class="btn btn-primary btn-lg"> <a href="{% eventurl request.event "presale:event.index" %}" class="btn btn-primary btn-lg">
{% trans "Go to the ticket shop" %} {% trans "Go to the ticket shop" %}
</a> </a>
{% endif %} {% endif %}
</div> </div>
{% else %} {% else %}
<div class="row filter-form"> <div class="panel-body">
<form class="col-md-2 col-xs-12" <div class="row filter-form">
action="{% url "control:event.orders.go" event=request.event.slug organizer=request.event.organizer.slug %}"> <form class="col-md-2 col-xs-12"
<div class="input-group"> action="{% url "control:event.orders.go" event=request.event.slug organizer=request.event.organizer.slug %}">
<input type="text" name="code" class="form-control" placeholder="{% trans "Order code" %}" autofocus> <div class="input-group">
<span class="input-group-btn"> <input type="text" name="code" class="form-control" placeholder="{% trans "Order 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> </div>
</form> </form>
<form class="" action="" method="get"> <form class="" action="" method="get">
<div class="col-md-2 col-xs-6"> <div class="col-md-2 col-xs-6">
{% bootstrap_field filter_form.status layout='inline' %} {% bootstrap_field filter_form.status layout='inline' %}
</div> </div>
{% if request.event.has_subevents %} {% if request.event.has_subevents %}
<div class="col-md-1 col-xs-6"> <div class="col-md-1 col-xs-6">
{% bootstrap_field filter_form.item layout='inline' %} {% bootstrap_field filter_form.item layout='inline' %}
</div> </div>
<div class="col-md-2 col-xs-6"> <div class="col-md-2 col-xs-6">
{% bootstrap_field filter_form.subevent layout='inline' %} {% bootstrap_field filter_form.subevent layout='inline' %}
</div> </div>
<div class="col-md-1 col-xs-6"> <div class="col-md-1 col-xs-6">
{% bootstrap_field filter_form.provider layout='inline' %} {% bootstrap_field filter_form.provider layout='inline' %}
</div> </div>
{% else %} {% else %}
<div class="col-md-2 col-xs-6"> <div class="col-md-2 col-xs-6">
{% bootstrap_field filter_form.item layout='inline' %} {% bootstrap_field filter_form.item layout='inline' %}
</div> </div>
<div class="col-md-2 col-xs-6"> <div class="col-md-2 col-xs-6">
{% bootstrap_field filter_form.provider layout='inline' %} {% bootstrap_field filter_form.provider layout='inline' %}
</div> </div>
{% endif %} {% endif %}
<div class="col-md-2 col-xs-6"> <div class="col-md-2 col-xs-6">
{% bootstrap_field filter_form.query layout='inline' %} {% bootstrap_field filter_form.query layout='inline' %}
</div> </div>
<div class="col-md-2 col-xs-6"> <div class="col-md-2 col-xs-6">
<button class="btn btn-primary btn-block" type="submit"> <button class="btn btn-primary btn-block" type="submit">
<span class="fa fa-filter"></span> <span class="fa fa-filter"></span>
<span class="hidden-md"> <span class="hidden-md">
{% trans "Filter" %} {% trans "Filter" %}
</span> </span>
</button> </button>
</div>
</form>
</div> </div>
</form> {% if filter_form.is_valid and filter_form.cleaned_data.question %}
</div> <p class="text-muted">
{% if filter_form.is_valid and filter_form.cleaned_data.question %} <span class="fa fa-filter"></span>
<p class="text-muted"> {% blocktrans trimmed with question=filter_form.cleaned_data.question.question %}
<span class="fa fa-filter"></span> List filtered by answers to question "{{ question }}".
{% blocktrans trimmed with question=filter_form.cleaned_data.question.question %} {% endblocktrans %}
List filtered by answers to question "{{ question }}". <a href="?{% url_replace request 'question' '' 'answer' '' %}" class="text-muted">
{% endblocktrans %} <span class="fa fa-times"></span>
<a href="?{% url_replace request 'question' '' 'answer' ''%}" class="text-muted"> {% trans "Remove filter" %}
<span class="fa fa-times"></span> </a>
{% trans "Remove filter" %} </p>
</a> {% endif %}
</p> </div>
{% endif %} <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>
<th>{% trans "Order code" %}
<a href="?{% url_replace request 'ordering' '-code' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'code' %}"><i class="fa fa-caret-up"></i></a></th>
<th>{% trans "User" %}
<a href="?{% url_replace request 'ordering' '-email' %}"><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 "Order date" %}
<a href="?{% url_replace request 'ordering' '-datetime' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'datetime' %}"><i class="fa fa-caret-up"></i></a>
</th>
<th class="text-right">{% trans "Order total" %}
<a href="?{% url_replace request 'ordering' '-total' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'total' %}"><i class="fa fa-caret-up"></i></a></th>
<th class="text-right">{% trans "Positions" %}
<a href="?{% url_replace request 'ordering' '-pcnt' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'pcnt' %}"><i class="fa fa-caret-up"></i></a></th>
<th class="text-right">{% 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>
</tr>
</thead>
<tbody>
{% for o in orders %}
<tr> <tr>
<td> <th>{% trans "Order code" %}
<strong> <a href="?{% url_replace request 'ordering' '-code' %}"><i class="fa fa-caret-down"></i></a>
<a <a href="?{% url_replace request 'ordering' 'code' %}"><i class="fa fa-caret-up"></i></a>
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=o.code %}"> </th>
{{ o.code }} <th>{% trans "User" %}
</a> <a href="?{% url_replace request 'ordering' '-email' %}"><i
</strong> class="fa fa-caret-down"></i></a>
</td> <a href="?{% url_replace request 'ordering' 'email' %}"><i class="fa fa-caret-up"></i></a>
<td> </th>
{{ o.email|default_if_none:"" }} <th>{% trans "Order date" %}
{% if o.invoice_address.name %} <a href="?{% url_replace request 'ordering' '-datetime' %}"><i class="fa fa-caret-down"></i></a>
<br>{{ o.invoice_address.name }} <a href="?{% url_replace request 'ordering' 'datetime' %}"><i
{% endif %} class="fa fa-caret-up"></i></a>
</td> </th>
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td> <th class="text-right">{% trans "Order total" %}
<td class="text-right">{{ o.total|money:request.event.currency }}</td> <a href="?{% url_replace request 'ordering' '-total' %}"><i
<td class="text-right">{{ o.pcnt }}</td> class="fa fa-caret-down"></i></a>
<td class="text-right">{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td> <a href="?{% url_replace request 'ordering' 'total' %}"><i class="fa fa-caret-up"></i></a>
</th>
<th class="text-right">{% trans "Positions" %}
<a href="?{% url_replace request 'ordering' '-pcnt' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'pcnt' %}"><i class="fa fa-caret-up"></i></a>
</th>
<th class="text-right">{% 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>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for o in orders %}
</div> <tr>
{% include "pretixcontrol/pagination.html" %} <td>
{% endif %} <strong>
<a
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=o.code %}">
{{ o.code }}
</a>
</strong>
</td>
<td>
{{ o.email|default_if_none:"" }}
{% if o.invoice_address.name %}
<br>{{ o.invoice_address.name }}
{% endif %}
</td>
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
<td class="text-right">{{ o.total|money:request.event.currency }}</td>
<td class="text-right">{{ o.pcnt }}</td>
<td class="text-right">{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
{% endif %}
</div>
{% endblock %} {% endblock %}

View File

@@ -3,31 +3,42 @@
{% load order_overview %} {% load order_overview %}
{% block title %}{% trans "Sales overview" %}{% endblock %} {% block title %}{% trans "Sales overview" %}{% endblock %}
{% block content %} {% block content %}
{% url "control:event.orders" organizer=request.event.organizer.slug event=request.event.slug as listurl %} <div class="panel panel-default panel-with-button">
<div class="pull-right"> <div class="panel-heading">
<div class="btn-group" role="group" id="sumtoggle"> {% url "control:event.orders" organizer=request.event.organizer.slug event=request.event.slug as listurl %}
<button type="button" data-target=".count" class="btn btn-default active">{% trans "Sales" %}</button> <div class="pull-right">
<button type="button" data-target=".sum-gross" class="btn btn-default">{% trans "Revenue (gross)" %}</button> <div class="btn-group" role="group" id="sumtoggle">
<button type="button" data-target=".sum-net" class="btn btn-default">{% trans "Revenue (net)" %}</button> <button type="button" data-target=".count"
class="btn btn-sm btn-default active">{% trans "Sales" %}</button>
<button type="button" data-target=".sum-gross"
class="btn btn-sm btn-default">{% trans "Revenue (gross)" %}</button>
<button type="button" data-target=".sum-net"
class="btn btn-sm btn-default">{% trans "Revenue (net)" %}</button>
</div>
</div>
<h1 class="panel-title">{% trans "Order overview" %}</h1>
<div class="clearfix"></div>
</div> </div>
</div> {% if request.event.has_subevents %}
<h1>{% trans "Order overview" %}</h1> <form class="panel-body form-inline helper-display-inline" action="" method="get">
{% if request.event.has_subevents %} {% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %}
<form class="form-inline helper-display-inline" action="" method="get"> </form>
{% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %} {% endif %}
</form> {% if subevent_warning %}
{% endif %} <div class="panel-body">
{% if subevent_warning %} <div class="alert alert-info">
<div class="alert alert-info"> {% blocktrans trimmed context "subevent" %}
{% blocktrans trimmed context "subevent" %} If you select a single date, payment method fees will not be listed here as it might not be
If you select a single date, payment method fees will not be listed here as it might not be clear which clear
date they belong to. which
{% endblocktrans %} date they belong to.
</div> {% endblocktrans %}
{% endif %} </div>
<div class="table-responsive"> </div>
<table class="table table-condensed table-hover table-product-overview"> {% endif %}
<thead> <div class="table-responsive">
<table class="table table-condensed table-hover table-product-overview">
<thead>
<tr> <tr>
<th>{% trans "Product" %}</th> <th>{% trans "Product" %}</th>
<th>{% trans "Canceled" %}</th> <th>{% trans "Canceled" %}</th>
@@ -44,8 +55,8 @@
<th>{% trans "Paid" %}</th> <th>{% trans "Paid" %}</th>
<th>{% trans "Total" %}</th> <th>{% trans "Total" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for tup in items_by_category %} {% for tup in items_by_category %}
{% if tup.0 %} {% if tup.0 %}
<tr class="category"> <tr class="category">
@@ -105,8 +116,8 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
</tbody> </tbody>
<tfoot> <tfoot>
<tr class="total"> <tr class="total">
<th>{% trans "Total" %}</th> <th>{% trans "Total" %}</th>
<th>{{ total.num_canceled|togglesum:request.event.currency }}</th> <th>{{ total.num_canceled|togglesum:request.event.currency }}</th>
@@ -116,7 +127,8 @@
<th>{{ total.num_paid|togglesum:request.event.currency }}</th> <th>{{ total.num_paid|togglesum:request.event.currency }}</th>
<th>{{ total.num_total|togglesum:request.event.currency }}</th> <th>{{ total.num_total|togglesum:request.event.currency }}</th>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -3,44 +3,6 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Organizer" %}{% endblock %} {% block title %}{% trans "Organizer" %}{% endblock %}
{% block content %} {% block content %}
<h1>
{% blocktrans with name=organizer.name %}Organizer: {{ name }}{% endblocktrans %}
{% if 'can_change_organizer_settings' in request.orgapermset %}
<a href="{% url "control:organizer.edit" organizer=organizer.slug %}"
class="btn btn-default hidden-print">
<span class="fa fa-edit"></span>
{% trans "Edit" %}
</a>
{% endif %}
</h1>
<ul class="nav nav-pills hidden-print">
<li {% if "organizer" == url_name %}class="active"{% endif %}>
<a href="{% url "control:organizer" organizer=organizer.slug %}">
{% trans "Events" %}
</a>
</li>
{% if 'can_change_teams' in request.orgapermset %}
<li {% if "organizer.team" in url_name %}class="active"{% endif %}>
<a href="{% url "control:organizer.teams" organizer=organizer.slug %}">
{% trans "Teams" %}
</a>
</li>
{% endif %}
{% if 'can_change_organizer_settings' in request.orgapermset %}
<li {% if "organizer.display" in url_name %}class="active"{% endif %}>
<a href="{% url "control:organizer.display" organizer=organizer.slug %}">
{% trans "Display" %}
</a>
</li>
{% endif %}
{% for nav in nav_organizer %}
<li {% if nav.active %}class="active"{% endif %}>
<a href="{{ nav.url }}">
{{ nav.label }}
</a>
</li>
{% endfor %}
</ul>
{% block inner %} {% block inner %}
{% endblock %} {% endblock %}

View File

@@ -3,19 +3,22 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Create a new organizer" %}{% endblock %} {% block title %}{% trans "Create a new organizer" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Create a new organizer" %}</h1>
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% csrf_token %} <div class="panel panel-default">
{% bootstrap_form_errors form %} <div class="panel-heading">
<fieldset> <h1 class="panel-title">{% trans "Create a new organizer" %}</h1>
<legend>{% trans "General information" %}</legend> </div>
{% bootstrap_field form.name layout="horizontal" %} <div class="panel-body">
{% bootstrap_field form.slug layout="horizontal" %} {% csrf_token %}
</fieldset> {% bootstrap_form_errors form %}
<div class="form-group submit-group"> {% bootstrap_field form.name layout="horizontal" %}
<button type="submit" class="btn btn-primary btn-save"> {% bootstrap_field form.slug layout="horizontal" %}
{% trans "Save" %} <div class="form-group submit-group">
</button> <button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</div>
</div> </div>
</form> </form>
{% endblock %} {% endblock %}

View File

@@ -2,11 +2,18 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inner %} {% block inner %}
<div class="panel panel-default">
{% if events|length == 0 %} {% if events|length == 0 %}
<p> <div class="panel-body empty-collection">
<em>{% trans "You currently do not have access to any events." %}</em> <em>{% trans "You currently do not have access to any events." %}</em>
</p> </div>
{% else %} {% else %}
<div class="panel-body">
<a href="{% url "control:events.add" %}" class="btn btn-default">
<span class="fa fa-plus"></span>
{% trans "Create a new event" %}
</a>
</div>
<table class="table table-condensed table-hover"> <table class="table table-condensed table-hover">
<thead> <thead>
<tr> <tr>
@@ -27,8 +34,5 @@
</tbody> </tbody>
</table> </table>
{% endif %} {% endif %}
<a href="{% url "control:events.add" %}" class="btn btn-default"> </div>
<span class="fa fa-plus"></span>
{% trans "Create a new event" %}
</a>
{% endblock %} {% endblock %}

View File

@@ -4,25 +4,32 @@
{% block inner %} {% block inner %}
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Organizer page" %}</legend> <div class="panel-heading">
{% bootstrap_form_errors form %} <legend>{% trans "Organizer page" %}</legend>
{% bootstrap_field form.locales layout="control" %} </div>
{% bootstrap_field form.organizer_logo_image layout="control" %} <div class="panel-body">
{% bootstrap_field form.organizer_homepage_text layout="control" %} {% bootstrap_form_errors form %}
{% bootstrap_field form.event_list_type layout="control" %} {% bootstrap_field form.locales layout="control" %}
{% bootstrap_field form.organizer_link_back layout="control" %} {% bootstrap_field form.organizer_logo_image layout="control" %}
{% bootstrap_field form.organizer_homepage_text layout="control" %}
{% bootstrap_field form.event_list_type layout="control" %}
{% bootstrap_field form.organizer_link_back layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel-default panel">
<legend>{% trans "Shop design" %}</legend> <div class="panel-heading">
<p class="help-block"> <legend>{% trans "Shop design" %}</legend>
{% blocktrans trimmed %} </div>
These settings will be used for the organizer page as well as for the default settings <div class="panel-body">
for all events in this account that do not have their own design settings. <p class="help-block">
{% endblocktrans %} {% blocktrans trimmed %}
</p> These settings will be used for the organizer page as well as for the default settings
{% bootstrap_field form.primary_color layout="control" %} for all events in this account that do not have their own design settings.
{% bootstrap_field form.primary_font layout="control" %} {% endblocktrans %}
</p>
{% bootstrap_field form.primary_color layout="control" %}
{% bootstrap_field form.primary_font layout="control" %}
</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">

View File

@@ -4,80 +4,93 @@
{% load formset_tags %} {% load formset_tags %}
{% block title %}{% trans "Organizer" %}{% endblock %} {% block title %}{% trans "Organizer" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Organizer" %}</h1>
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data"> <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "General information" %}</legend> <div class="panel-heading">
{% bootstrap_form_errors form %} <legend>{% trans "General information" %}</legend>
{% bootstrap_field form.name layout="control" %} </div>
{% bootstrap_field form.slug layout="control" %} <div class="panel-body">
{% if form.domain %} {% bootstrap_form_errors form %}
{% bootstrap_field form.domain layout="control" %} {% bootstrap_field form.name layout="control" %}
{% endif %} {% bootstrap_field form.slug layout="control" %}
{% if form.domain %}
{% bootstrap_field form.domain layout="control" %}
{% endif %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Other" %}</legend> <div class="panel-heading">
{% bootstrap_form_errors sform %} <legend>{% trans "Other" %}</legend>
{% bootstrap_field sform.organizer_info_text layout="control" %} </div>
<div class="panel-body">
{% bootstrap_form_errors sform %}
{% bootstrap_field sform.organizer_info_text layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Event metadata (advanced)" %}</legend> <div class="panel-heading">
<p> <legend>{% trans "Event metadata (advanced)" %}</legend>
{% blocktrans trimmed %} </div>
You can here define a set of metadata properties (i.e. variables) that you can later set for your <div class="panel-body">
events and re-use in places like ticket layouts. This is an useful timesaver if you create lots and
lots of events.
{% endblocktrans %}
</p>
<div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}">
{{ formset.management_form }}
{% bootstrap_formset_errors formset %}
<div data-formset-body>
{% for form in formset %}
<div class="row" data-formset-form>
<div class="sr-only">
{{ form.id }}
{% bootstrap_field form.DELETE form_group_class="" layout="inline" %}
</div>
<div class="col-md-5">
{% bootstrap_form_errors form %}
{% bootstrap_field form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-5 col-lg-6">
{% bootstrap_field form.default layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 col-lg-1 text-right">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
</div>
{% endfor %}
</div>
<script type="form-template" data-formset-empty-form>
{% escapescript %}
<div class="row" data-formset-form>
<div class="sr-only">
{{ formset.empty_form.id }}
{% bootstrap_field formset.empty_form.DELETE form_group_class="" layout="inline" %}
</div>
<div class="col-md-5">
{% bootstrap_field formset.empty_form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-5 col-lg-6">
{% bootstrap_field formset.empty_form.default layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 col-lg-1 text-right">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
</div>
{% endescapescript %}
</script>
<p> <p>
<button type="button" class="btn btn-default" data-formset-add> {% blocktrans trimmed %}
<i class="fa fa-plus"></i> {% trans "Add property" %}</button> You can here define a set of metadata properties (i.e. variables) that you can later set for
your
events and re-use in places like ticket layouts. This is an useful timesaver if you create lots
and
lots of events.
{% endblocktrans %}
</p> </p>
<div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}">
{{ formset.management_form }}
{% bootstrap_formset_errors formset %}
<div data-formset-body>
{% for form in formset %}
<div class="row" data-formset-form>
<div class="sr-only">
{{ form.id }}
{% bootstrap_field form.DELETE form_group_class="" layout="inline" %}
</div>
<div class="col-md-5">
{% bootstrap_form_errors form %}
{% bootstrap_field form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-5 col-lg-6">
{% bootstrap_field form.default layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 col-lg-1 text-right">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
</div>
{% endfor %}
</div>
<script type="form-template" data-formset-empty-form>
{% escapescript %}
<div class="row" data-formset-form>
<div class="sr-only">
{{ formset.empty_form.id }}
{% bootstrap_field formset.empty_form.DELETE form_group_class="" layout="inline" %}
</div>
<div class="col-md-5">
{% bootstrap_field formset.empty_form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-5 col-lg-6">
{% bootstrap_field formset.empty_form.default layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 col-lg-1 text-right">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
</div>
{% endescapescript %}
</script>
<p>
<button type="button" class="btn btn-default" data-formset-add>
<i class="fa fa-plus"></i> {% trans "Add property" %}</button>
</p>
</div>
</div> </div>
</fieldset> </fieldset>
<div class="form-group submit-group"> <div class="form-group submit-group">

View File

@@ -5,32 +5,37 @@
{% load eventurl %} {% load eventurl %}
{% block title %}{% trans "Organizers" %}{% endblock %} {% block title %}{% trans "Organizers" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Organizers" %}</h1> <div class="panel panel-default">
<p>{% trans "The list below shows all organizer accounts you have administrative access to." %}</p> <div class="panel-heading">
<form class="row filter-form" action="" method="get"> <h1 class="panel-title">{% trans "Organizers" %}</h1>
<div class="col-md-10 col-sm-6 col-xs-12">
{% bootstrap_field filter_form.query layout='inline' %}
</div> </div>
<div class="col-md-2 col-sm-6 col-xs-12"> <div class="panel-body">{% trans "The list below shows all organizer accounts you have administrative access to." %}</div>
<button class="btn btn-primary btn-block" type="submit"> </div>
<span class="fa fa-filter"></span> <div class="panel panel-default">
<span class="hidden-md"> <form class="row filter-form panel-body" action="" method="get">
<div class="col-md-10 col-sm-6 col-xs-12">
{% bootstrap_field filter_form.query layout='inline' %}
</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 staff_session %} {% if staff_session %}
<p> <div class="panel-body">
<a href="{% url "control:organizers.add" %}" class="btn btn-default"> <a href="{% url "control:organizers.add" %}" class="btn btn-default">
<span class="fa fa-plus"></span> <span class="fa fa-plus"></span>
{% trans "Create a new organizer" %} {% trans "Create a new organizer" %}
</a> </a>
</p> </div>
{% endif %} {% endif %}
<table class="table table-condensed table-hover"> <table class="table table-condensed table-hover">
<thead> <thead>
<tr> <tr>
<th> <th>
{% trans "Organizer name" %} {% trans "Organizer 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-down"></i></a>
@@ -41,18 +46,21 @@
<a href="?{% url_replace request 'ordering' '-slug' %}"><i class="fa fa-caret-down"></i></a> <a href="?{% url_replace request 'ordering' '-slug' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'slug' %}"><i class="fa fa-caret-up"></i></a> <a href="?{% url_replace request 'ordering' 'slug' %}"><i class="fa fa-caret-up"></i></a>
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for o in organizers %} {% for o in organizers %}
<tr> <tr>
<td><strong> <td><strong>
<a href="{% url "control:organizer" organizer=o.slug %}">{{ o.name }}</a> <a href="{% url "control:organizer" organizer=o.slug %}">{{ o.name }}</a>
</strong></td> </strong></td>
<td>{{ o.slug }}</td> <td>{{ o.slug }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% include "pretixcontrol/pagination.html" %} <div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,28 +2,37 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inner %} {% block inner %}
<h2>{% trans "Delete team:" %} {{ team.name }}</h2> <div class="panel panel-default">
{% if not possible %} <div class="panel-heading">
<p>{% blocktrans %}You cannot delete the team because there would be no one left who could change team permissions afterwards.{% endblocktrans %}</p> <h2 class="panel-titlte">{% trans "Delete team:" %} {{ team.name }}</h2>
<div class="form-group submit-group">
<a href="{% url "control:organizer.teams" organizer=request.organizer.slug %}" class="btn btn-default btn-cancel">
{% trans "Cancel" %}
</a>
<div class="clearfix"></div>
</div> </div>
{% else %} <div class="panel-body">
<form action="" method="post" class="form-horizontal"> {% if not possible %}
{% csrf_token %} <p>{% blocktrans %}You cannot delete the team because there would be no one left who could change team
<p>{% blocktrans %}Are you sure you want to delete the team?{% endblocktrans %} permissions afterwards.{% endblocktrans %}</p>
</p> <div class="form-group submit-group">
<div class="form-group submit-group"> <a href="{% url "control:organizer.teams" organizer=request.organizer.slug %}"
<a href="{% url "control:organizer.teams" organizer=request.organizer.slug%}" class="btn btn-default btn-cancel"> class="btn btn-default btn-cancel">
{% trans "Cancel" %} {% trans "Cancel" %}
</a> </a>
<button type="submit" class="btn btn-danger btn-save"> <div class="clearfix"></div>
{% trans "Delete" %} </div>
</button> {% else %}
</div> <form action="" method="post" class="form-horizontal">
</form> {% csrf_token %}
{% endif %} <p>{% blocktrans %}Are you sure you want to delete the team?{% endblocktrans %}
</p>
<div class="form-group submit-group">
<a href="{% url "control:organizer.teams" organizer=request.organizer.slug %}"
class="btn btn-default btn-cancel">
{% trans "Cancel" %}
</a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Delete" %}
</button>
</div>
</form>
{% endif %}
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,40 +2,53 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inner %} {% block inner %}
{% if team %}
<h2>{% trans "Team:" %} {{ team.name }}</h2>
{% else %}
<h2>{% trans "Create a new team" %}</h2>
<p>
{% blocktrans trimmed %}
You will be able to add team members in the next step.
{% endblocktrans %}
</p>
{% endif %}
<form class="form-horizontal" action="" method="post"> <form class="form-horizontal" action="" method="post">
{% 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 team %}
<h2 class="panel-title">{% trans "Team:" %} {{ team.name }}</h2>
{% else %}
<h2 class="panel-title">{% trans "Create a new team" %}</h2>
{% endif %}
</div>
<div class="panel-body">
{% if not team %}
<p>
{% blocktrans trimmed %}
You will be able to add team members in the next step.
{% endblocktrans %}
</p>
{% endif %}
{% bootstrap_field form.name layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Organizer permissions" %}</legend> <div class="panel-heading">
{% bootstrap_field form.can_create_events layout="control" %} <legend>{% trans "Organizer permissions" %}</legend>
{% bootstrap_field form.can_change_teams layout="control" %} </div>
{% bootstrap_field form.can_change_organizer_settings layout="control" %} <div class="panel-body">
{% bootstrap_field form.can_create_events layout="control" %}
{% bootstrap_field form.can_change_teams layout="control" %}
{% bootstrap_field form.can_change_organizer_settings layout="control" %}
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Event permissions" %}</legend> <div class="panel-heading">
<legend>{% trans "Event permissions" %}</legend>
</div>
<div class="panel-body">
{% bootstrap_field form.all_events layout="control" %} {% bootstrap_field form.all_events layout="control" %}
{% bootstrap_field form.limit_events layout="control" %} {% bootstrap_field form.limit_events layout="control" %}
{% bootstrap_field form.can_change_event_settings layout="control" %} {% bootstrap_field form.can_change_event_settings layout="control" %}
{% bootstrap_field form.can_change_items layout="control" %} {% bootstrap_field form.can_change_items layout="control" %}
{% bootstrap_field form.can_view_orders layout="control" %} {% bootstrap_field form.can_view_orders layout="control" %}
{% bootstrap_field form.can_change_orders layout="control" %} {% bootstrap_field form.can_change_orders layout="control" %}
{% bootstrap_field form.can_view_vouchers layout="control" %} {% bootstrap_field form.can_view_vouchers layout="control" %}
{% bootstrap_field form.can_change_vouchers layout="control" %} {% bootstrap_field form.can_change_vouchers 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">

View File

@@ -2,124 +2,137 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inner %} {% block inner %}
<h2> <div class="panel panel-default">
{% trans "Team:" %} {{ team.name }} <div class="panel-heading">
<a href="{% url "control:organizer.team.edit" organizer=organizer.slug team=team.pk %}" <a href="{% url "control:organizer.team.edit" organizer=organizer.slug team=team.pk %}"
class="btn btn-default"> class="btn btn-default pull-right">
<span class="fa fa-edit"></span> <span class="fa fa-edit"></span>
{% trans "Edit" %} {% trans "Edit" %}
</a> </a>
</h2> <h2 class="panel-title">
<h3>{% trans "Team members" %}</h3> {% trans "Team:" %} {{ team.name }}
</h2>
</div>
</div>
<form action="" method="post"> <form action="" method="post">
{% csrf_token %}
<!-- Trick browsers into taking this as a default --> <!-- Trick browsers into taking this as a default -->
<button type="submit" class="btn btn-primary btn-sm btn-block nearly-gone"></button> <div class="panel panel-default">
<table class="table table-condensed table-hover"> <div class="panel-heading">
<thead> <h3 class="panel-title">{% trans "Team members" %}</h3>
<tr> </div>
<th>{% trans "Member" %}</th> <button type="submit" class="btn btn-primary btn-sm btn-block nearly-gone"></button>
<th width="150"></th> <table class="table table-condensed table-hover">
</tr> <thead>
</thead> <tr>
<tbody> <th>{% trans "Member" %}</th>
{% for u in team.members.all %} <th width="150"></th>
</tr>
</thead>
<tbody>
{% for u in team.members.all %}
<tr>
<td>
{{ u.email }}
{% if u.require_2fa %}
<span class="fa fa-shield text-success" data-toggle="tooltip"
title="{% trans "Two-factor authentication enabled" %}">
</span>
{% else %}
<span class="fa fa-shield disabled" data-toggle="tooltip"
title="{% trans "Two-factor authentication disabled" %}">
</span>
{% endif %}
</td>
<td class="text-right">
<button type="submit" name="remove-member" value="{{ u.id }}"
class="btn btn-danger btn-sm btn-block">
<i class="fa fa-times"></i> {% trans "Remove" %}
</button>
</td>
</tr>
{% endfor %}
{% for i in team.invites.all %}
<tr>
<td>
{{ i.email }}
<span class="fa fa-envelope-o" data-toggle="tooltip"
title="{% trans "invited, pending response" %}"></span>
</td>
<td class="text-right">
<button type="submit" name="remove-invite" value="{{ i.id }}"
class="btn btn-danger btn-sm btn-block">
<i class="fa fa-times"></i> {% trans "Remove" %}
</button>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr> <tr>
<td> <td>
{{ u.email }} {% bootstrap_field add_form.user layout='inline' %}
{% if u.require_2fa %}
<span class="fa fa-shield text-success" data-toggle="tooltip"
title="{% trans "Two-factor authentication enabled" %}">
</span>
{% else %}
<span class="fa fa-shield disabled" data-toggle="tooltip"
title="{% trans "Two-factor authentication disabled" %}">
</span>
{% endif %}
</td> </td>
<td class="text-right"> <td class="text-right">
<button type="submit" name="remove-member" value="{{ u.id }}" <button type="submit" class="btn btn-primary btn-sm btn-block">
class="btn btn-danger btn-sm btn-block"> <i class="fa fa-plus"></i> {% trans "Add" %}
<i class="fa fa-times"></i> {% trans "Remove" %}
</button> </button>
</td> </td>
</tr> </tr>
{% endfor %} </tfoot>
{% for i in team.invites.all %} </table>
<tr> <div class="panel-footer">
<td> {% blocktrans trimmed %}
{{ i.email }} To add a new user, you can enter their email address here. If they already have a
<span class="fa fa-envelope-o" data-toggle="tooltip" pretix account, they will immediately be added to the event. Otherwise, they will
title="{% trans "invited, pending response" %}"></span> be sent an email with an invitation.
</td> {% endblocktrans %}
<td class="text-right"> </div>
<button type="submit" name="remove-invite" value="{{ i.id }}" </div>
class="btn btn-danger btn-sm btn-block">
<i class="fa fa-times"></i> {% trans "Remove" %}
</button>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td>
{% bootstrap_field add_form.user layout='inline' %}<br>
{% blocktrans trimmed %}
To add a new user, you can enter their email address here. If they already have a
pretix account, they will immediately be added to the event. Otherwise, they will
be sent an email with an invitation.
{% endblocktrans %}
</td>
<td class="text-right">
<button type="submit" class="btn btn-primary btn-sm btn-block">
<i class="fa fa-plus"></i> {% trans "Add" %}
</button>
</td>
</tr>
</tfoot>
</table>
</form> </form>
<h3>{% trans "API tokens" %}</h3>
<form action="" method="post"> <form action="" method="post">
{% csrf_token %} {% csrf_token %}
<!-- Trick browsers into taking this as a default --> <!-- Trick browsers into taking this as a default -->
<button type="submit" class="btn btn-primary btn-sm btn-block nearly-gone"></button> <button type="submit" class="btn btn-primary btn-sm btn-block nearly-gone"></button>
<table class="table table-condensed table-hover"> <div class="panel-default panel">
<thead> <div class="panel-heading">
<tr> <h3 class="panel-title">{% trans "API tokens" %}</h3>
<th>{% trans "Name" %}</th> </div>
<th width="150"></th> <table class="table table-condensed table-hover">
</tr> <thead>
</thead> <tr>
<tbody> <th>{% trans "Name" %}</th>
{% for t in team.active_tokens %} <th width="150"></th>
</tr>
</thead>
<tbody>
{% for t in team.active_tokens %}
<tr>
<td>
{{ t.name }}
</td>
<td class="text-right">
<button type="submit" name="remove-token" value="{{ t.id }}"
class="btn btn-danger btn-sm btn-block">
<i class="fa fa-times"></i> {% trans "Remove" %}
</button>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr> <tr>
<td> <td>
{{ t.name }} {% bootstrap_field add_token_form.name layout='inline' %}<br>
</td> </td>
<td class="text-right"> <td class="text-right">
<button type="submit" name="remove-token" value="{{ t.id }}" <button type="submit" class="btn btn-primary btn-sm btn-block">
class="btn btn-danger btn-sm btn-block"> <i class="fa fa-plus"></i> {% trans "Add" %}
<i class="fa fa-times"></i> {% trans "Remove" %}
</button> </button>
</td> </td>
</tr> </tr>
{% endfor %} </tfoot>
</tbody> </table>
<tfoot> </div>
<tr>
<td>
{% bootstrap_field add_token_form.name layout='inline' %}<br>
</td>
<td class="text-right">
<button type="submit" class="btn btn-primary btn-sm btn-block">
<i class="fa fa-plus"></i> {% trans "Add" %}
</button>
</td>
</tr>
</tfoot>
</table>
</form> </form>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">

View File

@@ -2,55 +2,56 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% block inner %} {% block inner %}
<p> <div class="panel panel-default">
{% trans "The list below shows all teams that exist within this organizer." %} <div class="panel-body">
</p> <a href="{% url "control:organizer.team.add" organizer=request.organizer.slug %}" class="btn btn-default">
<a href="{% url "control:organizer.team.add" organizer=request.organizer.slug %}" class="btn btn-default"> <span class="fa fa-plus"></span>
<span class="fa fa-plus"></span> {% trans "Create a new team" %}
{% trans "Create a new team" %} </a>
</a> </div>
<table class="table table-condensed table-hover"> <table class="table table-condensed table-hover">
<thead> <thead>
<tr>
<th>{% trans "Team name" %}</th>
<th>{% trans "Members" %}</th>
<th>{% trans "Events" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for t in teams %}
<tr> <tr>
<td><strong> <th>{% trans "Team name" %}</th>
<a href="{% url "control:organizer.team" organizer=request.organizer.slug team=t.id %}"> <th>{% trans "Members" %}</th>
{{ t.name }} <th>{% trans "Events" %}</th>
</a> <th></th>
</strong></td>
<td>
{{ t.memcount }}
{% if t.invcount %}
{% blocktrans trimmed with count=t.invcount %}
+ {{ count }} invited
{% endblocktrans %}
{% endif %}
</td>
<td>
{% if t.all_events %}
{% trans "All" %}
{% else %}
{{ t.eventcount }}
{% endif %}
</td>
<td class="text-right">
<a href="{% url "control:organizer.team" organizer=request.organizer.slug team=t.id %}"
class="btn btn-default btn-sm"><i class="fa fa-list"></i></a>
<a href="{% url "control:organizer.team.edit" organizer=request.organizer.slug team=t.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:organizer.team.delete" organizer=request.organizer.slug team=t.id %}"
class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for t in teams %}
<tr>
<td><strong>
<a href="{% url "control:organizer.team" organizer=request.organizer.slug team=t.id %}">
{{ t.name }}
</a>
</strong></td>
<td>
{{ t.memcount }}
{% if t.invcount %}
{% blocktrans trimmed with count=t.invcount %}
+ {{ count }} invited
{% endblocktrans %}
{% endif %}
</td>
<td>
{% if t.all_events %}
{% trans "All" %}
{% else %}
{{ t.eventcount }}
{% endif %}
</td>
<td class="text-right">
<a href="{% url "control:organizer.team" organizer=request.organizer.slug team=t.id %}"
class="btn btn-default btn-sm"><i class="fa fa-list"></i></a>
<a href="{% url "control:organizer.team.edit" organizer=request.organizer.slug team=t.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:organizer.team.delete" organizer=request.organizer.slug team=t.id %}"
class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %} {% endblock %}

View File

@@ -1,8 +1,8 @@
{% load i18n %} {% load i18n %}
{% load urlreplace %} {% load urlreplace %}
<nav class="text-center pagination-container"> <nav class="text-center pagination-container">
<ul class="pagination"> {% if is_paginated %}
{% if is_paginated %} <ul class="pagination">
{% if page_obj.has_previous %} {% if page_obj.has_previous %}
<li> <li>
<a href="?{% url_replace request 'page' page_obj.previous_page_number %}"> <a href="?{% url_replace request 'page' page_obj.previous_page_number %}">
@@ -12,37 +12,44 @@
{% endif %} {% endif %}
<li class="page-current"><a> <li class="page-current"><a>
{% blocktrans trimmed with page=page_obj.number of=page_obj.paginator.num_pages count=page_obj.paginator.count %} {% blocktrans trimmed with page=page_obj.number of=page_obj.paginator.num_pages count=page_obj.paginator.count %}
Page {{ page }} of {{ of }} ({{ count }} elements) Page {{ page }} of {{ of }}
{% endblocktrans %} {% endblocktrans %}
</a></li> </a></li>
{% if page_obj.has_next %} {% if page_obj.has_next %}
<li> <li>
<a href="?{% url_replace request 'page' page_obj.next_page_number %}"> <a href="?{% url_replace request 'page' page_obj.next_page_number %}">
<span>&raquo;</span> <span>&raquo;</span>
</a> </a>
</li> </li>
{% endif %} {% endif %}
{% else %} </ul>
{% if page_obj.paginator.count > 1 %}
<li class="page-current"><a>
{% blocktrans trimmed with count=page_obj.paginator.count %}
{{ count }} elements
{% endblocktrans %}
</a></li>
{% endif %}
{% endif %}
</ul>
{% if page_size %}
<div class="clearfix">
<small>
{% trans "Show per page:" %}
</small>
<a href="?{% url_replace request "page_size" "25" "page" "1" %}">
{% if page_size == 25 %}<strong>{% endif %}25{% if page_size == 25 %}</strong>{% endif %}</a> |
<a href="?{% url_replace request "page_size" "50" "page" "1" %}">
{% if page_size == 50 %}<strong>{% endif %}50{% if page_size == 50 %}</strong>{% endif %}</a> |
<a href="?{% url_replace request "page_size" "100" "page" "1" %}">
{% if page_size == 100 %}<strong>{% endif %}100{% if page_size == 100 %}</strong>{% endif %}</a>
</div>
{% endif %} {% endif %}
{% if page_obj.paginator.count > 0 %}
<ul class="pagination pagination-count">
<li class="page-current"><a>
{% blocktrans trimmed with count=page_obj.paginator.count %}
{{ count }} elements
{% endblocktrans %}
</a></li>
</ul>
<ul class="pagination pagination-select">
<li class="page-current"><a>
{% trans "Show per page:" %}
</a></li>
<li>
<a href="?{% url_replace request "page_size" "25" "page" "1" %}">
{% if page_size == 25 %}<strong>{% endif %}25{% if page_size == 25 %}</strong>{% endif %}</a>
</li>
<li>
<a href="?{% url_replace request "page_size" "50" "page" "1" %}">
{% if page_size == 50 %}<strong>{% endif %}50{% if page_size == 50 %}</strong>{% endif %}</a>
</li>
<li>
<a href="?{% url_replace request "page_size" "100" "page" "1" %}">
{% if page_size == 100 %}<strong>{% endif %}100{% if page_size == 100 %}</strong>{% endif %}</a>
</li>
</ul>
{% endif %}
<div class="clearfix">
</div>
</nav> </nav>

View File

@@ -11,12 +11,6 @@
<link type="text/css" rel="stylesheet" href="{% url "control:pdf.css" organizer=request.organizer.slug event=request.event.slug %}"> <link type="text/css" rel="stylesheet" href="{% url "control:pdf.css" organizer=request.organizer.slug event=request.event.slug %}">
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1>
{% trans "PDF Editor" %}
{% if title %}
<small>{{ title }}</small>
{% endif %}
</h1>
<script type="application/json" id="editor-data"> <script type="application/json" id="editor-data">
{{ layout|safe }} {{ layout|safe }}
@@ -27,25 +21,30 @@
<div class="panel-heading"> <div class="panel-heading">
<div class="pull-right"> <div class="pull-right">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default btn-xs" id="toolbox-source" <button type="button" class="btn btn-default btn-sm" id="toolbox-source"
title="{% trans "Code" %}"> title="{% trans "Code" %}">
<span class="fa fa-code"></span> <span class="fa fa-code"></span>
</button> </button>
<button type="button" class="btn btn-default btn-xs" id="toolbox-paste" <button type="button" class="btn btn-default btn-sm" id="toolbox-paste"
title="{% trans "Paste" %}"> title="{% trans "Paste" %}">
<span class="fa fa-paste"></span> <span class="fa fa-paste"></span>
</button> </button>
<button type="button" class="btn btn-default btn-xs" id="toolbox-undo" <button type="button" class="btn btn-default btn-sm" id="toolbox-undo"
title="{% trans "Undo" %}"> title="{% trans "Undo" %}">
<span class="fa fa-undo"></span> <span class="fa fa-undo"></span>
</button> </button>
<button type="button" class="btn btn-default btn-xs" id="toolbox-redo" <button type="button" class="btn btn-default btn-sm" id="toolbox-redo"
title="{% trans "Redo" %}"> title="{% trans "Redo" %}">
<span class="fa fa-repeat"></span> <span class="fa fa-repeat"></span>
</button> </button>
</div> </div>
</div> </div>
{% trans "Editor" %} <h1 class="panel-title">
{% trans "PDF Editor" %}
{% if title %}
<small>{{ title }}</small>
{% endif %}
</h1>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div id="editor-canvas-area"> <div id="editor-canvas-area">

View File

@@ -6,83 +6,89 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Order search" %}{% endblock %} {% block title %}{% trans "Order search" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Order search" %}</h1> <div class="panel panel-default">
<form class="row filter-form" action="" method="get"> <div class="panel-body">
<div class="col-md-3 col-sm-6 col-xs-12"> <form class="row filter-form" action="" method="get">
{% bootstrap_field filter_form.query layout='inline' %} <div class="col-md-3 col-sm-6 col-xs-12">
</div> {% bootstrap_field filter_form.query layout='inline' %}
<div class="col-md-2 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> {% bootstrap_field filter_form.status layout='inline' %}
<div class="col-md-3 col-sm-6 col-xs-12"> </div>
{% bootstrap_field filter_form.organizer layout='inline' %} <div class="col-md-3 col-sm-6 col-xs-12">
</div> {% bootstrap_field filter_form.organizer layout='inline' %}
<div class="col-md-2 col-xs-6"> </div>
{% bootstrap_field filter_form.provider layout='inline' %} <div class="col-md-2 col-xs-6">
</div> {% bootstrap_field filter_form.provider 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-2 col-sm-6 col-xs-12">
<span class="fa fa-filter"></span> <button class="btn btn-primary btn-block" type="submit">
<span class="hidden-md"> <span class="fa fa-filter"></span>
<span class="hidden-md">
{% trans "Filter" %} {% trans "Filter" %}
</span> </span>
</button> </button>
</div>
</form>
</div> </div>
</form> <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>
<th>{% trans "Order code" %}
<a href="?{% url_replace request 'ordering' '-code' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'code' %}"><i class="fa fa-caret-up"></i></a></th>
<th>{% trans "Event" %}
<a href="?{% url_replace request 'ordering' '-event' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'event' %}"><i class="fa fa-caret-up"></i></a></th>
<th>{% trans "User" %}
<a href="?{% url_replace request 'ordering' '-email' %}"><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 "Order date" %}
<a href="?{% url_replace request 'ordering' '-datetime' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'datetime' %}"><i class="fa fa-caret-up"></i></a></th>
<th class="text-right">{% trans "Order total" %}
<a href="?{% url_replace request 'ordering' '-total' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'total' %}"><i class="fa fa-caret-up"></i></a></th>
<th class="text-right">{% 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>
</tr>
</thead>
<tbody>
{% for o in orders %}
<tr> <tr>
<td> <th>{% trans "Order code" %}
<strong> <a href="?{% url_replace request 'ordering' '-code' %}"><i class="fa fa-caret-down"></i></a>
<a href="{% url "control:event.order" event=o.event.slug organizer=o.event.organizer.slug code=o.code %}"> <a href="?{% url_replace request 'ordering' 'code' %}"><i class="fa fa-caret-up"></i></a></th>
{{ o.event.slug|upper }}-{{ o.code }} <th>{% trans "Event" %}
</a> <a href="?{% url_replace request 'ordering' '-event' %}"><i class="fa fa-caret-down"></i></a>
</strong> <a href="?{% url_replace request 'ordering' 'event' %}"><i class="fa fa-caret-up"></i></a></th>
</td> <th>{% trans "User" %}
<td>{{ o.event.name }}</td> <a href="?{% url_replace request 'ordering' '-email' %}"><i class="fa fa-caret-down"></i></a>
<td> <a href="?{% url_replace request 'ordering' 'email' %}"><i class="fa fa-caret-up"></i></a></th>
{{ o.email|default_if_none:"" }} <th>{% trans "Order date" %}
{% if o.invoice_address.name %} <a href="?{% url_replace request 'ordering' '-datetime' %}"><i class="fa fa-caret-down"></i></a>
<br>{{ o.invoice_address.name }} <a href="?{% url_replace request 'ordering' 'datetime' %}"><i class="fa fa-caret-up"></i></a>
{% endif %} </th>
</td> <th class="text-right">{% trans "Order total" %}
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td> <a href="?{% url_replace request 'ordering' '-total' %}"><i class="fa fa-caret-down"></i></a>
<td class="text-right">{{ o.total|money:o.event.currency }}</td> <a href="?{% url_replace request 'ordering' 'total' %}"><i class="fa fa-caret-up"></i></a></th>
<td class="text-right">{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td> <th class="text-right">{% 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>
</tr> </tr>
{% empty %} </thead>
<tr> <tbody>
<td colspan="6" class="text-center"><em> {% for o in orders %}
{% trans "We couldn't find any orders that you have access to and that match your search query." %} <tr>
</em></td> <td>
</tr> <strong>
{% endfor %} <a href="{% url "control:event.order" event=o.event.slug organizer=o.event.organizer.slug code=o.code %}">
</tbody> {{ o.event.slug|upper }}-{{ o.code }}
</table> </a>
</strong>
</td>
<td>{{ o.event.name }}</td>
<td>
{{ o.email|default_if_none:"" }}
{% if o.invoice_address.name %}
<br>{{ o.invoice_address.name }}
{% endif %}
</td>
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
<td class="text-right">{{ o.total|money:o.event.currency }}</td>
<td class="text-right">{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center"><em>
{% trans "We couldn't find any orders that you have access to and that match your search query." %}
</em></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="panel-footer">
{% include "pretixcontrol/pagination_huge.html" %}
</div>
</div> </div>
{% include "pretixcontrol/pagination_huge.html" %}
{% endblock %} {% endblock %}

View File

@@ -4,48 +4,57 @@
{% load order_overview %} {% load order_overview %}
{% block title %}{% trans "Data shredder" %}{% endblock %} {% block title %}{% trans "Data shredder" %}{% endblock %}
{% block content %} {% block content %}
<h1>
{% trans "Data shredder" %}
</h1>
<form action="{% url "control:event.shredder.shred" event=request.event.slug organizer=request.organizer.slug %}" <form action="{% url "control:event.shredder.shred" event=request.event.slug organizer=request.organizer.slug %}"
method="post" class="form-horizontal" data-asynctask> method="post" class="form-horizontal" data-asynctask>
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset class="panel-default panel">
<legend>{% trans "Step 1: Download data" %}</legend> <div class="panel-heading">
<p> <legend>{% trans "Step 1: Download data" %}</legend>
{% blocktrans trimmed %} </div>
You are about to permamanently delete data from the server, even though you might be required to <div class="panel-body">
keep <p>
some of this data on file. You should therefore download the following file and store it in a safe {% blocktrans trimmed %}
place: You are about to permamanently delete data from the server, even though you might be required to
{% endblocktrans %} keep some of this data on file. You should therefore download the following file and store it in a
</p> safe place:
<p> {% endblocktrans %}
<a href="{% url "cachedfile.download" id=file.pk %}" class="btn btn-primary btn-lg"> </p>
{% trans "Download data" %} <p>
</a> <a href="{% url "cachedfile.download" id=file.pk %}" class="btn btn-primary btn-lg">
</p> {% trans "Download data" %}
</a>
</p>
</div>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel-default panel">
<legend>{% trans "Step 2: Confirm download" %}</legend> <div class="panel-heading">
<p> <legend>{% trans "Step 2: Confirm download" %}</legend>
{% blocktrans trimmed %} </div>
In the downloaded file, there is a text file named "CONFIRM_CODE.txt" with a six-character code. <div class="panel-body">
Please enter this code here to confirm that you successfully downloaded the file. <p>
{% endblocktrans %} {% blocktrans trimmed %}
</p> In the downloaded file, there is a text file named "CONFIRM_CODE.txt" with a six-character code.
<input type="text" class="form-control" name="confirm_code" required placeholder="{% trans "Confirmation code" %}"> Please enter this code here to confirm that you successfully downloaded the file.
<br> {% endblocktrans %}
</p>
<input type="text" class="form-control" name="confirm_code" required
placeholder="{% trans "Confirmation code" %}">
<br>
</fieldset> </fieldset>
<fieldset> <fieldset class="panel-default panel">
<legend>{% trans "Step 3: Confirm deletion" %}</legend> <div class="panel-heading">
<p> <legend>{% trans "Step 3: Confirm deletion" %}</legend>
{% blocktrans trimmed with event=request.event.name %} </div>
Please re-check that you are fully certain that you want to delete the selected categories of data from the event <strong>{{ event }}</strong>. <div class="panel-body">
In this case, please enter your user password here: <p>
{% endblocktrans %} {% blocktrans trimmed with event=request.event.name %}
</p> Please re-check that you are fully certain that you want to delete the selected categories of
<input type="password" class="form-control" name="password" required placeholder="{% trans "Your password" %}"> data from the event <strong>{{ event }}</strong>.
In this case, please enter your user password here:
{% endblocktrans %}
</p>
<input type="password" class="form-control" name="password" required
placeholder="{% trans "Your password" %}">
</fieldset> </fieldset>
<input type="hidden" name="file" value="{{ file.pk }}"> <input type="hidden" name="file" value="{{ file.pk }}">
<div class="form-group submit-group"> <div class="form-group submit-group">

View File

@@ -4,37 +4,43 @@
{% load order_overview %} {% load order_overview %}
{% block title %}{% trans "Data shredder" %}{% endblock %} {% block title %}{% trans "Data shredder" %}{% endblock %}
{% block content %} {% block content %}
<h1> <div class="panel panel-default">
{% trans "Data shredder" %} <div class="panel-heading">
</h1> <h1 class="panel-title">
<p> {% trans "Data shredder" %}
{% blocktrans trimmed %} </h1>
This feature allows you to remove personal data from this event. You will first select what kind of data </div>
you want to shred, then you are able to download the affected data and after you confirmed the download, <div class="panel-body">
the data will be removed from the server's database. The data might still exist in backups for a limited <p>
period of time. {% blocktrans trimmed %}
{% endblocktrans %} This feature allows you to remove personal data from this event. You will first select what kind of
<strong> data you want to shred, then you are able to download the affected data and after you confirmed the
{% blocktrans trimmed %} download, the data will be removed from the server's database. The data might still exist in backups for a
Using this will not remove the orders for your event, it just scrubs them of data that can be linked limited period of time.
to individual persons. {% endblocktrans %}
{% endblocktrans %} <strong>
</strong> {% blocktrans trimmed %}
</p> Using this will not remove the orders for your event, it just scrubs them of data that can be
<div class="alert alert-legal"> linked to individual persons.
<strong> {% endblocktrans %}
{% blocktrans trimmed %} </strong>
It is within your own responsibility to check if you are allowed to delete the affected data in your </p>
legislation, e.g. for reasons of taxation. In many countries, you need to keep some data in the live <div class="alert alert-legal">
system in case of an audit. <strong>
{% endblocktrans %} {% blocktrans trimmed %}
</strong> It is within your own responsibility to check if you are allowed to delete the affected data in
{% blocktrans trimmed %} your legislation, e.g. for reasons of taxation. In many countries, you need to keep some data in the
For most categories of data, you will be able to partially download the data to store it offline. Some live system in case of an audit.
kinds of data (such as some payment information) as well as historical log data cannot be downloaded at {% endblocktrans %}
the moment. </strong>
{% endblocktrans %} {% blocktrans trimmed %}
<div class="clear"></div> For most categories of data, you will be able to partially download the data to store it offline.
Some kinds of data (such as some payment information) as well as historical log data cannot be downloaded
at the moment.
{% endblocktrans %}
<div class="clear"></div>
</div>
</div>
</div> </div>
{% if constraints %} {% if constraints %}
<div class="alert alert-danger"> <div class="alert alert-danger">
@@ -42,10 +48,9 @@
</div> </div>
{% else %} {% else %}
<form action="{% url "control:event.shredder.export" event=request.event.slug organizer=request.organizer.slug %}" <form action="{% url "control:event.shredder.export" event=request.event.slug organizer=request.organizer.slug %}"
method="post" class="form-horizontal" data-asynctask> method="post" class="form-horizontal" data-asynctask>
<legend>{% trans "Data selection" %}</legend>
{% csrf_token %} {% csrf_token %}
<div class="panel-group" id="payment_accordion"> <div class="" id="payment_accordion">
{% for ident, shredder in shredders.items %} {% for ident, shredder in shredders.items %}
<div class="panel panel-default"> <div class="panel panel-default">
<label class="accordion-radio"> <label class="accordion-radio">

View File

@@ -6,7 +6,6 @@
{% load eventsignal %} {% load eventsignal %}
{% block title %}{% trans "Date" context "subevent" %}{% endblock %} {% block title %}{% trans "Date" context "subevent" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Create multiple dates" context "subevent" %}</h1>
<form action="" method="post" class="form-horizontal" id="subevent-bulk-create-form"> <form action="" method="post" class="form-horizontal" id="subevent-bulk-create-form">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
@@ -16,10 +15,8 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<fieldset> <fieldset>
<legend>{% trans "Dates" context "subevent" %}</legend>
<div class="formset" data-formset data-formset-prefix="{{ rrule_formset.prefix }}" <div class="formset" data-formset data-formset-prefix="{{ rrule_formset.prefix }}"
id="rrule-formset"> id="rrule-formset">
{{ rrule_formset.management_form }} {{ rrule_formset.management_form }}
{% bootstrap_formset_errors rrule_formset %} {% bootstrap_formset_errors rrule_formset %}
<div data-formset-body> <div data-formset-body>
@@ -34,7 +31,7 @@
{% trans "Repetition rule" %} {% trans "Repetition rule" %}
</div> </div>
<div class="col-md-2 text-right"> <div class="col-md-2 text-right">
<button type="button" class="btn btn-danger btn-xs" <button type="button" class="btn btn-danger btn-sm"
data-formset-delete-button> data-formset-delete-button>
<i class="fa fa-trash"></i></button> <i class="fa fa-trash"></i></button>
</div> </div>
@@ -145,7 +142,7 @@
{% trans "Repetition rule" %} {% trans "Repetition rule" %}
</div> </div>
<div class="col-md-2 text-right"> <div class="col-md-2 text-right">
<button type="button" class="btn btn-danger btn-xs" <button type="button" class="btn btn-danger btn-sm"
data-formset-delete-button> data-formset-delete-button>
<i class="fa fa-trash"></i></button> <i class="fa fa-trash"></i></button>
</div> </div>
@@ -253,10 +250,14 @@
</fieldset> </fieldset>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<fieldset> <fieldset class="panel panel-default">
<legend>{% trans "Preview" context "subevent" %}</legend> <div class="panel-heading">
<ul id="rrule-preview"> <legend>{% trans "Preview" context "subevent" %}</legend>
</ul> </div>
<div class="panel-body">
<ul id="rrule-preview">
</ul>
</div>
</fieldset> </fieldset>
</div> </div>
</div> </div>

View File

@@ -4,53 +4,55 @@
{% load urlreplace %} {% load urlreplace %}
{% block title %}{% trans "Dates" context "subevent" %}{% endblock %} {% block title %}{% trans "Dates" context "subevent" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Dates" context "subevent" %}</h1>
{% if subevents|length == 0 and not filter_form.filtered %} {% if subevents|length == 0 and not filter_form.filtered %}
<div class="empty-collection"> <div class="panel-default">
<p> <div class="empty-collection panel-body">
{% blocktrans trimmed %} <p>
You haven't created any dates for this event series yet. {% blocktrans trimmed %}
{% endblocktrans %} You haven't created any dates for this event series yet.
</p> {% endblocktrans %}
</p>
<a href="{% url "control:event.subevents.add" organizer=request.event.organizer.slug event=request.event.slug %}" <a href="{% url "control:event.subevents.add" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> class="btn btn-primary btn-lg"><i class="fa fa-plus"></i>
{% trans "Create a new date" context "subevent" %}</a> {% trans "Create a new date" context "subevent" %}</a>
<a href="{% url "control:event.subevents.bulk" organizer=request.event.organizer.slug event=request.event.slug %}" <a href="{% url "control:event.subevents.bulk" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-primary btn-lg"><i class="fa fa-plus"></i> class="btn btn-primary btn-lg"><i class="fa fa-plus"></i>
{% trans "Create many new dates" context "subevent" %}</a> {% trans "Create many new dates" context "subevent" %}</a>
</div>
</div> </div>
{% else %} {% else %}
<form class="row filter-form" action="" method="get"> <div class="panel panel-default">
<div class="col-md-4 col-sm-6 col-xs-12"> <form class="row filter-form panel-body" action="" method="get">
{% bootstrap_field filter_form.query layout='inline' %} <div class="col-md-4 col-sm-6 col-xs-12">
</div> {% bootstrap_field filter_form.query 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-3 col-sm-6 col-xs-12">
</div> {% bootstrap_field filter_form.status layout='inline' %}
<div class="col-md-3 col-sm-6 col-xs-12"> </div>
{% bootstrap_field filter_form.weekday layout='inline' %} <div class="col-md-3 col-sm-6 col-xs-12">
</div> {% bootstrap_field filter_form.weekday 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-2 col-sm-6 col-xs-12">
<span class="fa fa-filter"></span> <button class="btn btn-primary btn-block" type="submit">
<span class="hidden-md"> <span class="fa fa-filter"></span>
<span class="hidden-md">
{% trans "Filter" %} {% trans "Filter" %}
</span> </span>
</button> </button>
</div>
</form>
<div class="panel-body">
<a href="{% url "control:event.subevents.add" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-default"><i class="fa fa-plus"></i>
{% trans "Create a new date" context "subevent" %}</a>
<a href="{% url "control:event.subevents.bulk" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-default"><i class="fa fa-plus"></i>
{% trans "Create many new dates" context "subevent" %}</a>
</div> </div>
</form> <form action="{% url "control:event.subevents.bulkaction" organizer=request.event.organizer.slug event=request.event.slug %}"
<p> method="post" class="table-responsive">
<a href="{% url "control:event.subevents.add" organizer=request.event.organizer.slug event=request.event.slug %}" {% csrf_token %}
class="btn btn-default"><i class="fa fa-plus"></i>
{% trans "Create a new date" context "subevent" %}</a>
<a href="{% url "control:event.subevents.bulk" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-default"><i class="fa fa-plus"></i>
{% trans "Create many new dates" context "subevent" %}</a>
</p>
<form action="{% url "control:event.subevents.bulkaction" organizer=request.event.organizer.slug event=request.event.slug %}" method="post">
{% csrf_token %}
<div class="table-responsive">
<table class="table table-hover table-quotas"> <table class="table table-hover table-quotas">
<thead> <thead>
<tr> <tr>
@@ -64,17 +66,22 @@
</th> </th>
<th> <th>
{% trans "Begin" %} {% trans "Begin" %}
<a href="?{% url_replace request 'ordering' '-date_from' %}"><i class="fa fa-caret-down"></i></a> <a href="?{% url_replace request 'ordering' '-date_from' %}"><i
<a href="?{% url_replace request 'ordering' 'date_from' %}"><i class="fa fa-caret-up"></i></a> class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'date_from' %}"><i
class="fa fa-caret-up"></i></a>
</th> </th>
<th> <th>
{% trans "Paid tickets per quota" %} {% trans "Paid tickets per quota" %}
<a href="?{% url_replace request 'ordering' '-sum_tickets_paid' %}"><i class="fa fa-caret-down"></i></a> <a href="?{% url_replace request 'ordering' '-sum_tickets_paid' %}"><i
<a href="?{% url_replace request 'ordering' 'sum_tickets_paid' %}"><i class="fa fa-caret-up"></i></a> class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'sum_tickets_paid' %}"><i
class="fa fa-caret-up"></i></a>
</th> </th>
<th> <th>
{% trans "Status" %} {% trans "Status" %}
<a href="?{% url_replace request 'ordering' '-active' %}"><i class="fa fa-caret-down"></i></a> <a href="?{% url_replace request 'ordering' '-active' %}"><i
class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'active' %}"><i class="fa fa-caret-up"></i></a> <a href="?{% url_replace request 'ordering' 'active' %}"><i class="fa fa-caret-up"></i></a>
</th> </th>
<th></th> <th></th>
@@ -89,7 +96,8 @@
{% endif %} {% endif %}
</td> </td>
<td> <td>
<strong><a href="{% url "control:event.subevent" organizer=request.event.organizer.slug event=request.event.slug subevent=s.id %}"> <strong><a
href="{% url "control:event.subevent" organizer=request.event.organizer.slug event=request.event.slug subevent=s.id %}">
{{ s.name }}</a></strong> {{ s.name }}</a></strong>
</td> </td>
<td>{{ s.get_date_from_display }}</td> <td>{{ s.get_date_from_display }}</td>
@@ -99,8 +107,8 @@
{% endfor %} {% endfor %}
{% if s.first_quotas|length > 3 %} {% if s.first_quotas|length > 3 %}
<a href="{% url "control:event.items.quotas" organizer=request.event.organizer.slug event=request.event.slug %}?subevent={{ s.id }}" <a href="{% url "control:event.items.quotas" organizer=request.event.organizer.slug event=request.event.slug %}?subevent={{ s.id }}"
class="quotabox-more" data-toggle="tooltip" title="{% trans "More quotas" %}" class="quotabox-more" data-toggle="tooltip" title="{% trans "More quotas" %}"
data-placement="top"> data-placement="top">
&middot;&middot;&middot; &middot;&middot;&middot;
</a> </a>
{% endif %} {% endif %}
@@ -108,16 +116,17 @@
<td> <td>
{% if not s.active %} {% if not s.active %}
<span class="label label-danger">{% trans "Disabled" %}</span> <span class="label label-danger">{% trans "Disabled" %}</span>
{% elif s.presale_has_ended %} {% elif s.presale_has_ended %}
<span class="label label-warning">{% trans "Presale over" %}</span> <span class="label label-warning">{% trans "Presale over" %}</span>
{% elif not s.presale_is_running %} {% elif not s.presale_is_running %}
<span class="label label-warning">{% trans "Presale not started" %}</span> <span class="label label-warning">{% trans "Presale not started" %}</span>
{% else %} {% else %}
<span class="label label-success">{% trans "On sale" %}</span> <span class="label label-success">{% trans "On sale" %}</span>
{% endif %} {% endif %}
</td> </td>
<td class="text-right"> <td class="text-right">
<a href="{% url "control:event.subevent" organizer=request.event.organizer.slug event=request.event.slug subevent=s.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a> <a href="{% url "control:event.subevent" organizer=request.event.organizer.slug event=request.event.slug subevent=s.id %}"
class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<div class="btn-group {% if forloop.revcounter0 < 2 %}dropup{% endif %}"> <div class="btn-group {% if forloop.revcounter0 < 2 %}dropup{% endif %}">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" <button type="button" class="btn btn-default btn-sm dropdown-toggle"
data-toggle="dropdown"> data-toggle="dropdown">
@@ -136,25 +145,34 @@
</li> </li>
</ul> </ul>
</div> </div>
<a href="{% url "control:event.subevent.delete" organizer=request.event.organizer.slug event=request.event.slug subevent=s.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a> <a href="{% url "control:event.subevent.delete" organizer=request.event.organizer.slug event=request.event.slug subevent=s.id %}"
class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
{% if "can_change_event_settings" in request.eventpermset %}
<tfoot>
<tr>
<td colspan="6">
<button type="submit" class="btn btn-default btn-save" name="action" value="delete">
{% trans "Delete selected" %}
</button>
<button type="submit" class="btn btn-default btn-save" name="action" value="enable">
{% trans "Enable selected" %}
</button>
<button type="submit" class="btn btn-default btn-save" name="action" value="disable">
{% trans "Disable selected" %}
</button>
</td>
</tr>
</tfoot>
{% endif %}
</table> </table>
</form>
<div class="panel-footer">
{% include "pretixcontrol/pagination.html" %}
</div> </div>
{% if "can_change_event_settings" in request.eventpermset %} </div>
<button type="submit" class="btn btn-default btn-save" name="action" value="delete">
{% trans "Delete selected" %}
</button>
<button type="submit" class="btn btn-default btn-save" name="action" value="enable">
{% trans "Enable selected" %}
</button>
<button type="submit" class="btn btn-default btn-save" name="action" value="disable">
{% trans "Disable selected" %}
</button>
{% endif %}
</form>
{% include "pretixcontrol/pagination.html" %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@@ -3,16 +3,22 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Add a two-factor authentication device" %}{% endblock %} {% block title %}{% trans "Add a two-factor authentication device" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Add a two-factor authentication device" %}</h1> <div class="panel panel-default">
<form action="" method="post" class="form-horizontal"> <div class="panel-heading">
{% csrf_token %} <h1 class="panel-title">{% trans "Add a two-factor authentication device" %}</h1>
{% bootstrap_form_errors form %}
{% bootstrap_field form.name layout='horizontal' %}
{% bootstrap_field form.devicetype layout='horizontal' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Continue" %}
</button>
</div> </div>
</form> <div class="panel-body">
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
{% bootstrap_form_errors form %}
{% bootstrap_field form.name layout='horizontal' %}
{% bootstrap_field form.devicetype layout='horizontal' %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Continue" %}
</button>
</div>
</form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -3,23 +3,24 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block title %}{% trans "Add a two-factor authentication device" %}{% endblock %} {% block title %}{% trans "Add a two-factor authentication device" %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans "Add a two-factor authentication device" %}</h1> <div class="panel panel-default">
<p> <div class="panel-heading">
{% trans "To set up this device, please follow the following steps:" %} <legend>
</p> {% trans "Step 1:" %}
<ol class="multi-step-tutorial"> {% trans "Download the Google Authenticator application to your phone:" %}
<li> </legend>
{% trans "Download the Google Authenticator application to your phone:" %} </div>
<div class="panel-body">
<ul> <ul>
<li> <li>
<a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&" <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&"
target="_blank"> target="_blank">
{% trans "Android (Google Play)" %} {% trans "Android (Google Play)" %}
</a> </a>
</li> </li>
<li> <li>
<a href="https://f-droid.org/repository/browse/?fdfilter=authenticator&fdid=com.google.android.apps.authenticator2" <a href="https://f-droid.org/repository/browse/?fdfilter=authenticator&fdid=com.google.android.apps.authenticator2"
target="_blank"> target="_blank">
{% trans "Android (F-Droid)" %} {% trans "Android (F-Droid)" %}
</a> </a>
</li> </li>
@@ -34,9 +35,14 @@
</a> </a>
</li> </li>
</ul> </ul>
</li> </div>
<li> </div>
<div class="panel panel-default">
<div class="panel-heading">
{% trans "Step 2:" %}
{% trans "Add a new account to the app by scanning the following barcode:" %} {% trans "Add a new account to the app by scanning the following barcode:" %}
</div>
<div class="panel-body">
<div class="qrcode-canvas" data-qrdata="#qrdata"></div> <div class="qrcode-canvas" data-qrdata="#qrdata"></div>
<p> <p>
<a data-toggle="collapse" href="#no_scan"> <a data-toggle="collapse" href="#no_scan">
@@ -55,40 +61,48 @@
{% trans 'In "Secret"/"Account Key", enter the following code:' %} {% trans 'In "Secret"/"Account Key", enter the following code:' %}
<div> <div>
<code id="otp_secret" style="white-space: pre">{{ secretGrouped }}</code> <code id="otp_secret" style="white-space: pre">{{ secretGrouped }}</code>
<button type="button" class="btn btn-default btn-xs btn-clipboard" data-clipboard-target="#otp_secret"> <button type="button" class="btn btn-default btn-xs btn-clipboard"
data-clipboard-target="#otp_secret">
<span class="fa fa-clipboard" aria-hidden="true"></span> <span class="fa fa-clipboard" aria-hidden="true"></span>
{% trans "copy" %} {% trans "copy" %}
</button> </button>
</div> </div>
<div> <div>
<small>Spaces don't matter.</small> <small>{% trans "Spaces don't matter." %}</small>
</div> </div>
</li> </li>
<li> <li>
{% trans 'If present, make sure "Time-based"/"TOTP" and 6 digit codes are selected.' %} {% trans 'If present, make sure "Time-based"/"TOTP" and 6 digit codes are selected.' %}
</li> </li>
</ol> </ol>
</div> </div>
</li> </div>
<li> </div>
<div class="panel panel-default">
<div class="panel-heading">
{% trans "Step 3:" %}
{% trans "Enter the displayed code here:" %} {% trans "Enter the displayed code here:" %}
</div>
<div class="panel-body">
<form class="form form-inline" method="post" action=""> <form class="form form-inline" method="post" action="">
{% csrf_token %} {% csrf_token %}
<input type="number" name="token" class="form-control" required="required"> <input type="number" name="token" class="form-control" required="required">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
{% trans "Continue" %} {% trans "Continue" %}
</button><br> </button>
<br>
<label> <label>
<input type="checkbox" name="activate" checked="checked" value="on"> <input type="checkbox" name="activate" checked="checked" value="on">
{% trans "Require second factor for future logins" %} {% trans "Require second factor for future logins" %}
</label> </label>
</form> </form>
</li> </div>
</ol> </div>
<script type="text/json" id="qrdata"> <script type="text/json" id="qrdata">
{{ qrdata|safe }} {{ qrdata|safe }}
</script> </script>
{% endblock %} {% endblock %}

Some files were not shown because too many files have changed in this diff Show More