55 lines
2.9 KiB
Twig
55 lines
2.9 KiB
Twig
{% extends 'admin/layout.html.twig' %}
|
|
|
|
{% block title %}Verfügbarkeit {{ teamer }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="grid lg:grid-cols-3 gap-y-8 lg:gap-y-0 lg:gap-x-8">
|
|
<div>
|
|
{{ knp_menu_render(knp_menu_get('admin_teamer')) }}
|
|
</div>
|
|
<div class="lg:col-span-2">
|
|
<h1 class="text-2xl font-bold pb-8">
|
|
Verfügbarkeit {{ teamer }}
|
|
</h1>
|
|
<div class="grid md:grid-cols-2 gap-8 pb-8">
|
|
{% for year, months in groupedAvailabilities %}
|
|
<div>
|
|
<h3 class="text-lg font-bold">
|
|
{{ year }}
|
|
</h3>
|
|
<div class="flex flex-col space-y-3">
|
|
{% for month, availabilities in months %}
|
|
<div>
|
|
<h4 class="font-bold">
|
|
{{ month }}
|
|
</h4>
|
|
{% for availability in availabilities %}
|
|
<div class="flex items-center space-x-2">
|
|
<span>{{ availability }}</span>
|
|
{% if is_granted('DELETE', availability) %}
|
|
<button type="button"
|
|
title="Zeitraum entfernen/löschen"
|
|
{{ 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_teamer_availability_delete', { 'teamer_uuid': teamer.uuid, 'availability_id': availability.id, 'r': return_url() })
|
|
}) }}>
|
|
{{ icon('delete', 'w-5 h-5') }}
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="md:col-span-2 text-sm">
|
|
{{ teamer.firstName }} hat bisher keine Verfügbarkeiten hinterlegt.
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |