{# core/ui/templates/partials/list_wrapper_inner.html Generisches Listen-Template für runnable CRUD-Module. Status-Polling via HTMX OOB-Swaps (partials/status_oob.html). Variablen: cfg – dict {item_id: item_dict} aus load_config/storage module – Modulname (str) container_id – ID des Listen-Containers (z.B. "mod-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) Deklarativ (wenn module_obj(module).ui_content gesetzt): Spalten-Header und -Zellen werden aus ui_content.columns gerendert statt aus list_header.html / list_row.html includes. #} {% import 'partials/components/ui_macros.html' as ui %} {# ── Deklarative Spalten aus ui_content oder _col_obj (ContentColumns-Sub-Tabelle) ── #} {# _col_obj wird von content_columns.html via {% with %} gesetzt #} {%- if _col_obj is defined and _col_obj -%} {%- set _ui_content = _col_obj -%} {%- else -%} {%- set _mod_obj = (module_obj(module) if module_obj is defined else none) -%} {%- set _ui_content = _mod_obj.ui_content if _mod_obj else none -%} {%- endif -%} {%- set _ui_cols = _ui_content.columns if (_ui_content and _ui_content.type == 'table') else [] -%} {%- set _item_url_prefix = (_col_obj.item_url_prefix if (_col_obj is defined and _col_obj) else '') -%} {# Überschreibe has_run_buttons / has_edit / has_delete aus ui_content wenn gesetzt #} {%- if _ui_content -%} {%- set has_run_buttons = _ui_content.has_run_buttons -%} {%- set has_status = _ui_content.has_status -%} {%- set has_edit = _ui_content.has_edit -%} {%- set has_delete = _ui_content.has_delete -%} {%- set has_toggle = _ui_content.has_toggle -%} {%- endif -%} {% if running %}
{% endif %} {# ── Tabellen-Ansicht ─────────────────────────────────────────────────────── #}| Name | {% if _ui_cols %} {% for col in _ui_cols %}{{ ui.col_header(col) }}{% endfor %} {% else %} {% include module + '/partials/list_header.html' ignore missing %} {% endif %} {% if has_run_buttons | default(True) %}Letzter Lauf | {% endif %} {% if has_status | default(True) %}Status | {% endif %}
|
|---|---|---|---|
| {{ item_data.description or item_data.job or item_data.host or item_name }} | {% if _ui_cols %} {% for col in _ui_cols %}{{ ui.col_cell(col, item_name, item_data) }}{% endfor %} {% else %} {% include module + '/partials/list_row.html' ignore missing %} {% endif %} {% if has_run_buttons | default(True) %}{{ item_data.last_run or '—' }} | {% endif %} {% if has_status | default(True) %} {% set _status = 'running' if is_running else (last_run_status(module, item_name) or item_data.last_status) %}{{ ui.status_inline(_status) }} | {% endif %}
|