{% extends 'wagtailadmin/reports/base_report.html' %}
{% load i18n wagtailadmin_tags %}

{% block results %}
    {% if object_list %}
        <table class="listing">
            <thead>
                <tr>
                    <th class="title">
                        {% trans 'Name' %}
                    </th>
                    <th>
                        {% trans 'Type' %}
                    </th>
                    <th>
                        {% trans 'Action' %}
                    </th>
                    <th>
                        {% trans 'User' %}
                    </th>
                    <th class="updated">
                        {% trans 'Date / Time' %}
                    </th>
                </tr>
            </thead>
            <tbody>
                {% for entry in object_list %}
                    <tr>
                        <td class="title">
                            {% if entry.edit_url %}
                                <a href="{{ entry.edit_url }}" title="{% trans 'Edit this item' %}">{{ entry.label }}</a>
                            {% else %}
                                {{ entry.label }}
                            {% endif %}
                        </td>
                        <td>
                            {{ entry.content_type|format_content_type }}
                        </td>
                        <td>
                            {{ entry.message }}
                        </td>
                        <td>
                            {% include "wagtailadmin/shared/user_avatar.html" with user=entry.user username=entry.user_display_name %}
                        </td>
                        <td class="updated">{% human_readable_date entry.timestamp %}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p>{% trans "No log entries found." %}</p>
    {% endif %}
{% endblock %}

{% block no_results %}
    <p>{% trans "No log entries found." %}</p>
{% endblock %}
