From dc51d51338170282cfaa83b9148fe3f39a24aa6e Mon Sep 17 00:00:00 2001 From: Martin Gross Date: Mon, 14 Oct 2019 11:40:57 +0200 Subject: [PATCH] Add hint to devices in checkinlist overview --- .../pretixcontrol/checkin/lists.html | 30 ++++++++++++++----- src/pretix/control/views/checkin.py | 6 ++++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/pretix/control/templates/pretixcontrol/checkin/lists.html b/src/pretix/control/templates/pretixcontrol/checkin/lists.html index 8bb189301b..c218747f75 100644 --- a/src/pretix/control/templates/pretixcontrol/checkin/lists.html +++ b/src/pretix/control/templates/pretixcontrol/checkin/lists.html @@ -19,6 +19,13 @@ performances. {% endblocktrans %}

+

+ {% blocktrans trimmed %} + If you have the appropriate organizer-level permissions, you can connect new devices to your account and + use them to validate tickets. Since the devices are connected on the organizer level, you do not have to + create a new device for every event but can reuse them over and over again. + {% endblocktrans %} +

{% if request.event.has_subevents %}
@@ -40,17 +47,24 @@ {% if "can_change_event_settings" in request.eventpermset %} - {% trans "Create a new check-in list" %} + class="btn btn-primary btn-lg"> {% trans "Create a new check-in list" %} + {% endif %} + {% if can_change_organizer_settings %} + {% trans "Connected devices" %} {% endif %} {% else %} - {% if "can_change_event_settings" in request.eventpermset %} -

- {% trans "Create a new check-in list" %} - -

- {% endif %} +

+ {% if "can_change_event_settings" in request.eventpermset %} + {% trans "Create a new check-in list" %} + {% endif %} + {% if can_change_organizer_settings %} + {% trans "Connected devices" %} + {% endif %} +

diff --git a/src/pretix/control/views/checkin.py b/src/pretix/control/views/checkin.py index 2cfee1d09e..817b2fec84 100644 --- a/src/pretix/control/views/checkin.py +++ b/src/pretix/control/views/checkin.py @@ -158,6 +158,12 @@ class CheckinListList(EventPermissionRequiredMixin, PaginationMixin, ListView): cl.auto_checkin_sales_channels = [sales_channels[channel] for channel in cl.auto_checkin_sales_channels] ctx['checkinlists'] = clists + ctx['can_change_organizer_settings'] = self.request.user.has_organizer_permission( + self.request.organizer, + 'can_change_organizer_settings', + self.request + ) + return ctx