forked from CGM_Public/pretix_original
Add effective presale_start and presale_end properties (#1851)
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<span class="label label-danger">{% trans "Sale over" %}</span>
|
||||
{% elif event.settings.presale_start_show_date %}
|
||||
<span class="label label-warning">
|
||||
{% blocktrans trimmed with date=subev.presale_start|date:"SHORT_DATE_FORMAT" %}
|
||||
{% blocktrans trimmed with date=subev.effective_presale_start|date:"SHORT_DATE_FORMAT" %}
|
||||
Sale starts {{ date }}
|
||||
{% endblocktrans %}
|
||||
</span>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% elif event.settings.presale_start_show_date %}
|
||||
{% blocktrans trimmed with date=ev.presale_start|date:"SHORT_DATE_FORMAT" time=ev.presale_start|time:"TIME_FORMAT" %}
|
||||
{% blocktrans trimmed with date=ev.effective_presale_start|date:"SHORT_DATE_FORMAT" time=ev.effective_presale_start|time:"TIME_FORMAT" %}
|
||||
The presale for this event will start on {{ date }} at {{ time }}.
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<span class="label label-danger">{% trans "Sale over" %}</span>
|
||||
{% elif e.settings.presale_start_show_date %}
|
||||
<span class="label label-warning">
|
||||
{% blocktrans trimmed with date=e.presale_start|date:"SHORT_DATE_FORMAT" %}
|
||||
{% blocktrans trimmed with date=e.effective_presale_start|date:"SHORT_DATE_FORMAT" %}
|
||||
Sale starts {{ date }}
|
||||
{% endblocktrans %}
|
||||
</span>
|
||||
|
||||
@@ -569,8 +569,8 @@ class WidgetAPIProductList(EventListMixin, View):
|
||||
data['error'] = gettext('The presale period for this event is over.')
|
||||
elif request.event.settings.presale_start_show_date:
|
||||
data['error'] = gettext('The presale for this event will start on %(date)s at %(time)s.') % {
|
||||
'date': date_format(ev.presale_start.astimezone(request.event.timezone), "SHORT_DATE_FORMAT"),
|
||||
'time': date_format(ev.presale_start.astimezone(request.event.timezone), "TIME_FORMAT"),
|
||||
'date': date_format(ev.effective_presale_start.astimezone(request.event.timezone), "SHORT_DATE_FORMAT"),
|
||||
'time': date_format(ev.effective_presale_start.astimezone(request.event.timezone), "TIME_FORMAT"),
|
||||
}
|
||||
else:
|
||||
data['error'] = gettext('The presale for this event has not yet started.')
|
||||
|
||||
Reference in New Issue
Block a user