Feat: Add log viewer for admins
This commit is contained in:
@@ -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 %}
|
||||
Reference in New Issue
Block a user