From ecf05b2392d6f63e1632a0cef27e4535bba6470a Mon Sep 17 00:00:00 2001
From: Raphael Michel
Date: Thu, 7 Jan 2021 10:25:00 +0100
Subject: [PATCH] Waiting list: Show warning if event is not live
---
.../control/templates/pretixcontrol/waitinglist/index.html | 5 +++++
src/pretix/control/views/waitinglist.py | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/src/pretix/control/templates/pretixcontrol/waitinglist/index.html b/src/pretix/control/templates/pretixcontrol/waitinglist/index.html
index f6a7389477..12278e4b62 100644
--- a/src/pretix/control/templates/pretixcontrol/waitinglist/index.html
+++ b/src/pretix/control/templates/pretixcontrol/waitinglist/index.html
@@ -31,6 +31,11 @@
here immediately. If you want, you can also send them out manually right now.
{% endblocktrans %}
+ {% if not running %}
+
+ {% trans "Currently, no vouchers will be sent since your event is not live or is not selling tickets." %}
+
+ {% endif %}
{% else %}
{% blocktrans trimmed %}
diff --git a/src/pretix/control/views/waitinglist.py b/src/pretix/control/views/waitinglist.py
index c2b86b358d..4a6e5de0ab 100644
--- a/src/pretix/control/views/waitinglist.py
+++ b/src/pretix/control/views/waitinglist.py
@@ -174,6 +174,12 @@ class WaitingListView(EventPermissionRequiredMixin, PaginationMixin, ListView):
ctx['any_avail'] = any_avail
ctx['estimate'] = self.get_sales_estimate()
+
+ ctx['running'] = (
+ self.request.event.live
+ and (self.request.event.has_subevents or self.request.event.presale_is_running)
+ )
+
return ctx
def get_sales_estimate(self):