{% extends "admin/change_form.html" %}
{% load i18n admin_urls %}

{% block content_title %}<h1>{{ original }}</h1>{% endblock %}

{% load i18n admin_urls %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
{% if history_model_opts %}
    &rsaquo; <a href="{% url 'admin:app_list' app_label=history_model_opts.app_label %}">{{ history_model_opts.app_config.verbose_name }}</a>
    &rsaquo; <a href="{% url history_model_opts|admin_urlname:'changelist' %}">{{ history_model_opts.verbose_name_plural|capfirst }}</a>
{% else %}
    &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
    &rsaquo; {% if has_change_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
{% endif %}
{% if history_object %}
    &rsaquo; <a href="{% url history_model_opts|admin_urlname:'change' history_object.pk|admin_urlquote %}">{{ history_object|truncatewords:"18" }}</a>
    &rsaquo; <a href="{% url history_model_opts|admin_urlname:'history' history_object.pk|admin_urlquote %}">{% trans 'History' %}</a>
{% else %}
{% endif %}
&rsaquo; {{ original }}
</div>
{% endblock %}

{% block object-tools %}{% endblock %}

{% block content %}
<div id="content-main">
    <div class="module">
        {% include 'simple_log/admin/changes_table.html' with object=original %}
    </div>
    {% regroup original.related_logs.all by content_type as related_list %}
    {% for related in related_list %}
        {% for log in related.list %}
            <h1>{{ log }}</h1>
            <div class="module">
                {% include 'simple_log/admin/changes_table.html' with object=log %}
            </div>
        {% endfor %}
    {% endfor %}
</div>
{% endblock %}
