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.
|
The text on the download button in the frontend.
|
||||||
"""
|
"""
|
||||||
return _('Download ticket')
|
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 %}"
|
<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 %}"
|
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}"
|
||||||
data-asyncdownload>
|
data-asyncdownload>
|
||||||
<span class="fa fa-download"></span> {{ b.text }}
|
<span class="fa {{ b.icon }}"></span> {{ b.text }}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% 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 %}"
|
<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 %}"
|
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}"
|
||||||
data-asyncdownload>
|
data-asyncdownload>
|
||||||
<span class="fa fa-download"></span> {{ b.text }}
|
<span class="fa {{ b.icon }}"></span> {{ b.text }}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<a href="{% eventurl event "presale:event.order.download.combined" secret=order.secret order=order.code output=b.identifier %}"
|
<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 %}"
|
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}"
|
||||||
data-asyncdownload>
|
data-asyncdownload>
|
||||||
<span class="fa fa-download"></span> {{ b.text }}
|
<span class="fa {{ b.icon }}"></span> {{ b.text }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TemplateView):
|
|||||||
continue
|
continue
|
||||||
buttons.append({
|
buttons.append({
|
||||||
'text': provider.download_button_text or 'Download',
|
'text': provider.download_button_text or 'Download',
|
||||||
|
'icon': provider.download_button_icon or 'fa-download',
|
||||||
'identifier': provider.identifier,
|
'identifier': provider.identifier,
|
||||||
'multi': provider.multi_download_enabled
|
'multi': provider.multi_download_enabled
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user