117 lines
4.1 KiB
HTML
117 lines
4.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% load shift_extras %}
|
|
|
|
{% block title %}Schichtdetails{% endblock %}
|
|
|
|
{% block content %}
|
|
<h3 class="title is-spaced">
|
|
{% if shift.deleted %}(gelöscht) {% endif %}
|
|
<a href="{% url 'team:shift_room' shift.room.name %}">{{ shift.room.name }}</a>
|
|
{{ shift.start_at }}
|
|
{% with shift.start_at|night_from_to as night %}
|
|
{% if night %}
|
|
({{ night }})
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% with shift.required_helpers|default:shift.room.required_helpers as required_helpers %}
|
|
{% if shift.event.calendar.restricted %}
|
|
({{ required_helpers }} Teami{{ required_helpers|pluralize }})
|
|
{% else %}
|
|
({{ shift.registration_count }}/{{ required_helpers }})
|
|
{% endif %}
|
|
{% endwith %}
|
|
</h3>
|
|
{% if shift.room.description %}
|
|
<div class="content">
|
|
<strong>Beschreibung:</strong>
|
|
<p>{{ shift.room.description|safe|linebreaksbr }}</p>
|
|
</div>
|
|
{% endif %}
|
|
{% if shift.description %}
|
|
<div class="content">
|
|
<strong>Zusatzinfo:</strong>
|
|
<p>{{ shift.description|linebreaksbr }}</p>
|
|
</div>
|
|
{% endif %}
|
|
{% if shift.shiftregistration_set.all %}
|
|
<h5 class="subtitle">Helfis</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 %}"{% if reg.is_withdrawn %} style="text-decoration: line-through;"{% endif %}>{{ reg.helper.name }}</a>
|
|
<a class="button is-link is-small" href="tel:{{ reg.helper.phone }}">📞</a>
|
|
</div>
|
|
<div class="buttons">
|
|
{% if reg.is_pending %}
|
|
<form action="{% url 'team:checkin' reg.pk %}" method="post">
|
|
{% csrf_token %}
|
|
<button class="button is-success is-small mr-2" type="submit">Als angekommen markieren</button>
|
|
</form>
|
|
<form action="{% url 'team:unregister' reg.pk %}" method="post">
|
|
{% csrf_token %}
|
|
<button class="button is-warning is-small mr-2" type="submit">Helfi abmelden</button>
|
|
</form>
|
|
<form action="{% url 'team:mark_as_failed' reg.pk %}" method="post">
|
|
{% csrf_token %}
|
|
<button class="button is-danger is-small" type="submit">Nicht angetreten</button>
|
|
</form>
|
|
{% elif reg.is_checked_in %}
|
|
<button class="button is-success is-small" style="pointer-events:none;">✓</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% if shift.fallbackassignment_set.count > 0 %}
|
|
<h5 class="subtitle">Teammitglieder</h5>
|
|
<div class="columns is-multiline">
|
|
{% for fallback in shift.fallbackassignment_set.all %}
|
|
<div class="column is-one-quarter">
|
|
<div class="box{% if fallback.was_full %} has-text-grey" style="text-decoration: line-through;{% endif %}">
|
|
{% if fallback.traded_to %}
|
|
{{ fallback.traded_to.name }}
|
|
{% else %}
|
|
{{ fallback.team_member.name }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% if not shift.event.calendar.restricted %}
|
|
<h5 class="subtitle">Helfi 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>
|
|
{% endif %}
|
|
{% endblock %}
|