shiftregister/shiftregister/team/templates/shift_detail.html

71 lines
2.5 KiB
HTML

{% extends "base.html" %}
{% block title %}Schichtdetails{% endblock %}
{% block content %}
<h3 class="title is-spaced">{% if shift.deleted %}(gelöscht) {% endif %}{{ shift.room.name }} {{ shift.start_at }} ({{ shift.registration_count }}/{{ shift.required_helpers|default:shift.room.required_helpers }})</h3>
{% if shift.room.description %}
<div class="description">
<strong>Beschreibung:</strong>
<p>{{ shift.room.description|safe|linebreaksbr }}</p>
</div>
{% endif %}
{% if shift.description %}
<div class="description">
<strong>Zusatzinfo:</strong>
<p>{{ shift.description|linebreaksbr }}</p>
</div>
{% endif %}
{% if shift.shiftregistration_set.all %}
<h5 class="subtitle">Helfer*innen</h5>
<div class="columns is-multiline">
{% for reg in shift.shiftregistration_set.all %}
<div class="column is-one-quarter">
<div class="box">
<div class="is-flex is-align-items-center is-justify-content-space-between mb-2">
<a class="is-size-4" href="{% url 'team:helper' reg.helper.pk %}">{{ reg.helper.name }}</a>
<a class="button is-link is-small" href="tel:{{ reg.helper.phone }}">📞</a>
</div>
<div class="buttons">
{% if not reg.is_checked_in %}
<a class="button is-warning is-small" href="{% url 'team:checkin' reg.pk %}">Als angekommen markieren</a><br>
{% else %}
<button class="button is-success is-small" style="pointer-events:none;"></button>
{% endif %}
<a class="button is-danger is-small" href="{% url 'team:unregister' reg.pk %}">Helfer*in abmelden</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
<h5 class="subtitle">Helfer*in eintragen</h5>
<form action="" method="post">
{% csrf_token %}
{% for field in add_helper_form %}
<div class="field">
{% if field.widget_type == 'checkbox' %}
<div class="control">
<label class="checkbox" for="{{ field.id_for_label }}">{{ field }} {{ field.label }}</label>
</div>
{% else %}
<label class="label" for="{{ field.id_for_label }}">{{ field.label }}</label>
<div class="control">
{% if field.widget_type == 'select' %}
<div class="select">
{{ field }}
</div>
{% else %}
{{ field }}
{% endif %}
</div>
{% endif %}
{% if field.help_text %}
<p class="is-size-7 mt-1">{{ field.help_text }}</p>
{% endif %}
</div>
{% endfor %}
<button class="button is-link" type="submit">Hinzufügen</button>
</form>
{% endblock %}