{% extends "base.html" %} {% from "macros.html" import icon, btn, badge, field_row %} {% block title %}{{ title }}{% endblock %} {% block content %}
{{ request.csrf_input() }}
{% if errors_global %}
{{ icon('alert-triangle', 18) }} {{ errors_global }}
{% endif %} {# Field groups (Airy) #} {% for group in field_groups %}
{% if group.label %}

{{ group.label }}

{% endif %}
{% for pair in group.fields %} {{ field_row(pair.f, pair.m, item) }} {% endfor %}
{% endfor %} {# Permission matrix #} {% if permission_matrix %}

{{ icon('shield', 18) }} {{ t('Permissions') }}

{% for v in permission_matrix.verbs %}{% endfor %} {% for row in permission_matrix.rows %} {% for cell in row.cells %} {% endfor %} {% endfor %}
{{ t('Model') }}{{ t(v) }}{{ t('All') }}
{{ row.label }}
{% endif %} {# M2M #} {% if m2m_fields %} {% for m in m2m_fields %}

{{ m.label }}

{% if m.name == 'roles' %} {{ icon('edit', 12) }} {{ t('Manage Roles') }} {% endif %}
{% if m.options %}
{% for opt in m.options %} {% endfor %}
{% else %}
{{ t('No available options to assign') }}
{% endif %}
{% endfor %} {% endif %}
{# Form footer #}
{% if can_add %} {% endif %}
{% if item and item.id and can_delete %} {% endif %}
{# Inlines (Airy) #} {% if inlines %}
{% for inline in inlines %}
{{ inline.label }} {% if inline.target_slug %} {{ icon('plus', 14) }} {{ t('Add') }} {% endif %}
{% if inline.rows %}
{% for col in inline.columns %}{% endfor %} {% for row in inline.rows %} {% for col in inline.columns %}{% endfor %} {% endfor %}
{{ col }}
{{ row[col] }} {% if inline.target_slug %} {{ icon('edit', 16) }} {% endif %}
{% else %}

{{ t('No related records') }}

{% endif %}
{% endfor %}
{% endif %} {% endblock %}