{% extends "admin/change_form.html" %}

{% load admin_urls i18n %}

{% block extrahead %}{{ block.super }}
    {{ form.media }}
{% endblock %}

{% block breadcrumbs %}{% if not is_popup %}
    <div class="px-4">
        <div class="container mb-6 mx-auto -my-3 lg:mb-12">
            <ul class="flex flex-wrap">
                {% url 'admin:index' as link %}
                {% trans 'Home' as name %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}

                {% url 'admin:app_list' app_label=opts.app_label as link %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.app_config.verbose_name %}

                {% url opts|admin_urlname:'changelist' as link %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.verbose_name_plural|capfirst %}

                {% url opts|admin_urlname:'change' object.pk|admin_urlquote as link %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=original|truncatewords:'18' %}

                {% trans 'Object permissions' as name %}
                {% include 'unfold/helpers/breadcrumb_item.html' with link="../../" name=name %}

                {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=user_obj|truncatewords:"18" %}
            </ul>
        </div>
    </div>
{% endif %}{% endblock %}

{% block content %}
    <div class="border border-base-200 overflow-hidden rounded-default p-3 shadow-xs dark:border-base-800">
        <form method="post">
            {% csrf_token %}

            {% trans "Object" as title %}
            {% include "unfold/helpers/field_readonly.html" with title=title value=object %}

            {% trans "User" as title %}
            {% include "unfold/helpers/field_readonly.html" with title=title value=user_obj %}

            {% include "unfold/helpers/field.html" with field=form.permissions %}

            <div class="bg-base-50 border-t border-base-200 flex flex-row -m-3 p-3 dark:bg-white/[.02] dark:border-base-800">
                <div class="ml-auto">
                    {% trans "Save" as title %}
                    {% include "unfold/helpers/submit.html" with title=title %}
                </div>
            </div>
        </form>
    </div>
{% endblock %}

{% block footer %}{% endblock%}
