{% extends "admin/base_site.html" %}
{% load i18n admin_urls static %}
{% block title %}{% translate "Revert Confirmation" %}{% endblock %}

{% block extrahead %}
    {{ block.super }}
    {{ media }}
    <link rel="stylesheet" href="{% static 'djangocms_versioning/css/versioning.css' %}">
    <script type="text/javascript" src="{% static 'admin/js/cancel.js' %}"></script>
{% endblock %}

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

{% block content %}
<p>
    {% if draft_version %}
    {% translate "Reverting to this version may cause loss of an existing draft version. Please select an option to continue" %}
    {% else %}
    {% translate "Are you sure you want to revert to the following version?" %}
    {% endif %}
</p>
<h3>{{ object_name }}</h3>
<h4>{% blocktrans %}Version number: {{ version_number }}{% endblocktrans %}</h4>
<form action="" method="POST">
    {% csrf_token %}
    {% if draft_version %}
    <input  class="button revert-button confirm-link js-versioning-keep-sideframe"
            type="submit"
            name="discard"
            value="{% translate 'Discard existing draft and Revert' %}">
    <input  class="button revert-button confirm-link js-versioning-keep-sideframe"
            name="archive"
            type="submit"
            value="{% translate 'Archive existing draft and Revert' %}">
    {% else %}
    <input  class="button revert-button confirm-link js-versioning-keep-sideframe"
            type="submit"
            name="revert"
            value="{% translate "Yes, I'm sure" %}">
    {% endif %}
    <a href="{{ back_url }}">
        <input type="button"
               class="button js-versioning-keep-sideframe"
               value="{% translate 'No, take me back' %}">
    </a>
</form>
{% endblock %}
