Adjust 'event_before' page depending on 'enable_registration'
This commit is contained in:
parent
7c5c110283
commit
cf7d596270
|
@ -10,7 +10,15 @@ def event_state(view):
|
||||||
if state == "RUNNING":
|
if state == "RUNNING":
|
||||||
return view(request, *args, **kwargs)
|
return view(request, *args, **kwargs)
|
||||||
if state == "BEFORE":
|
if state == "BEFORE":
|
||||||
return render(request, "event_before.html", {})
|
return render(
|
||||||
|
request,
|
||||||
|
"event_before.html",
|
||||||
|
{
|
||||||
|
"enable_registration": global_preferences[
|
||||||
|
"helper__enable_registration"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
)
|
||||||
return render(request, "event_after.html", {})
|
return render(request, "event_after.html", {})
|
||||||
|
|
||||||
return wrapped
|
return wrapped
|
||||||
|
|
|
@ -6,8 +6,14 @@
|
||||||
<h3 class="title">Bald geht's los!</h3>
|
<h3 class="title">Bald geht's los!</h3>
|
||||||
<p>
|
<p>
|
||||||
{% if not helper %}
|
{% if not helper %}
|
||||||
|
{% if enable_registration %}
|
||||||
Du kannst dich gerne bereits <a href="{% url 'register' %}">anmelden</a>.
|
Du kannst dich gerne bereits <a href="{% url 'register' %}">anmelden</a>.
|
||||||
|
{% else %}
|
||||||
|
Aktuell ist es leider nicht möglich, sich für die Helfer*innen zu registrieren. Bitte komm später wieder.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% if helper or enable_registration %}
|
||||||
Wir schicken dir dann eine SMS, sobald wir freie Schichten haben.
|
Wir schicken dir dann eine SMS, sobald wir freie Schichten haben.
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue