mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Fix #1102 -- "View in backend" (doesn't work with custom domains)
This commit is contained in:
@@ -47,6 +47,11 @@
|
|||||||
{% if order.testmode %}
|
{% if order.testmode %}
|
||||||
<span class="label label-warning">{% trans "TEST MODE" %}</span>
|
<span class="label label-warning">{% trans "TEST MODE" %}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if backend_user %}
|
||||||
|
<a href="{% url "control:event.order" event=request.event.slug organizer=request.organizer.slug code=order.code %}" class="btn btn-default">
|
||||||
|
{% trans "View in backend" %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
{% include "pretixpresale/event/fragment_order_status.html" with order=order class="pull-right" %}
|
{% include "pretixpresale/event/fragment_order_status.html" with order=order class="pull-right" %}
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</h2>
|
</h2>
|
||||||
|
|||||||
@@ -128,6 +128,11 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TemplateView):
|
|||||||
self.order.total != Decimal('0.00') or not self.request.event.settings.invoice_address_not_asked_free
|
self.order.total != Decimal('0.00') or not self.request.event.settings.invoice_address_not_asked_free
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ctx['backend_user'] = (
|
||||||
|
self.request.user.is_authenticated
|
||||||
|
and self.request.user.has_event_permission(self.request.organizer, self.request.event, 'can_view_orders', request=self.request)
|
||||||
|
)
|
||||||
|
|
||||||
if self.order.status == Order.STATUS_PENDING:
|
if self.order.status == Order.STATUS_PENDING:
|
||||||
ctx['pending_sum'] = self.order.pending_sum
|
ctx['pending_sum'] = self.order.pending_sum
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user