{% extends "admin/change_form.html" %} {% load i18n admin_urls %} {% block breadcrumbs %} {% endblock %} {% block content %}

{% trans "Revert Changes" %}

{% for version in versions %} {% endfor %}
{% trans "Object" %} {% trans "Version" %} {% trans "Version ID" %} {% trans "User" %} {% trans "Date" %}
{{ opts.verbose_name }}: {{ instance }} {{ version.data.version }} {{ version.id }} {{ version.user }} {{ version.date }}

{% trans "Preview Reversion" %}

{% blocktrans %} You are about to revert the changes made to the object accross {{ count }} versions. Please carefully review the proposed changes below and then click the `Revert` button to proceed with the reversion. {% endblocktrans %}

{% blocktrans %}Please note that performing undeletions for soft-deleted objects will NOT do cascading undeletes to children of that object. {% endblocktrans %}

{% if errors %}

{% blocktrans %}Reversion was aborted because of these errors{% endblocktrans %}

{% for field, messages in errors.items %} {% for message in messages %} {% if field == "non_field_errors" %}

{{ message }}

{% else %}

{{ field }}: {{ message }}

{% endif %} {% endfor %} {% endfor %} {% endif %} {% if changes %}
{% csrf_token %} {% for version in versions %} {% endfor %} {% for field, diffs in changes %} {% endfor %}
{% trans "Field" %} {% trans "Revert to" %}
{{ field }} {% for version_id, diff in diffs.items %} {% endfor %}
Version {{ diff.version.previous.data.version }} {% if diff.old == "" %}-{% else %}{{ diff.old }}{% endif %}
{% trans "Do not revert" %}
{% endif %} {% endblock %}