65 lines
2.8 KiB
Twig
65 lines
2.8 KiB
Twig
{% extends 'admin/layout.html.twig' %}
|
|
|
|
{% block title %}Einstellungen - FAQ{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1 class="text-2xl font-bold pb-8">
|
|
FAQ
|
|
</h1>
|
|
<div class="data-table-wrapper">
|
|
<div class="data-table-wrapper__inner">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th class="w-2/5">
|
|
Frage
|
|
</th>
|
|
<th class="w-2/5">
|
|
Antwort
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody {{ stimulus_controller('sortable', { 'endpoint': path('app_admin_system_faq_sort') }) }}>
|
|
{% for faq in faqs %}
|
|
<tr {{ stimulus_target('sortable', 'item') }} data-item-id="{{ faq.id }}">
|
|
<td>
|
|
{{ faq.question }}
|
|
</td>
|
|
<td>
|
|
{{ faq.answer|u.truncate(64, '...') }}
|
|
</td>
|
|
<td>
|
|
<div class="flex items-center space-x-2 justify-end">
|
|
<button type="button"
|
|
class="text-red-500"
|
|
title="FAQ löschen"
|
|
hx-get="{{ path('app_admin_system_faq_delete', { 'id': faq.id }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
{{ icon('delete') }}
|
|
</button>
|
|
<a href="{{ path('app_admin_system_faq_edit', { 'id': faq.id }) }}">
|
|
{{ icon('edit') }}
|
|
</a>
|
|
<button type="button" class="cursor-move" {{ stimulus_target('sortable', 'handle') }}>
|
|
{{ icon('sort') }}
|
|
</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="3">
|
|
Keine Daten...
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<a href="{{ path('app_admin_system_faq_create') }}" class="btn">
|
|
Neu
|
|
</a>
|
|
{% endblock %} |