{% extends "admin_base" %} {% block title %}{% if admin_detail_title %}{{ admin_detail_title }}{% endif %} — {{ resource.title | default(value=resource_key) }} #{{ entry.id }}{% endblock %} {% block breadcrumb %} / {{ resource.title | default(value=resource_key) }} / {% if admin_detail_breadcrumb %}{{ admin_detail_breadcrumb }}{% endif %} #{{ entry.id }} {% endblock %} {% block content %} {% block detail_header %}

{% if admin_detail_title %}{{ admin_detail_title }}{% endif %} — {{ resource.title | default(value=resource_key) }}

{% if admin_detail_entry_label %}{{ admin_detail_entry_label }}{% endif %} #{{ entry.id }}

{% block detail_actions %}
{% if admin_detail_btn_list %}{{ admin_detail_btn_list }}{% endif %} {% set_global can_modify = false %} {% if current_user %} {% if current_user.is_superuser %} {% set_global can_modify = true %} {% else %} {% for groupe in current_user.groupes %} {% for perm in groupe.permissions %} {% if perm.resource_key == resource.key and perm.can_update %} {% set_global can_modify = true %} {% endif %} {% endfor %} {% endfor %} {% endif %} {% endif %} {% if current_user and can_modify %} {% set has_password = false %} {% for key, value in entry %}{% if key == "password" or key == "password_hash" %}{% set_global has_password = true %}{% endif %}{% endfor %} {% if has_password %}
{% csrf %}
{% endif %} {% if admin_detail_btn_edit %}{{ admin_detail_btn_edit }}{% endif %}
{% csrf %}
{% if admin_detail_btn_edit %}{{ admin_detail_btn_edit }}{% endif %} {% if has_password %}
{% csrf %}
{% endif %}
{% csrf %}
{% endif %}
{% endblock %}
{% endblock %} {% block detail_table %}
{% for key, value in entry %} {% if key != "id" %} {% endif %} {% endfor %}
id #{{ entry.id }}
{{ key }} {% if key == "password" or key == "password_hash" %} •••••••• {% elif value == true %} {% if admin_list_bool_true %}{{ admin_list_bool_true }}{% endif %} {% elif value == false %} {% if admin_list_bool_false %}{{ admin_list_bool_false }}{% endif %} {% elif value %} {% if value is string %}{{ value | escape }}{% else %}{{ value }}{% endif %} {% else %} {% endif %}
{% endblock %} {% if m2m_fields is defined and m2m_fields %} {% for field in m2m_fields %}
{{ field.label }}
{% if field.selected | length > 0 %} {% for choice in field.choices %} {% if choice[0] in field.selected %} {{ choice[1] }} {% endif %} {% endfor %} {% else %} {% endif %}
{% endfor %} {% endif %} {% endblock %}