47 lines
1.7 KiB
HTML
47 lines
1.7 KiB
HTML
{% extends shell_base %}
|
||
{% from "_zeit.html" import zeitspanne %}
|
||
|
||
{% block title %}{{ zeitraum.name }} · Dienstplan{% endblock %}
|
||
|
||
{% block content %}
|
||
<p><a class="cp-muted" href="{{ url_for('dienste.liste') }}">← Dienstplan</a></p>
|
||
|
||
<h1>{{ zeitraum.name }}</h1>
|
||
<div class="cp-muted">
|
||
{{ zeitraum.start_datum.strftime('%d.%m.%Y') }} – {{ zeitraum.end_datum.strftime('%d.%m.%Y') }}
|
||
</div>
|
||
|
||
{% if zeitraum.ist_veroeffentlicht %}
|
||
<p class="cp-tag">Veröffentlicht · Verfügbarkeit gesperrt</p>
|
||
{% else %}
|
||
<form method="post"
|
||
action="{{ url_for('dienste.veroeffentlichen', zeitraum_id=zeitraum.id) }}"
|
||
class="cp-actions"
|
||
onsubmit="return confirm('Zeitraum veröffentlichen? Danach ist die Verfügbarkeit gesperrt.');">
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||
<button type="submit" class="cp-btn cp-btn--primary">Veröffentlichen</button>
|
||
</form>
|
||
{% endif %}
|
||
|
||
<h2>Einsätze</h2>
|
||
<ul class="cp-list">
|
||
{% for e in zeitraum.einsaetze %}
|
||
{% set s = stand[e.id] %}
|
||
<li class="cp-card">
|
||
<a href="{{ url_for('dienste.einsatz', einsatz_id=e.id) }}">
|
||
<strong>{{ e.art }}{% if e.ort %} · {{ e.ort }}{% endif %}</strong>
|
||
</a>
|
||
<div class="cp-muted">
|
||
{{ e.datum.strftime('%a, %d.%m.%Y') }} ·
|
||
{{ zeitspanne(e) }}
|
||
</div>
|
||
<div class="cp-muted">
|
||
{{ s[0] }}/{{ e.HAUPT_PLAETZE }} Haupt · {{ s[1] }}/{{ e.SPRINGER_PLAETZE }} Springer
|
||
</div>
|
||
{% if e.unterbesetzt %}<span class="cp-tag cp-tag--urgent">Unterbesetzt</span>{% endif %}
|
||
</li>
|
||
{% else %}
|
||
<li class="cp-muted">Dieser Zeitraum hat noch keine Einsätze.</li>
|
||
{% endfor %}
|
||
</ul>
|
||
{% endblock %}
|