Waiting list: Show warning if event is not live

This commit is contained in:
Raphael Michel
2021-01-07 10:25:00 +01:00
parent 4aa9f073b3
commit ecf05b2392
2 changed files with 11 additions and 0 deletions

View File

@@ -31,6 +31,11 @@
here immediately. If you want, you can also send them out manually right now.
{% endblocktrans %}
</p>
{% if not running %}
<div class="alert alert-warning">
{% trans "Currently, no vouchers will be sent since your event is not live or is not selling tickets." %}
</div>
{% endif %}
{% else %}
<p>
{% blocktrans trimmed %}

View File

@@ -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):