87 lines
3.5 KiB
Twig
87 lines
3.5 KiB
Twig
{% extends 'administrative/layout.html.twig' %}
|
|
|
|
{% block title %}Eigene Verfügbarkeiten der Teamer{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="flex items-start justify-between pb-4">
|
|
<h1 class="text-2xl font-bold">
|
|
Eigene Verfügbarkeiten der Teamer
|
|
</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_availability_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_availability_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 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, 'Teamer', 'teamer.lastName') }}
|
|
</th>
|
|
<th class="w-1/4">
|
|
{{ knp_pagination_sortable(pagination, 'Beschreibung', 'availability.description') }}
|
|
</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.owner.lastName }}, {{ availability.owner.firstName }}
|
|
</td>
|
|
<td>
|
|
{{ availability.description|default('-') }}
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="4">
|
|
Keine Daten...
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{{ knp_pagination_render(pagination) }}
|
|
</div>
|
|
</div>
|
|
<button type="button"
|
|
class="btn"
|
|
title="Zeitraum hinzufügen"
|
|
hx-get="{{ path('app_admin_system_availability_create') }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
Zeitraum hinzufügen
|
|
</button>
|
|
{% endblock %} |