forked from CGM_Public/pretix_original
Show download-provider specific icons where defined
This commit is contained in:
committed by
Raphael Michel
parent
08ee37112f
commit
1b5c4a21bb
@@ -156,3 +156,10 @@ class BaseTicketOutput:
|
||||
The text on the download button in the frontend.
|
||||
"""
|
||||
return _('Download ticket')
|
||||
|
||||
@property
|
||||
def download_button_icon(self) -> str:
|
||||
"""
|
||||
The Font Awesome icon on the download button in the frontend.
|
||||
"""
|
||||
return 'fa-download'
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<a href="{% eventurl event "presale:event.order.download" secret=order.secret order=order.code output=b.identifier position=line.id %}"
|
||||
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}"
|
||||
data-asyncdownload>
|
||||
<span class="fa fa-download"></span> {{ b.text }}
|
||||
<span class="fa {{ b.icon }}"></span> {{ b.text }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -150,7 +150,7 @@
|
||||
<a href="{% eventurl event "presale:event.order.download" secret=order.secret order=order.code output=b.identifier position=line.id %}"
|
||||
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}"
|
||||
data-asyncdownload>
|
||||
<span class="fa fa-download"></span> {{ b.text }}
|
||||
<span class="fa {{ b.icon }}"></span> {{ b.text }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<a href="{% eventurl event "presale:event.order.download.combined" secret=order.secret order=order.code output=b.identifier %}"
|
||||
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}"
|
||||
data-asyncdownload>
|
||||
<span class="fa fa-download"></span> {{ b.text }}
|
||||
<span class="fa {{ b.icon }}"></span> {{ b.text }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -82,6 +82,7 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TemplateView):
|
||||
continue
|
||||
buttons.append({
|
||||
'text': provider.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