Allow ticket output methods to opt-out from ZIP generation

This commit is contained in:
Raphael Michel
2017-07-14 17:32:16 +02:00
parent 7d9e642f24
commit 42287b92f1
4 changed files with 19 additions and 5 deletions

View File

@@ -76,6 +76,7 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TemplateView):
buttons.append({
'text': provider.download_button_text or 'Download',
'identifier': provider.identifier,
'multi': provider.multi_download_enabled
})
return buttons
@@ -93,6 +94,7 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TemplateView):
) and self.order.status == Order.STATUS_PAID
)
ctx['download_buttons'] = self.download_buttons
ctx['can_download_multi'] = any([b['multi'] for b in self.download_buttons])
ctx['cart'] = self.get_cart(
answers=True, downloads=ctx['can_download'],
queryset=self.order.positions.all(),