mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Calendar: Show fully booked instead of sold out for free events
This commit is contained in:
@@ -24,7 +24,11 @@
|
||||
{% elif subev.best_availability_state == 20 %}
|
||||
<span class="label label-warning">{% trans "Reserved" %}</span>
|
||||
{% elif subev.best_availability_state < 20 %}
|
||||
<span class="label label-danger">{% trans "Sold out" %}</span>
|
||||
{% if subev.has_paid_item %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Sold out" %}
|
||||
{% else %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Fully booked" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elif subev.presale_is_running %}
|
||||
<span class="label label-success">{% trans "Book now" %}</span>
|
||||
|
||||
@@ -57,6 +57,11 @@
|
||||
<strong>
|
||||
{% endif %}
|
||||
{{ event.time|date:"TIME_FORMAT" }}
|
||||
{% if event.time_end %}
|
||||
– {{ event.time_end|date:"TIME_FORMAT" }}
|
||||
{% endif %}
|
||||
{% if event.event.settings.show_date_to and event. %}
|
||||
{% endif %}
|
||||
{% if not show_names|default_if_none:True %}
|
||||
</strong>
|
||||
{% endif %}
|
||||
@@ -74,7 +79,11 @@
|
||||
{% elif event.event.best_availability_state == 20 %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Reserved" %}
|
||||
{% elif event.event.best_availability_state < 20 %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Sold out" %}
|
||||
{% if event.event.has_paid_item %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Sold out" %}
|
||||
{% else %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Fully booked" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elif event.event.presale_is_running %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Book now" %}
|
||||
|
||||
@@ -58,7 +58,11 @@
|
||||
{% elif event.event.best_availability_state == 20 %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Reserved" %}
|
||||
{% elif event.event.best_availability_state < 20 %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Sold out" %}
|
||||
{% if event.event.has_paid_item %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Sold out" %}
|
||||
{% else %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Fully booked" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elif event.event.presale_is_running %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Book now" %}
|
||||
|
||||
@@ -108,7 +108,11 @@
|
||||
{% elif e.best_availability_state == 20 %}
|
||||
<span class="label label-warning">{% trans "Reserved" %}</span>
|
||||
{% elif e.best_availability_state < 20 %}
|
||||
<span class="label label-danger">{% trans "Sold out" %}</span>
|
||||
{% if e.has_paid_item %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Sold out" %}
|
||||
{% else %}
|
||||
<span class="fa fa-ticket"></span> {% trans "Fully booked" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elif e.presale_is_running %}
|
||||
<span class="label label-success">{% trans "Book now" %}</span>
|
||||
|
||||
@@ -17,9 +17,7 @@ from django.views.generic import ListView, TemplateView
|
||||
from pytz import UTC
|
||||
|
||||
from pretix.base.i18n import language
|
||||
from pretix.base.models import (
|
||||
Event, EventMetaValue, SubEvent, SubEventMetaValue,
|
||||
)
|
||||
from pretix.base.models import Event, EventMetaValue, SubEvent, SubEventMetaValue
|
||||
from pretix.base.services.quotas import QuotaAvailability
|
||||
from pretix.helpers.daterange import daterange
|
||||
from pretix.helpers.formats.de.formats import WEEK_FORMAT
|
||||
|
||||
@@ -317,7 +317,10 @@ class WidgetAPIProductList(EventListMixin, View):
|
||||
availability['text'] = gettext('Reserved')
|
||||
elif ev.best_availability_state < Quota.AVAILABILITY_RESERVED:
|
||||
availability['color'] = 'red'
|
||||
availability['text'] = gettext('Sold out')
|
||||
if ev.has_paid_item:
|
||||
availability['text'] = gettext('Sold out')
|
||||
else:
|
||||
availability['text'] = gettext('Fully booked')
|
||||
elif ev.presale_is_running:
|
||||
availability['color'] = 'green'
|
||||
availability['text'] = gettext('Book now')
|
||||
|
||||
Reference in New Issue
Block a user