shiftregister/shiftregister/app/templates/shift.html

43 lines
1.5 KiB
HTML

{% extends "helper_base.html" %}
{% block title %}Schichtansicht{% endblock %}
{% block content %}
<div class="box">
{% if is_registered %}
<div class="notification is-info">Du bist zu dieser Schicht angemeldet. Bitte komme 15 Minuten vor deiner Schicht am Treffpunkt.</div>
{% endif %}
{% if shift.deleted %}
<div class="notification">Diese Schicht wurde gelöscht.</div>
{% endif %}
{% if not can_register and not is_registered %}
<div class="notification">Diese Schicht ist bereits besetzt.</div>
{% endif %}
<div class="content">
<strong>Ort:</strong> {{ shift.room.name }}<br>
<strong>Beginn:</strong> {{ shift.start_at }}<br>
<strong>Dauer:</strong> {{ shift.duration }}<br>
<strong>Treffpunkt:</strong> {{ shift.room.meeting_location }}<br>
<em>{{ shift.description|linebreaksbr }}</em>
</div>
{% if can_register and not shift.deleted %}
<form action="" method="post">
{% csrf_token %}
{{ shift_form.as_p }}
<input type="submit" class="button is-link" value="Anmelden">
</form>
{% endif %}
{% if is_registered and not shift.deleted %}
{% if can_cancel %}
<form action="{% url 'cancel' shift.pk %}" method="post">
{% csrf_token %}
{{ shift_form.as_p }}
<input type="submit" class="button is-danger is-small" value="Abmelden">
</form>
{% elif not shift.has_ended %}
<div class="content">Bitte wende dich an den Infopoint, falls du es nicht zu deiner Schicht schaffst.</div>
{% endif %}
{% endif %}
</div>
{% endblock %}