style: restyle the questionnaire views

This commit is contained in:
fromme committed 2026-11-12 11:36:18 +01:00
1 parent 6b16c88a5b
commit 3c19401d8b
15 files changed
+93 -99

No files matched your search

@@ -4,22 +4,26 @@
{% block content %}
{% set context = response.context %}
<h1 class="text-2xl font-bold pb-4">
<a href="{{ returnUrl }}" class="inline-flex items-center gap-x-1 pb-4 text-sm font-bold text-brand hover:text-brand-dark">
{{ icon('arrow-left', 'w-4 h-4 shrink-0') }}
<span>zurück</span>
</a>
<h1 class="text-2xl font-bold pb-1">
{{ definition.title }}{% if response.leg %}: {{ response.leg.label }}{% endif %}
</h1>
<p class="pb-8 text-gray-700">
<p class="pb-6 text-muted">
{{ response.destination ? context.destinationProduct|default('-') : context.teamerName|default('-') }}, abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr
</p>
<div class="grid lg:grid-cols-3 gap-8 items-start">
<div class="grid lg:grid-cols-3 gap-6 items-start">
<div class="lg:col-span-2">
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': context } %}
</div>
<div>
<aside class="card p-5">
{# the snapshot taken on submit, so it shows the placement or travel as it was answered for #}
<h2 class="text-lg font-bold pb-4">
<h2 class="section-title pb-3">
{{ response.destination ? 'Reise' : 'Einsatz' }}
</h2>
<dl class="divide-y divide-gray-100 text-sm leading-6">
<dl class="grid grid-cols-[minmax(0,8rem)_minmax(0,1fr)] gap-x-4 gap-y-2">
{% for label, value in response.destination ? {
'Destination': context.destinationProduct|default(null),
'Haus': context.hotel|default(null) ? context.hotel ~ ' (' ~ context.hotelCode ~ ')' : null,
@@ -35,31 +39,24 @@
'Busbegleitung ab': context.escortPickup|default(null) ? context.escortPickup.city ~ ', ' ~ context.escortPickup.street ~ (context.escortPickup.time ? ', ' ~ context.escortPickup.time ~ ' Uhr' : '') : null,
'Abfahrt Hinfahrt': context.escortPickupDate|default(null) ? context.escortPickupDate|date('d.m.Y') : null,
} %}
<div class="py-3 first:pt-0 grid grid-cols-3 gap-4">
<dt class="font-bold text-gray-900">{{ label }}</dt>
<dd class="col-span-2 text-gray-700">{{ (value ?? '-') }}</dd>
</div>
<dt class="text-muted">{{ label }}</dt>
<dd class="break-words">{{ (value ?? '-') }}</dd>
{% endfor %}
</dl>
{% if siblings is not empty %}
<h2 class="text-lg font-bold pt-8 pb-2">
<h2 class="section-title mt-5 border-t border-line pt-4 pb-2">
Zum selben Einsatz
</h2>
<ul>
<ul class="flex flex-col gap-y-1">
{% for sibling in siblings %}
<li>
<a href="{{ path('app_administrative_questionnaire_detail', { 'uuid': sibling.response.uuid, 'r': app.request.query.get('r') }) }}" class="underline">
<a href="{{ path('app_administrative_questionnaire_detail', { 'uuid': sibling.response.uuid, 'r': app.request.query.get('r') }) }}" class="font-bold text-brand underline underline-offset-2 hover:text-brand-dark">
{{ sibling.title }}{% if sibling.response.leg %}: {{ sibling.response.leg.label }}{% endif %}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
<div class="pt-8">
<a href="{{ returnUrl }}" class="underline">
zurück
</a>
</div>
</div>
</aside>
</div>
{% endblock %}