{% extends "admin/object_history.html" %}
{% load url from future %}
{% load i18n admin_urls %}

{% block extrastyle %}{{ block.super }}
<style type="text/css">
    /* minimal style for the diffs */
    del, ins {
        color: #000;
        text-decoration: none;
    }
    del { background-color: #ffe6e6; }
    ins { background-color: #e6ffe6; }
    sup.follow { color: #5555ff; }
</style>
{% endblock %}

{% block breadcrumbs %}
    <ul class="breadcrumb">
			    <li><a href="{% url 'admin:index' %}"><i class="icon-home"></i></a> <span class="divider">/</span></li>
			    <li><a href="{% url 'admin:app_list' app_label %}">{{app_label|capfirst|escape}}</a> <span class="divider">/</span></li>
        <li><a href="{{changelist_url}}">{{opts.verbose_name_plural|capfirst}}</a><span class="divider">/</span></li>
        <li><a href="{{change_url}}">{{original|truncatewords:"18"}}</a>  <span class="divider">/</span></li>

        <li><a href="../">{% trans "History" %}</a><span class="divider">/</span></li>
        <li class="active">{% blocktrans with opts.verbose_name_plural|escape as name %}Compare {{name}}{% endblocktrans %}
        {{title}}</li>
    </ul>
{% endblock %}


{% block content %}
    <div id="content-main">
        
        <h1 class="help">
            {% blocktrans with date1=version1.revision.date_created|date:_("DATETIME_FORMAT") date2=version2.revision.date_created|date:_("DATETIME_FORMAT") %}
                Compare <strong>{{ date1 }}</strong> with <strong>{{ date2 }}</strong>:
            {% endblocktrans %}
        </h1>
        
        <h2>&lsaquo; <a href="{{history_url}}">{% trans "Go back to history list" %}</a></h2>
        
        {% for field_diff in compare_data %}
        <div class="inline-related">
            <h3 class="light-blue-degrade"><b>{{ field_diff.field.verbose_name }}{% if field_diff.is_related and not field_diff.follow %}<sup class="follow"> <i class="icon-certificate"></i></sub>{% endif %}</b></h3>
            <div class="field">
            {% if field_diff.field.help_text %}<p class="help">{{ field_diff.field.help_text }}</p>{% endif %}
            <div class="module">
                <p>{{ field_diff.diff }}</p>
            </div>
            </div>
        </div>
        {% empty %}
            <div class="module">
                <p><strong>There are no differences.</strong></p>
            </div>
        {% endfor %}
        
        <h4>{% trans "Edit comment:" %}</h4>
        <blockquote>{{ version2.revision.comment|default:"(there exist not comment)" }}</blockquote>
        
        {% if has_unfollowed_fields %}
        <h4 class="follow">{% trans "Note:" %}</h4>
        <p class="follow">
            Fields/entries marked with <sup class="follow"> <i class="icon-certificate"></i></sup> are not under reversion control.
            It may be that not all marked information are correct.
        </p>
        {% endif %}

        <h2>&lsaquo; <a href="{{history_url}}">{% trans "Go back to history list" %}</a></h2>
    </div>
{% endblock %}