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


{% block breadcrumbs %}
<ul class="breadcrumb">
    <li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
        <span class="divider">&raquo;</span></li>
    <li><a href="{% url 'admin:app_list' app_label %}">{{ app_label|capfirst|escape }}</a>
        <span class="divider">&raquo;</span></li>
    <li><a href="{% url opts|admin_urlname:'changelist' %}">{{opts.verbose_name_plural|capfirst}}</a>
        <span class="divider">&raquo;</span></li>
    <li class="active">{% blocktrans with opts.verbose_name_plural|escape as name %}Recover deleted {{name}}{% endblocktrans %}</li>
</ul>
{% endblock %}


{% block content %}
<div id="content-main">
    <div class="alert alert-info">{% blocktrans %}Choose a date from the list below to recover a deleted version of an object.{% endblocktrans %}</div>
    <div class="module">
        {% if deleted %}
        <table id="change-history" class="table table-bordered table-condensed table-striped">
            <thead>
            <tr>
                <th scope="col">{% trans 'Date/time' %}</th>
                <th scope="col">{{opts.verbose_name|capfirst}}</th>
            </tr>
            </thead>
            <tbody>
            {% for deletion in deleted %}
            <tr>
                <th scope="row"><a href="{{deletion.pk}}/">{{deletion.revision.date_created}}</a></th>
                <td>{{deletion.object_repr}}</td>
            </tr>
            {% endfor %}
            </tbody>
        </table>
        {% else %}
        <div class="alert alert-warn">{% trans "There are no deleted objects to recover." %}</div>
        {% endif %}
    </div>
</div>
{% endblock %}
