{% load foundation %} {% load humanize %}

#### {% trans "History" %}

{% if obj.history.all %}

Version | Timestamp | ID
{% for version in obj.history.all|slice:":10" %}
{% if request.user.is_staff %} {% endif %} Saved {{ version.history_date|naturaltime }} {% if request.user == version.history_user %} by me {% elif version.history_user %} by {{ version.history_user }} {% else %} by administrator {% endif %} {% if request.user.is_staff %} {% endif %} | {{ version.history_date }} | {{ version.history_id }}
{% endfor %} {% with rest=obj.history.count|add:"-10" %} {% if rest > 0 %}
{% if request.user.is_staff %} {{ rest }} more version{{ rest|pluralize }} {% else %} {{ rest }} more version{{ rest|pluralize }} {% endif %}
{% endif %} {% endwith %}

{% if not request.user.is_staff %}

If you need to revert to a previous version, please ask someone with Staff access or contact tech support.

{% endif %} {% endif %}