Files
myep-team/templates/administrative/system/destination/index.html.twig
T

109 lines
4.8 KiB
Twig

{% extends 'administrative/layout.html.twig' %}
{% block title %}Reisen{% endblock %}
{% block content %}
<div class="flex items-start justify-between pb-4">
<h1 class="text-2xl font-bold">
Manuell angelegte Reisen
</h1>
<div class="flex flex-col items-end space-y-2 md:flex-row md:items-center md:space-x-2 md:space-y-0">
<button type="button"
class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}"
title="Filter"
hx-get="{{ path('app_common_destination_filter', { 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('filter', 'w-4 h-4 shrink-0') }}
{% if filterDto.active %}
<span class="whitespace-nowrap">{{ filterDto.activeFiltersCount }} Filter aktiv</span>
{% else %}
<span>Filter</span>
{% endif %}
</button>
{% if filterDto.active %}
<a href="{{ path('app_common_destination_filter_reset', { 'r': return_url() }) }}" class="btn btn--small btn--secondary">
Reset
</a>
{% endif %}
</div>
</div>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'Produkt', 'destination.product') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Vertragspartner', 'destination.hotel') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Zeitraum von', 'destination.dateFrom') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Zeitraum bis', 'destination.dateTo') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for destination in pagination %}
<tr>
<td>
{{ destination.product }}
</td>
<td>
{{ destination.hotel }}{% if destination.hotelCode is not null %} ({{ destination.hotelCode }}){% endif %}
</td>
<td>
{{ destination.dateFrom | date('d.m.Y') }}
</td>
<td>
{{ destination.dateTo | date('d.m.Y') }}
</td>
<td>
<twig:DropDown>
<button type="button"
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_system_destination_delete', { 'id': destination.id }) }}"
hx-target="body"
hx-swap="beforeend">
löschen
</button>
<a href="{{ path('app_administrative_system_destination_duplicate', { 'id': destination.id }) }}"
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
duplizieren
</a>
<a href="{{ path('app_administrative_system_destination_edit', { 'id': destination.id }) }}"
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
bearbeiten
</a>
</twig:DropDown>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
<a href="{{ path('app_administrative_system_destination_create') }}" class="btn">
Neu
</a>
{% endblock %}