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

{% load admin_urls i18n %}
{% load url from simple_history_compat %}

{% block breadcrumbs %}
    <div class="px-4 lg:px-12">
        <div class="container mb-6 mx-auto -my-3 lg:mb-12">
            <ul class="flex">
                {% 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 %}

                {% include 'unfold/helpers/breadcrumb_item.html' with link=changelist_url name=opts.verbose_name_plural|capfirst %}

                {% include 'unfold/helpers/breadcrumb_item.html' with link=change_url name=original|truncatewords:'18' %}

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

                {% if revert_disabled %}
                    {% trans "View" as name %}
                    {% include 'unfold/helpers/breadcrumb_item.html' with link="" name=name %}
                {% else %}
                    {% trans "Revert" as name %}
                    {% include 'unfold/helpers/breadcrumb_item.html' with link="" name=name %}
                {% endif %}
            </ul>
        </div>
    </div>
{% endblock %}

{% block submit_buttons_top %}
    {% include "simple_history/submit_line.html" %}
{% endblock %}

{% block submit_buttons_bottom %}
    {% include "simple_history/submit_line.html" %}
{% endblock %}

{% block form_top %}
    <p class="px-3 py-3 rounded-md text-sm last:mb-8 er-amber-600/10 bg-blue-50 mb-8 text-blue-500 dark:bg-blue-500/20 dark:border-blue-500/10">
        {% if not revert_disabled %}
            {% blocktrans %}Press the 'Revert' button below to revert to this version of the object.{% endblocktrans %}
        {% endif %}

        {% if change_history %}
            {% blocktrans %}Press the 'Change History' button below to edit the history.{% endblocktrans %}
        {% endif %}
    </p>
{% endblock %}
