{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block coltype %}container row{% endblock %}
{% block breadcrumbs %}{% endblock %}

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

</div>
{% endblock %}

{% block sidebar %}
    <div id="content-related" class="card pull-right">
        <div id="recent-actions-module" class="card-body">
            <h5 class="card-title">{% trans 'Recent actions' %}</h5>
            <h6 class="card-subtitle mb-2 text-muted">{% trans 'My actions' %}</h6>
                {% load log %}
                {% get_admin_log 10 as admin_log for_user user %}
                {% if not admin_log %}
                <p>{% trans 'None available' %}</p>
                {% else %}
                <ul class="list-group list-group-flush">
                {% for entry in admin_log %}
                <li class="list-group-item">
                    <i class="{% if entry.is_addition %}fa fa-plus{% endif %}{% if entry.is_change %}fa fa-pencil{% endif %}{% if entry.is_deletion %}fa fa-remove{% endif %}"></i>
                    {% if entry.is_deletion or not entry.get_admin_url %}
                        {{ entry.object_repr }}
                    {% else %}
                        <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
                    {% endif %}
                    <br/>
                    {% if entry.content_type %}
                        <em class="mini quiet text-muted">{% filter capfirst %}{{ entry.content_type }}{% endfilter %}</em>
                    {% else %}
                        <em class="mini quiet text-muted">{% trans 'Unknown content' %}</em>
                    {% endif %}
                </li>
                {% endfor %}
                </ul>
                {% endif %}
        </div>
    </div>
    {% endblock %}
