Show link for other dates in widget checkout

This commit is contained in:
Raphael Michel
2019-11-25 16:44:42 +01:00
parent b49e02d988
commit 436dcc68f2
2 changed files with 7 additions and 0 deletions

View File

@@ -152,6 +152,7 @@ class TemplateFlowStep(TemplateResponseMixin, BaseCheckoutFlowStep):
def get_context_data(self, **kwargs):
kwargs.setdefault('step', self)
kwargs.setdefault('event', self.event)
kwargs.setdefault('has_prev', self.get_prev_applicable(self.request) is not None)
kwargs.setdefault('prev_url', self.get_prev_url(self.request))
kwargs.setdefault('checkout_flow', [
step

View File

@@ -37,6 +37,12 @@
</div>
</div>
</details>
{% if not has_prev and request.event.has_subevents and request.session.iframe_session %}
<a class="btn btn-primary btn-block btn-lg" href="{{ prev_url }}">
<span class="fa fa-reply"></span>
{% trans "Add tickets for a different date" %}
</a>
{% endif %}
<h2>{% trans "Checkout" %}</h2>
{% include "pretixpresale/event/fragment_checkoutflow.html" %}
{% block inner %}