56 lines
1.8 KiB
HTML
56 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="container mt-4">
|
|
<h2>{{ _('Audit Logs') }}</h2>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ _('Timestamp') }}</th>
|
|
<th>{{ _('User') }}</th>
|
|
<th>{{ _('Action') }}</th>
|
|
<th>{{ _('Details') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for log in logs.items %}
|
|
<tr>
|
|
<td>{{ log.timestamp|strftime('%d.%m.%Y %H:%M') }}</td>
|
|
<td>{{ log.user.username if log.user else 'System' }}</td>
|
|
<td>{{ log.action }}</td>
|
|
<td>{{ log.details|default('', true) }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{% if logs.pages > 1 %}
|
|
<nav aria-label="Page navigation">
|
|
<ul class="pagination">
|
|
{% if logs.has_prev %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="{{ url_for('admin_audit_logs', page=logs.prev_num) }}">{{ _('Previous') }}</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% for page_num in logs.iter_pages() %}
|
|
<li class="page-item {% if page_num == logs.page %}active{% endif %}">
|
|
<a class="page-link" href="{{ url_for('admin_audit_logs', page=page_num) }}">{{ page_num }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
|
|
{% if logs.has_next %}
|
|
<li class="page-item">
|
|
<a class="page-link" href="{{ url_for('admin_audit_logs', page=logs.next_num) }}">{{ _('Next') }}</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|
|
|