Allow to access not-yet-live shop on different domain

This commit is contained in:
Raphael Michel
2017-01-05 11:50:10 +01:00
parent f6d8b825d5
commit d3f21353ca
5 changed files with 82 additions and 9 deletions

View File

@@ -3,12 +3,21 @@
{% load eventurl %}
{% block title %}{{ request.event.name }}{% endblock %}
{% block content %}
<h1>
{{ request.event.name }}
<a href="{% eventurl request.event "presale:event.index" %}" class="btn btn-default btn-sm" target="_blank">
{% trans "Go to shop" %}
</a>
</h1>
<form action="{% eventurl request.event "presale:event.auth" %}" method="post" target="_blank">
<h1>
{{ request.event.name }}
{% if has_domain and not request.event.live %}
<input type="hidden" value="{{ new_session }}" name="session">
<button type="submit" class="btn btn-default btn-sm">
{% trans "Go to shop" %}
</button>
{% else %}
<a href="{% eventurl request.event "presale:event.index" %}" class="btn btn-default btn-sm" target="_blank">
{% trans "Go to shop" %}
</a>
{% endif %}
</h1>
</form>
{% if actions|length > 0 %}
<div class="panel panel-danger">