Enlarge download button for multi downloads

This commit is contained in:
Raphael Michel
2020-04-20 17:27:10 +02:00
parent 945218035e
commit d0dd2116ca
5 changed files with 13 additions and 2 deletions

View File

@@ -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:
"""

View File

@@ -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

View File

@@ -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 %}

View File

@@ -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,