diff --git a/src/pretix/presale/templates/pretixpresale/event/fragment_event_info.html b/src/pretix/presale/templates/pretixpresale/event/fragment_event_info.html new file mode 100644 index 0000000000..a617c6a75e --- /dev/null +++ b/src/pretix/presale/templates/pretixpresale/event/fragment_event_info.html @@ -0,0 +1,66 @@ +{% load i18n %} +{% load eventurl %} +{% if ev.location and show_location %} +
+ +

{% trans "Where does the event happen?" %} + {{ ev.location|linebreaksbr }} +

+
+{% endif %} +{% if ev.settings.show_dates_on_frontpage %} +
+ +

{% trans "When does the event happen?" %} + {{ ev.get_date_range_display_as_html }} + {% if event.settings.show_times %} +
+ + {% with time_human=ev.date_from|date:"TIME_FORMAT" time_24=ev.date_from|time:"H:i" %} + {% blocktrans trimmed with time='"|safe %} + Begin: {{ time }} + {% endblocktrans %} + {% endwith %} + + {% if event.settings.show_date_to and ev.date_to %} +
+ + {% with time_human=ev.date_to|date:"TIME_FORMAT" time_24=ev.date_to|time:"H:i" %} + {% blocktrans trimmed with time='"|safe %} + End: {{ time }} + {% endblocktrans %} + {% endwith %} + + {% endif %} + {% endif %} + {% if ev.date_admission %} +
+ {% 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='"|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='"|safe %} + Admission: {{ datetime }} + {% endblocktrans %} + {% endwith %} + + {% endif %} + {% endif %} +
+ {% if subevent %} + + {% else %} + + {% endif %} + {% trans "Add to Calendar" %} + +

+
+{% endif %} diff --git a/src/pretix/presale/templates/pretixpresale/event/index.html b/src/pretix/presale/templates/pretixpresale/event/index.html index e5dd87eaf8..80d408cca2 100644 --- a/src/pretix/presale/templates/pretixpresale/event/index.html +++ b/src/pretix/presale/templates/pretixpresale/event/index.html @@ -162,73 +162,8 @@ {% endif %} {% if not cart_namespace or subevent %}
- {% if ev.location %} -
- -

{% trans "Where does the event happen?" %} - {{ ev.location|linebreaksbr }} -

-
- {% endif %} - {% if ev.settings.show_dates_on_frontpage %} -
- -

{% trans "When does the event happen?" %} - {{ ev.get_date_range_display_as_html }} - {% if event.settings.show_times %} -
- - {% with time_human=ev.date_from|date:"TIME_FORMAT" time_24=ev.date_from|time:"H:i" %} - {% blocktrans trimmed with time='"|safe %} - Begin: {{ time }} - {% endblocktrans %} - {% endwith %} - - {% if event.settings.show_date_to and ev.date_to %} -
- - {% with time_human=ev.date_to|date:"TIME_FORMAT" time_24=ev.date_to|time:"H:i" %} - {% blocktrans trimmed with time='"|safe %} - End: {{ time }} - {% endblocktrans %} - {% endwith %} - - {% endif %} - {% endif %} - {% if ev.date_admission %} -
- {% 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='"|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='"|safe %} - Admission: {{ datetime }} - {% endblocktrans %} - {% endwith %} - - {% endif %} - {% endif %} -
- {% if subevent %} - - {% else %} - - {% endif %} - {% trans "Add to Calendar" %} - -

-
- {% endif %} - + {% include "pretixpresale/event/fragment_event_info.html" with event=request.event subevent=subevent ev=ev show_location=True %}
- {% eventsignal event "pretix.presale.signals.front_page_top" request=request subevent=subevent %} {% endif %} diff --git a/src/pretix/presale/templates/pretixpresale/event/voucher.html b/src/pretix/presale/templates/pretixpresale/event/voucher.html index 062b4484aa..ca8c69b605 100644 --- a/src/pretix/presale/templates/pretixpresale/event/voucher.html +++ b/src/pretix/presale/templates/pretixpresale/event/voucher.html @@ -13,63 +13,28 @@ {% include "pretixpresale/event/fragment_cart_box.html" with open=request.GET.show_cart %} {% endif %} -

{% trans "Voucher redemption" %}

- {% if subevent %} +

{% trans "Voucher redemption" %}

{% if request.GET.subevent and subevent.pk|stringformat:"i" != request.GET.subevent %}
{% trans "This voucher is valid only for the following specific date and time." %}
{% endif %}

{{ subevent.name }}

- {% with ev=subevent %} -
- -

- {{ ev.get_date_range_display_as_html }} - {% if event.settings.show_times %} -
- {% with time_human=ev.date_from|date:"TIME_FORMAT" time_24=ev.date_from|time:"H:i" %} - {% blocktrans trimmed with time='"|safe %} - Begin: {{ time }} - {% endblocktrans %} - {% endwith %} - {% if event.settings.show_date_to and ev.date_to %} -
- {% with time_human=ev.date_to|date:"TIME_FORMAT" time_24=ev.date_to|time:"H:i" %} - {% blocktrans trimmed with time='"|safe %} - End: {{ time }} - {% endblocktrans %} - {% endwith %} - {% endif %} - {% endif %} - {% if ev.date_admission %} -
- {% 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='"|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='"|safe %} - Admission: {{ datetime }} - {% endblocktrans %} - {% endwith %} - {% endif %} - {% endif %} -
- {% if subevent %} - - {% else %} - - {% endif %} - {% trans "Add to Calendar" %} - -

-
- {% 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 %} +

+ {{ event.name }} + {% if request.event.settings.show_dates_on_frontpage %} + {{ event.get_date_range_display_as_html }} + {% endif %} +

+ {% include "pretixpresale/event/fragment_event_info.html" with event=request.event subevent=None ev=request.event show_location=True %} +

{% trans "Voucher redemption" %}

+ {% else %} +

{% trans "Voucher redemption" %}

+ {% endif %} {% endif %}