{% extends "base.html" %} {% block title %}Dokument bearbeiten: {{ instance.name }}{% endblock %} {% block content %}

{{ instance.name }}

Vorlage: {{ instance.template.name }} {% if instance.source_filename %} — Import: {{ instance.source_filename }}{% endif %}

{{ instance.get_status_display }} PDF
{% csrf_token %}
{% csrf_token %} {# ─ Dokumentname + Status ─────────────────────────────── #}
{# ─ Abschnitte mit Feldern ────────────────────────────── #} {% for section in structure.sections %}

{{ section.label }}

{% for field in section.fields %}
{% with form_key=section.key|add:"__"|add:field.key %} {% if field.type == "table" %} {# ─ Tabellen-Eingabe ──────────────────────── #}
{% for col in field.columns %} {% endfor %} {% for row in field.table_rows %} {% for cell in row %} {% endfor %} {% endfor %}
{{ col }}
{% elif field.type == "textarea" %}
{% elif field.type == "number" %} {% elif field.type == "date" %}
{% elif field.type == "boolean" %}
{% else %} {% endif %} {% endwith %}
{% endfor %}
{% empty %}

Die Vorlage enthält keine Abschnitte.

{% endfor %} {# ─ Aktionen ──────────────────────────────────────────── #}
{% endblock %} {% block extra_scripts %} {% endblock %}