mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Enlarge download button for multi downloads
This commit is contained in:
@@ -162,6 +162,13 @@ class BaseTicketOutput:
|
||||
"""
|
||||
return _('Download ticket')
|
||||
|
||||
@property
|
||||
def multi_download_button_text(self) -> str:
|
||||
"""
|
||||
The text on the multi download button in the frontend.
|
||||
"""
|
||||
return self.download_button_text
|
||||
|
||||
@property
|
||||
def download_button_icon(self) -> str:
|
||||
"""
|
||||
|
||||
@@ -28,6 +28,7 @@ class PdfTicketOutput(BaseTicketOutput):
|
||||
identifier = 'pdf'
|
||||
verbose_name = _('PDF output')
|
||||
download_button_text = _('PDF')
|
||||
multi_download_button_text = _('Download tickets (PDF)')
|
||||
|
||||
def __init__(self, event, override_layout=None, override_background=None):
|
||||
self.override_layout = override_layout
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
method="post" data-asynctask data-asynctask-download class="download-btn-form">
|
||||
{% csrf_token %}
|
||||
<button type="submit"
|
||||
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}">
|
||||
<span class="fa {{ b.icon }}"></span> {{ b.text }}
|
||||
class="btn btn-lg {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}">
|
||||
<span class="fa {{ b.icon }}"></span> {{ b.multi_text }}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
@@ -161,6 +161,7 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TicketPageMixin,
|
||||
continue
|
||||
buttons.append({
|
||||
'text': provider.download_button_text or 'Download',
|
||||
'multi_text': provider.multi_download_button_text or 'Download',
|
||||
'icon': provider.download_button_icon or 'fa-download',
|
||||
'identifier': provider.identifier,
|
||||
'multi': provider.multi_download_enabled,
|
||||
|
||||
Reference in New Issue
Block a user