{% load logentries %}
{% load static %}
{% load i18n %}

<ul class="list-group list-group-flush">
    {% for log_group in logentries|group_logentries %}
        <li class="list-group-item">
            <p>
                <span class="pe-3">
                    <span class="far fa-calendar" aria-hidden="true"></span>
                    {{ log_group.0.datetime|date:"SHORT_DATETIME_FORMAT" }}
                </span>
                {% if log_group.0.user %}
                    {% if log_group.0.user.is_superuser %}
                        <span class="far fa-id-card fa-fw"
                              data-bs-toggle="tooltip"
                              title="{% trans "This change was performed by a an admin user." %}">
                        </span>
                    {% else %}
                        <span class="fas fa-user fa-fw"></span>
                    {% endif %}
                    {{ log_group.0.user }}
                {% endif %}
            </p>

            {% for log in log_group %}
                <p>
                    {% include "modellogging/logentry.html" with log=log %}
                </p>
            {% endfor %}
        </li>
    {% endfor %}
</ul>
