{% extends "base.html" %} {% from "macros.html" import icon, detail_field_row %} {% block title %}{{ title }}{% endblock %} {% block content %}
{# Field groups #} {% for group in field_groups %}
{% if group.label %}

{{ group.label }}

{% endif %}
{% for pair in group.fields %} {% set model_field = pair.m %} {# SECURITY: Skip password fields - never show passwords #} {% if not (model_field and model_field.is_password) %} {{ detail_field_row(pair.f, pair.m, item) }} {% endif %} {% endfor %}
{% endfor %} {# Permission matrix (read-only for Role) #} {% if permission_matrix %}

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

{% if permission_matrix.wildcard %}
{{ icon('shield', 16) }} {{ t('Superuser') }} — {{ t('Full access to all resources. Bypasses matrix below.') }}
{% endif %}
{% for v in permission_matrix.verbs %}{% endfor %} {% for row in permission_matrix.rows %} {% for cell in row.cells %} {% endfor %} {% endfor %}
{{ t('Model') }}{{ t(v) }}
{{ row.label }} {% if cell.checked %} {{ icon('check', 14) }} {% else %} {% endif %}
{% endif %} {# M2M Relations #} {% for m2m in m2m_fields %}

{{ m2m.label }}

{% if m2m.current %}
{% for opt in m2m.current %} {{ opt.label }} {% endfor %}
{% else %}

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

{% endif %}
{% endfor %} {# Inline relations #} {% for inline in inlines %}

{{ inline.label }}

{% 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('search', 16) }} {% endif %}
{% else %}

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

{% endif %}
{% endfor %} {# Action buttons #}
{% if can_edit %} {{ icon('edit', 14) }} {{ t('Edit') }} {% endif %} {% if can_add and user_can_add %} {{ icon('copy', 14) }} {{ t('Clone') }} {% endif %} {{ icon('arrow-left', 14) }} {{ t('Back to list') }}
{% if item and item.id and can_delete %}
{{ request.csrf_input() }}
{% endif %}
{% endblock %}