CP_EHRENAMT/app/templates/planung_detail.html
2026-06-25 18:58:44 +02:00

56 lines
2.1 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends shell_base %}
{% from "_zeit.html" import zeitspanne %}
{% block title %}{{ zeitraum.name }} · CheckPoint Ehrenamt{% endblock %}
{% block content %}
<p><a class="cp-muted" href="{{ url_for('planung.liste') }}">← Planung</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>
<span class="cp-tag">
{{ "Veröffentlicht" if zeitraum.ist_veroeffentlicht else "In Planung" }}
</span>
<h2>Einsätze</h2>
<ul class="cp-list">
{% for e in einsaetze %}
<li class="cp-card">
<strong>{{ e.art }}{% if e.ort %} · {{ e.ort }}{% endif %}</strong>
<div class="cp-muted">
{{ e.datum.strftime('%a, %d.%m.%Y') }} ·
{{ zeitspanne(e) }}
</div>
<div class="cp-muted">{{ e.HAUPT_PLAETZE }} Haupt + {{ e.SPRINGER_PLAETZE }} Springer</div>
{% if not zeitraum.ist_veroeffentlicht %}
<div class="cp-actions">
<a class="cp-btn cp-btn--ghost"
href="{{ url_for('planung.einsatz_bearbeiten', einsatz_id=e.id) }}">
Bearbeiten
</a>
<form method="post"
action="{{ url_for('planung.einsatz_loeschen', einsatz_id=e.id) }}"
onsubmit="return confirm('Diesen Einsatz löschen?');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="cp-btn cp-btn--ghost">Löschen</button>
</form>
</div>
{% endif %}
</li>
{% else %}
<li class="cp-muted">Noch keine Einsätze.</li>
{% endfor %}
</ul>
{% if not zeitraum.ist_veroeffentlicht %}
<h2>Einsatz hinzufügen</h2>
<form method="post" action="{{ url_for('planung.detail', zeitraum_id=zeitraum.id) }}" class="cp-form">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
{% include "_einsatz_felder.html" with context %}
<button type="submit" class="cp-btn cp-btn--primary">Einsatz hinzufügen</button>
</form>
{% endif %}
{% endblock %}