diff --git a/doc/development/api/ticketoutput.rst b/doc/development/api/ticketoutput.rst index 64da67956..73e9f3cb7 100644 --- a/doc/development/api/ticketoutput.rst +++ b/doc/development/api/ticketoutput.rst @@ -74,6 +74,8 @@ The output class .. autoattribute:: multi_download_button_text + .. autoattribute:: long_download_button_text + .. autoattribute:: preview_allowed .. autoattribute:: javascript_required diff --git a/src/pretix/base/ticketoutput.py b/src/pretix/base/ticketoutput.py index 558e3b494..efc05010b 100644 --- a/src/pretix/base/ticketoutput.py +++ b/src/pretix/base/ticketoutput.py @@ -162,6 +162,13 @@ class BaseTicketOutput: """ return _('Download ticket') + @property + def long_download_button_text(self) -> str: + """ + The text on the large download button in the frontend. + """ + return self.download_button_text + @property def multi_download_button_text(self) -> str: """ diff --git a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py index d7f187c4d..1793bf241 100644 --- a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py +++ b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py @@ -29,6 +29,7 @@ class PdfTicketOutput(BaseTicketOutput): verbose_name = _('PDF output') download_button_text = _('PDF') multi_download_button_text = _('Download tickets (PDF)') + long_download_button_text = _('Download ticket (PDF)') def __init__(self, event, override_layout=None, override_background=None): self.override_layout = override_layout diff --git a/src/pretix/presale/templates/pretixpresale/event/fragment_downloads.html b/src/pretix/presale/templates/pretixpresale/event/fragment_downloads.html index cfe56144e..cacc50114 100644 --- a/src/pretix/presale/templates/pretixpresale/event/fragment_downloads.html +++ b/src/pretix/presale/templates/pretixpresale/event/fragment_downloads.html @@ -5,24 +5,37 @@ {% blocktrans trimmed %} You can download your tickets using the buttons below. Please have your ticket ready when entering the event. {% endblocktrans %} - - {% if cart.positions|length > 1 and can_download_multi %} -
- {% trans "Download all tickets at once:" %} - {% for b in download_buttons %} - {% if b.multi %} -
+ {% endif %} + {% endfor %} + + {% elif tickets_with_download|length == 1 %} ++ {% for b in download_buttons %} +
- {% endif %} - {% endfor %} - - {% endif %} + {% endfor %} + + {% endif %} + {% elif not download_buttons and ticket_download_date %} {% if order.status == 'p' %}