{% extends 'auth_layout.html' %}
{% block content %}

<div class="row">
    <div class="col">
        <h3><i class="ri-file-list-3-line"></i> System Log</h3>
    </div>
</div>
<div class="row">
    <div class="col">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th scope="col">Admin User</th>
                    <th scope="col">Date/Time</th>
                    <th scope="col">Action</th>
                </tr>
            </thead>
            <tbody>
                {% for log in context.logs %}
                <tr>
                    <td>{{ log.username }}</td>
                    <td>{{ log.date }}</td>
                    <td>
                        {% if log.action[:21] == 'Changed SMTP Password' %}
                            SMTP password was changed.
                        {% else %}
                            {{ log.action }}
                        {% endif %}
                    </td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>

{% endblock %}