40 lines
1.9 KiB
Twig
40 lines
1.9 KiB
Twig
{% extends 'layout.html.twig' %}
|
|
|
|
{% block title %}Meine Buchungen · ephub{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>Meine Buchungen</h1>
|
|
<p class="subline">Alles, was ab heute für dich reserviert ist.</p>
|
|
|
|
{% if bookings is empty %}
|
|
<p class="mt-8 text-sm text-gray-500">
|
|
Noch nichts gebucht. <a class="underline" href="{{ path('app_dashboard') }}">Zum Raumplan</a>.
|
|
</p>
|
|
{% else %}
|
|
<ul class="mt-8 divide-y divide-gray-200 border-y border-gray-200">
|
|
{% for booking in bookings %}
|
|
<li class="flex items-center justify-between gap-4 py-3">
|
|
<div>
|
|
<div class="font-semibold">
|
|
{{ booking.date|format_datetime(pattern: 'EEEE, d. MMMM y') }}
|
|
</div>
|
|
<div class="text-sm text-gray-500">
|
|
{{ booking.resource.type.label }} · {{ booking.resource.label }}
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<a class="text-sm underline"
|
|
href="{{ path('app_dashboard', { tag: booking.date|date('Y-m-d') }) }}">Im Plan</a>
|
|
{# Ordinary form post: this page has no board fragments to swap, so it
|
|
reloads afterwards rather than pretending to be htmx. #}
|
|
<form method="post" action="{{ path('app_booking_release', { id: booking.id }) }}">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('release-' ~ booking.id) }}">
|
|
<button type="submit" class="button button--small button--neutral">Freigeben</button>
|
|
</form>
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endblock %}
|