mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user