Calendar: Show fully booked instead of sold out for free events

This commit is contained in:
Raphael Michel
2020-09-24 10:51:41 +02:00
parent 787e7ec993
commit 035c707427
7 changed files with 38 additions and 10 deletions

View File

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

View File

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