{% extends "admin_base.html" %}
{% block title %}{% if admin_delete_title %}{{ admin_delete_title }}{% endif %} — {{ resource.title | default(value="Élément") }}{% endblock %}
{% block breadcrumb %}
{% if parent_key %}
<span class="admin-topbar__sep">/</span>
<a href="{{ parent_base }}/{{ parent_id }}/detail">{{ parent_title }}</a>
{% endif %}
<span class="admin-topbar__sep">/</span>
<a href="{{ resource_base }}/list">{{ resource.title | default(value="Éléments") }}</a>
<span class="admin-topbar__sep">/</span>
<span>{% if admin_delete_breadcrumb %}{{ admin_delete_breadcrumb }}{% endif %}</span>
{% endblock %}
{% block content %}
{% block delete_header %}
<div class="admin-page__header">
<h1>{% if admin_delete_heading %}{{ admin_delete_heading }}{% endif %}</h1>
</div>
{% endblock %}
{# Aucun garde de permission ici : MemberAction::Delete.authorize refuse l'accès
et redirige avant tout rendu, en tenant compte de can_delete_own sur un
enregistrement possédé — ce que le calcul Tera supprimé ici ne faisait pas.
Tera 2 interdit par ailleurs de placer un bloc dans une condition. #}
<div class="admin-card">
<div class="admin-card__body">
{% block delete_warning %}
<div class="admin-warning">
<p>
<strong>{% if admin_delete_warning_title %}{{ admin_delete_warning_title }}{% endif %}</strong>
{% if admin_delete_warning_desc %}{{ admin_delete_warning_desc }}{% endif %}
<strong>#{{ object_id }}</strong>
{% if admin_delete_warning_of %}{{ admin_delete_warning_of }}{% endif %}
<strong>{{ resource.title | default(value=resource_key) }}</strong>.
</p>
<p>{% if admin_delete_warning_irreversible %}{{ admin_delete_warning_irreversible }}{% endif %}</p>
</div>
{% endblock %}
{% block delete_actions %}
<div class="admin-form__actions">
<a href="{{ resource_base }}/{{ object_id }}/detail" class="btn btn-secondary">{% if admin_delete_btn_cancel %}{{ admin_delete_btn_cancel }}{% endif %}</a>
<form method="POST" action="{{ resource_base }}/{{ object_id }}/delete" class="admin-form--inline">
{% csrf %}
<button type="submit" class="btn btn-danger">{% if admin_delete_btn_confirm %}{{ admin_delete_btn_confirm }}{% endif %}</button>
</form>
</div>
{% endblock %}
</div>
</div>
{% endblock %}