Files
myep-team/templates/admin/system/availability/index.html.twig
T

74 lines
3.1 KiB
Twig

{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Verfügbarkeiten/Zeiträume{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Verfügbarkeiten/Zeiträume
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th class="w-1/4">
{{ knp_pagination_sortable(pagination, 'Datum von', 'availability.dateFrom') }}
</th>
<th class="w-1/4">
{{ knp_pagination_sortable(pagination, 'Datum bis', 'availability.dateTo') }}
</th>
<th class="w-1/4">
{{ knp_pagination_sortable(pagination, 'Beschreibung', 'availability.description') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for availability in pagination %}
<tr>
<td>
{{ availability.dateFrom|date('d.m.Y') }}
</td>
<td>
{{ availability.dateTo|date('d.m.Y') }}
</td>
<td>
{{ availability.description|default('-') }}
</td>
<td>
<div class="flex items-center space-x-2 justify-end">
<button type="button"
class="text-red-500"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du den Zeitraum wirklich löschen?',
'target-url': path('app_admin_system_availability_delete', { 'id': availability.id })
}) }}>
{{ icon('delete') }}
</button>
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
<button type="button"
class="btn"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Zeitraum hinzufügen',
'url': path('app_admin_system_availability_create')
}) }}>
Zeitraum hinzufügen
</button>
{% endblock %}