forked from CGM_Public/pretix_original
Show issued gift card in order view
This commit is contained in:
@@ -33,7 +33,14 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if line.issued_gift_cards %}
|
||||
<dl>
|
||||
{% for gc in line.issued_gift_cards.all %}
|
||||
<dt>{% trans "Gift card code" %}</dt>
|
||||
<dd>{{ gc.secret }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% if line.has_questions %}
|
||||
<dl>
|
||||
{% if line.item.admission and event.settings.attendee_names_asked %}
|
||||
|
||||
@@ -163,7 +163,7 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TicketPageMixin,
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
ctx['cart'] = self.get_cart(
|
||||
answers=True, downloads=ctx['can_download'],
|
||||
queryset=self.order.positions.select_related('tax_rule'),
|
||||
queryset=self.order.positions.prefetch_related('issued_gift_cards').select_related('tax_rule'),
|
||||
order=self.order
|
||||
)
|
||||
ctx['can_download_multi'] = any([b['multi'] for b in self.download_buttons]) and (
|
||||
|
||||
Reference in New Issue
Block a user