mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Fix wrongly displayed download buttons
This commit is contained in:
@@ -130,7 +130,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if download %}
|
{% if download and line.item.admission|default:event.settings.ticket_download_nonadm %}
|
||||||
<div class="download-mobile">
|
<div class="download-mobile">
|
||||||
{% if not line.addon_to or event.settings.ticket_download_addons %}
|
{% if not line.addon_to or event.settings.ticket_download_addons %}
|
||||||
{% for b in download_buttons %}
|
{% for b in download_buttons %}
|
||||||
|
|||||||
@@ -94,12 +94,15 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TemplateView):
|
|||||||
) and self.order.status == Order.STATUS_PAID
|
) and self.order.status == Order.STATUS_PAID
|
||||||
)
|
)
|
||||||
ctx['download_buttons'] = self.download_buttons
|
ctx['download_buttons'] = self.download_buttons
|
||||||
ctx['can_download_multi'] = any([b['multi'] for b in self.download_buttons])
|
|
||||||
ctx['cart'] = self.get_cart(
|
ctx['cart'] = self.get_cart(
|
||||||
answers=True, downloads=ctx['can_download'],
|
answers=True, downloads=ctx['can_download'],
|
||||||
queryset=self.order.positions.all(),
|
queryset=self.order.positions.all(),
|
||||||
payment_fee=self.order.payment_fee, payment_fee_tax_rate=self.order.payment_fee_tax_rate
|
payment_fee=self.order.payment_fee, payment_fee_tax_rate=self.order.payment_fee_tax_rate
|
||||||
)
|
)
|
||||||
|
ctx['can_download_multi'] = any([b['multi'] for b in self.download_buttons]) and (
|
||||||
|
self.request.event.settings.ticket_download_nonadm or
|
||||||
|
any([p.item.admission for p in ctx['cart']['positions']])
|
||||||
|
)
|
||||||
ctx['invoices'] = list(self.order.invoices.all())
|
ctx['invoices'] = list(self.order.invoices.all())
|
||||||
ctx['can_generate_invoice'] = invoice_qualified(self.order) and (
|
ctx['can_generate_invoice'] = invoice_qualified(self.order) and (
|
||||||
self.request.event.settings.invoice_generate == 'user'
|
self.request.event.settings.invoice_generate == 'user'
|
||||||
|
|||||||
Reference in New Issue
Block a user