Feat: Add log viewer for admins

This commit is contained in:
Björn Fromme
2023-10-21 17:33:49 +02:00
parent 847af5341c
commit 2385bccb91
6 changed files with 253 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Logs{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Logs
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'Datum', 'log.timestamp') }}
</th>
<th>
Benutzer
</th>
<th>
Meldung
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for entry in entries %}
<tr>
<td>
<span class="whitespace-nowrap">{{ entry.timestamp|date('d.m.Y H:i') }}</span>
</td>
<td>
{{ entry.user }}
</td>
<td>
<span class="whitespace-nowrap">{{ entry.message }}</span>
</td>
<td>
{{ entry.context }}
</td>
</tr>
{% else %}
<tr>
<td colspan="4">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
{% endblock %}