106 lines
4.5 KiB
Twig
106 lines
4.5 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-tool', { 'border-brand bg-brand-light text-brand': 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-tool">
|
|
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:menu>
|
|
<button type="button"
|
|
class="menu-item-danger"
|
|
role="menuitem"
|
|
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="menu-item"
|
|
role="menuitem">
|
|
duplizieren
|
|
</a>
|
|
<a href="{{ path('app_administrative_system_destination_edit', { 'id': destination.id }) }}"
|
|
class="menu-item"
|
|
role="menuitem">
|
|
bearbeiten
|
|
</a>
|
|
</twig:menu>
|
|
</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-secondary">
|
|
Neu
|
|
</a>
|
|
{% endblock %} |