{% extends "allianceauth/base.html" %}
{% load staticfiles %}
{% load i18n %}

{% block page_title %}{{ group }} {% trans "Audit Log" %}{% endblock page_title %}
{% block extra_css %}{% endblock extra_css %}

{% block content %}
    <div class="col-lg-12">
        <br>
        {% include 'groupmanagement/menu.html' %}
        <div>
            {% if entries %}
            <h3>{{ group }} Audit Log</h3>
            <table class="table">
                <tr>
                    <th class="text-center">{% trans "Requestor" %}</th>
                    <th class="text-center">{% trans "Main Character" %}</th>
                    <th class="text-center">{% trans "Group" %}</th>
                    <th class="text-center">{% trans "Type" %}</th>
                    <th class="text-center">{% trans "Action" %}</th>
                    <th class="text-center">{% trans "Actor" %}</th>
                </tr>
                {% for entry in entries %}
                    <tr>
                        <td class="text-center">{{ entry.requestor }}</td>
                        <td class="text-center">{{ entry.req_char }}</td>
                        <td class="text-center">{{ entry.group }}</td>
                        <td class="text-center">{{ entry.type_to_str }}</td>
                        <td class="text-center">{{ entry.action_to_str }}</td>
                        <td class="text-center">{{ entry.request_actor }}</td>
                    </tr>
                {% endfor %}
            </table>
            {% else %}
                <div class="alert alert-warning text-center">{% trans "No entries found." %}</div>
            {% endif %}
        </div>
    </div>
{% endblock content %}
