{% extends "admin/base_site.html" %}
{% load i18n admin_urls %}

{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} revert-confirmation{% endblock %}

{% block breadcrumbs %}
    <div class="breadcrumbs">
        <a href="{% url 'admin:index' %}">{% trans "Home" %}</a> &rsaquo;
        <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> &rsaquo;
        <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst|escape }}</a> &rsaquo;
        <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a> &rsaquo;
        <a href="../">{% trans "History" %}</a> &rsaquo;
        {% blocktrans with opts.verbose_name as verbose_name %}Revert {{ verbose_name }}{% endblocktrans %}
    </div>
{% endblock %}

{% block content %}
    <p>
        {% blocktrans with escaped_object=object %}
            Are you sure you want to revert the {{ object_name }} "{{ escaped_object }}" to its version of {{ revision_date }}?
            All of the following related items will also be reverted:
        {% endblocktrans %}
    </p>

    <h2>{% trans "Objects" %}</h2>
    <ul>
        {% for ver in versions %}
            <li>{{ ver.content_type.name|capfirst }} #{{ ver.object_id_int }}: {{ ver.object_repr }}</li>
        {% endfor %}
    </ul>

    <form action="" method="post">
        {% csrf_token %}
        <div>
            <input type="hidden" name="post" value="yes" />
            <input type="submit" value="{% trans "Yes, I'm sure" %}" />
            <a href="#" onclick="window.history.back(); return false;" class="button cancel-link">{% trans "No, take me back" %}</a>
        </div>
    </form>
{% endblock %}
