{% extends parent_template|default:"conjunto/app_base.html" %} {% load i18n crispy_forms_tags %} {% comment %} Settings page — Tabler-style sectioned card (rail + pane) embedded in the regular app shell. ``parent_template`` may be set by a downstream project (context processor) to point at the project's own app shell — e.g. medux sets it to ``core/base.html`` so the medux navigation rail renders in the global sidebar. Defaults to ``conjunto/app_base.html``. HTMX swap target: ``#cj-settings-card`` — re-rendered as the ``settings-card`` partial whenever the user clicks a rail entry, so the active class on the rail stays in sync with the visible pane. {% endcomment %} {% block title %}{% trans "Settings" %}{% endblock %} {% block page_title %}{% trans "Settings" %}{% endblock %} {% partialdef settings-rail %} {% for group, sections in groups %}

{{ group.title }}

{% for s in sections %} {% if s.icon %}{% endif %} {{ s.title }} {% endfor %}
{% endfor %} {% endpartialdef %} {% comment %} settings-form is rendered stand-alone on form_invalid, so it must not rely on forloop being present. The
separator between consecutive subsections is emitted by settings-pane instead, before each non-first subsection. {% endcomment %} {% partialdef settings-form %}

{{ plugin.title }}

{% if plugin.description %}

{{ plugin.description }}

{% endif %}
{% csrf_token %} {{ form|crispy }}
{% endpartialdef %} {% partialdef settings-pane %} {% if active_section %}

{% if active_section.icon %}{% endif %} {{ active_section.title }}

{% for plugin, form in forms %} {% if not forloop.first %}
{% endif %} {% if plugin.template %} {% include plugin.template %} {% else %} {% partial settings-form %} {% endif %} {% empty %}

{% trans "No settings available in this section." %}

{% endfor %} {% else %}

{% trans "No settings available." %}

{% endif %} {% endpartialdef %} {% comment %} settings-card — the swap target. Click on a rail entry replaces the whole row.g-0 contents (rail + pane) so the active class is set by the server on the freshly-rendered rail. Pane self-refresh on the ``settings:changed`` event also targets this same node. {% endcomment %} {% partialdef settings-card %}
{% partial settings-pane %}
{% endpartialdef %} {% block content %}
{% partial settings-card %}
{% endblock %}