{% extends "conjunto/app_base.html" %} {% load i18n crispy_forms_tags %} {% block title %}{% trans "Settings" %}{% endblock %} {% comment %} Layout follows Tabler's settings page pattern (https://preview.tabler.io/settings.html): - Outer : .card > .row.g-0 - Rail : .col-12.col-md-3.border-end > .card-body h4.subheader (+ mt-4 on subsequent groups) .list-group.list-group-transparent > a.list-group-item.list-group-item-action.d-flex.align-items-center (add .active for the current section) - Pane : .col-12.col-md-9.d-flex.flex-column > .card-body h2.mb-4 (active section title) h3.card-title (first subsection) h3.card-title.mt-4 (subsequent subsections) p.card-subtitle (optional description) form with small primary Save button Consecutive subsections are separated by an
(emitted before each non-first subsection by the settings-pane partial). {% endcomment %} {% 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 also rendered stand-alone on form_invalid, so it must not rely on forloop being present. The
separator between consecutive subsections is emitted by the settings-pane partial 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 %} {% block content %}
{% partial settings-pane %}
{% endblock %}