This commit is contained in:
Thomas Peterson 2025-12-08 15:44:56 +01:00
parent deca028334
commit ff9978d103

View File

@ -1,72 +1,91 @@
{% extends 'backend_base.html.twig' %}
{% extends 'backend_tailwind_base.html.twig' %}
{% block header %}
<div>
<h1 class="text-psc text-2xl font-medium flex flex-row gap-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-8">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z" />
</svg>
Logs
</h1>
</div>
{% endblock %}
{% block body %}
<div class="header">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<h3>
<i class="fa-fw fa fa-paper-plane"></i>
Logs <span>>
Liste </span>
</h3>
<div class="flex flex-col gap-6">
<div class="rounded-sm border bg-white px-7.5 py-6 shadow-lg dark:border-strokedark dark:bg-boxdark">
<div class="mb-6">
<h2 class="text-lg font-semibold text-gray-900">Einträge</h2>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 text-end">
</div>
</div>
</div>
<div class="body">
<div class="panel">
<div class="body">
<h2>Einträge</h2>
<div class="table-responsive">
<table class="table">
<thead class="thead-dark">
<div class="overflow-x-auto">
<table class="min-w-full text-sm">
<thead class="bg-slate-100 border-t border-stroke">
<tr>
<th>Id</th>
<th>Created</th>
<th>Shop</th>
<th>User</th>
<th>Module</th>
<th>Reference</th>
<th>Message</th>
<th>Data</th>
<th class="px-2 py-3 text-left font-medium text-gray-700">Id</th>
<th class="px-2 py-3 text-left font-medium text-gray-700">Created</th>
<th class="px-2 py-3 text-left font-medium text-gray-700">Shop</th>
<th class="px-2 py-3 text-left font-medium text-gray-700">User</th>
<th class="px-2 py-3 text-left font-medium text-gray-700">Module</th>
<th class="px-2 py-3 text-left font-medium text-gray-700">Reference</th>
<th class="px-2 py-3 text-left font-medium text-gray-700">Message</th>
<th class="px-2 py-3 text-left font-medium text-gray-700">Data</th>
</tr>
</thead>
<tbody>
{% for log in pagination %}
<tr {% if loop.index is odd %}class="color"{% endif %}>
<td>{{ log.id }}</td>
<td>{{ log.created|date('d.m.Y H:i:s') }}</td>
<td>{{ log.shopName }}</td>
<td>{{ log.contactEmail }}</td>
<td>{{ log.module }}</td>
<td>{{ log.referenceUuid }}</td>
<td>{{ log.message }}</td>
<td>{% for a, b in log.data %}
{{ a }}:
<tr class="border-t border-stroke hover:bg-gray-50">
<td class="px-2 py-3 font-medium">{{ log.id }}</td>
<td class="px-2 py-3 whitespace-nowrap">{{ log.created|date('d.m.Y H:i:s') }}</td>
<td class="px-2 py-3">{{ log.shopName }}</td>
<td class="px-2 py-3">
<a href="mailto:{{ log.contactEmail }}" class="text-psc-500 hover:underline">{{ log.contactEmail }}</a>
</td>
<td class="px-2 py-3">
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800">
{{ log.module }}
</span>
</td>
<td class="px-2 py-3">
<span class="text-xs font-mono text-gray-600">{{ log.referenceUuid }}</span>
</td>
<td class="px-2 py-3 max-w-xs">
<div class="text-sm text-gray-900">{{ log.message }}</div>
</td>
<td class="px-2 py-3 max-w-md">
{% if log.data %}
<div class="text-xs space-y-1">
{% for a, b in log.data %}
<div class="flex gap-1">
<span class="font-semibold text-gray-700">{{ a }}:</span>
<span class="text-gray-600">
{% if b is iterable %}
{% for i in b %}
{% if i is iterable %}
{{ i|join(',') }}
{{ i|join(', ') }}
{% else %}
{{ i }}
{% endif %}
{% if not loop.last %}, {% endif %}
{% endfor %}
{% else %}
{{ b }}
{% endif %}<br/>
{% endfor %}</td>
{% endif %}
</span>
</div>
{% endfor %}
</div>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="navigation">
{{ knp_pagination_render(pagination) }}
</div>
</div>
</div>
</div>
<div class="mt-4">
{{ knp_pagination_render(pagination, 'tailwind_pagination.html.twig') }}
</div>
</div>
</div>
{% endblock %}