{# core/ui/templates/partials/list_wrapper_inner.html Generisches Card-/Listen-Template für runnable CRUD-Module. Ersetzt das innerHTML von #{{ container_id }} via HTMX. Variablen: cfg – dict {item_id: item_dict} aus load_config/storage module – Modulname (str) container_id – ID des Listen-Containers (z.B. "tab-borg") loading_id – ID des Lade-Indikators content_template – Pfad zum modul-spezifischen Inhalt-Partial running – dict der laufenden Jobs {key: mode} light_mode – bool (optionaler schreibgeschützter Modus) has_toggle – bool (default True) Toggle-Schalter in Card-Header und Ctx-Menu has_create – bool (default True) Neu-Button im Page-Header has_edit – bool (default True) Bearbeiten-Button im Ctx-Menu has_delete – bool (default True) Löschen-Button im Ctx-Menu Tabellen-Struktur (immer gleich): col-name | [modul-spezifische Spalten] | col-last-run (130px) | col-status (60px) | col-actions (38px) #} {% import 'partials/components/ui_macros.html' as ui %} {% if running %}
{% endif %}
{# ── Page-Header: nur Settings + extra_page_actions (falls vorhanden) ────────── #} {% if module_has_settings(module) %} {% endif %} {# ── Karten-Ansicht ───────────────────────────────────────────────────────── #}
{% if cfg %} {% for name, item in cfg.items() %} {% set item_name = name %} {% set item_data = item %} {% set is_running = (module ~ ":" ~ item_name) in (running or {}) %} {% set run_mode = (running or {}).get(module ~ ":" ~ item_name, "") %}
{{ item_data.description or item_data.job or item_data.host or item_name }}
{% if has_toggle | default(True) %} {% set _display_name = item_data.description or item_data.job or item_data.host or item_name %} {{ ui.toggle_switch(module=module, item=item_name, container_id=container_id, loading_id=loading_id, enabled=item_data.enabled, description=_display_name) }} {% endif %}
{% set _card_content %}{% include content_template %}{% endset %} {% if _card_content | trim %}
{{ _card_content }}
{% endif %} {% set _status = 'running' if is_running else last_run_status(module, item_name) %} {% set _run_date = item_data.last_built if item_data.last_built is defined and item_data.last_built else item_data.last_run %} {% set _run_label = 'Letzter Build:' if item_data.last_built is defined and item_data.last_built else 'Letzter Lauf:' %} {% if _run_date or _status %}
{{ _run_label }} {{ _run_date or '—' }}
{% if _status %} {{ ui.status_inline(_status) }} {% endif %}
{% endif %}
{% endfor %} {% else %}
Keine Einträge vorhanden
Erstelle den ersten Eintrag mit „Neu"
{% endif %}
{# ── Tabellen-Ansicht ─────────────────────────────────────────────────────── #}
{# /x-data #}