Fix presale date display in calendar (Z#23216645) (#5710)

Fix presale date display in calendar and introduce a template tag
This commit is contained in:
Phin Wolkwitz
2025-12-17 16:18:59 +01:00
committed by GitHub
parent 2e89fc0a94
commit 11df4398e1
8 changed files with 106 additions and 39 deletions

View File

@@ -471,10 +471,11 @@ class WidgetAPIProductList(EventListMixin, View):
availability['color'] = 'red'
availability['text'] = gettext('Sale over')
availability['reason'] = 'over'
elif event.settings.presale_start_show_date and ev.presale_start:
elif event.settings.presale_start_show_date and ev.effective_presale_start:
availability['color'] = 'orange'
availability['text'] = gettext('from %(start_date)s') % {
'start_date': date_format(ev.presale_start.astimezone(tz or event.timezone), "SHORT_DATE_FORMAT")
'start_date': date_format(ev.effective_presale_start.astimezone(tz or event.timezone),
"SHORT_DATE_FORMAT")
}
availability['reason'] = 'soon'
else: