forked from CGM_Public/pretix_original
Voucher redemption: Display event title in some cases (#3519)
* Voucher redemption: Display event title in some cases (Z#23127871) * Remove unnecessary "with" statement * fix indentation --------- Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -13,63 +13,28 @@
|
||||
{% include "pretixpresale/event/fragment_cart_box.html" with open=request.GET.show_cart %}
|
||||
{% endif %}
|
||||
|
||||
<h2>{% trans "Voucher redemption" %}</h2>
|
||||
|
||||
{% if subevent %}
|
||||
<h2>{% trans "Voucher redemption" %}</h2>
|
||||
{% if request.GET.subevent and subevent.pk|stringformat:"i" != request.GET.subevent %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "This voucher is valid only for the following specific date and time." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<h3>{{ subevent.name }}</h3>
|
||||
{% with ev=subevent %}
|
||||
<div class="info-row">
|
||||
<span class="fa fa-clock-o fa-fw" aria-hidden="true"></span>
|
||||
<p>
|
||||
{{ ev.get_date_range_display_as_html }}
|
||||
{% if event.settings.show_times %}
|
||||
<br>
|
||||
{% with time_human=ev.date_from|date:"TIME_FORMAT" time_24=ev.date_from|time:"H:i" %}
|
||||
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
|
||||
Begin: {{ time }}
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% if event.settings.show_date_to and ev.date_to %}
|
||||
<br>
|
||||
{% with time_human=ev.date_to|date:"TIME_FORMAT" time_24=ev.date_to|time:"H:i" %}
|
||||
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
|
||||
End: {{ time }}
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if ev.date_admission %}
|
||||
<br>
|
||||
{% if ev.date_admission|date:"SHORT_DATE_FORMAT" == ev.date_from|date:"SHORT_DATE_FORMAT" %}
|
||||
{% with time_human=ev.date_admission|date:"TIME_FORMAT" time_24=ev.date_admission|time:"H:i" %}
|
||||
{% blocktrans trimmed with time='<time datetime="'|add:time_24|add:'">'|add:time_human|add:"</time>"|safe %}
|
||||
Admission: {{ time }}
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% with datetime_human=ev.date_admission|date:"SHORT_DATETIME_FORMAT" datetime_iso=ev.date_admission|time:"Y-m-d H:i" %}
|
||||
{% blocktrans trimmed with datetime='<time datetime="'|add:datetime_iso|add:'">'|add:datetime_human|add:"</time>"|safe %}
|
||||
Admission: {{ datetime }}
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br>
|
||||
{% if subevent %}
|
||||
<a href="{% eventurl event "presale:event.ical.download" subevent=subevent.pk %}">
|
||||
{% else %}
|
||||
<a href="{% eventurl event "presale:event.ical.download" %}">
|
||||
{% endif %}
|
||||
{% trans "Add to Calendar" %}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% include "pretixpresale/event/fragment_event_info.html" with event=request.event subevent=subevent ev=subevent show_location=True %}
|
||||
{% else %}
|
||||
{% if event_logo and event_logo_show_title %}
|
||||
<h2 class="content-header">
|
||||
{{ event.name }}
|
||||
{% if request.event.settings.show_dates_on_frontpage %}
|
||||
<small>{{ event.get_date_range_display_as_html }}</small>
|
||||
{% endif %}
|
||||
</h2>
|
||||
{% include "pretixpresale/event/fragment_event_info.html" with event=request.event subevent=None ev=request.event show_location=True %}
|
||||
<h3>{% trans "Voucher redemption" %}</h3>
|
||||
{% else %}
|
||||
<h2>{% trans "Voucher redemption" %}</h2>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user