{% extends "admin/object_history.html" %}
{% load i18n %}


{% block content %}
	<div id="content-main">

		<p>{% blocktrans %}Choose a date from the list below to revert to a previous version of this object.{% endblocktrans %}</p>

		<div class="module">
			{% if action_list %}
				<table id="change-history">
					<thead>
						<tr>
							<th scope="col">{% trans 'Object' %}</th>
							<th scope="col">{% trans 'Date/time' %}</th>
							<th scope="col">{% trans 'Comment' %}</th>
							<th scope="col">{% trans 'Changed by' %}</th>
						</tr>
					</thead>
					<tbody>
						{% for action in action_list %}
							<tr>
								<td><a href="{{ action.revert_url }}">{{ action.history_object }}</a></td>
								<td>{{ action.history_date }}</td>
								<td>{{ action.get_history_type_display }}</td>
								<td><a href="{% url admin:auth_user_change action.history_user_id %}">{{ action.history_user }}</a></td>
							</tr>
						{% endfor %}
					</tbody>
				</table>
			{% else %}
				<p>{% trans "This object doesn't have a change history." %}</p>
			{% endif %}
		</div>
	</div>
{% endblock %}

