Task: Improve layout

This commit is contained in:
Björn Fromme
2023-10-21 16:41:57 +02:00
parent bf2e5600d0
commit 847af5341c
14 changed files with 278 additions and 174 deletions
+30 -23
View File
@@ -7,9 +7,7 @@
Einsatzübersicht
</h1>
<div class="grid lg:grid-cols-2 gap-8 items-start">
<div class="bg-gray-100 rounded-md p-4">
{% include '_partials/_assignment_info.html.twig' %}
</div>
{% include '_partials/_assignment_info.html.twig' %}
<div>
<h2 class="text-xl font-bold pb-2">
Voraussetzungen für diesen Einsatz
@@ -17,24 +15,33 @@
{% include '_partials/_assignment_requirements_info.html.twig' %}
<div class="flex flex-col items-start space-y-4">
{% if disposition is not null %}
<div>
Du wurdest am {{ disposition.createdAt|date('d.m.Y') }} für diesen Einsatz eingeteilt.
</div>
{% include '_partials/_infobox.html.twig' with {
'message': 'Du wurdest am ' ~ disposition.createdAt|date('d.m.Y') ~ 'für diesen Einsatz eingeteilt.'
} %}
{% elseif application is not null %}
<div>
Du hast dich am {{ application.createdAt|date('d.m.Y') }} auf diesen Einsatz beworben.
</div>
<button type="button"
class="btn btn--secondary"
title="Bewerbung zurückziehen"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du die Bewerbing wirklich zurückziehen?',
'target-url': path('app_teamer_application_withdraw', { 'uuid': application.uuid })
}) }}>
Bewerbung zurückziehen
</button>
{% if application.status == constant('App\\Entity\\Application::STATUS_REJECTED') %}
{% include '_partials/_errorbox.html.twig' with {
'message': 'Deine Bewerbung wurde leider abgelehnt.'
} %}
{% if application.remarks %}
<strong>Begründung:</strong> {{ application.remarks|nl2br}}
{% endif %}
{% else %}
{% include '_partials/_infobox.html.twig' with {
'message': 'Du hast dich am ' ~ application.createdAt|date('d.m.Y') ~ 'auf diesen Einsatz beworben.'
} %}
<button type="button"
class="btn btn--secondary"
title="Bewerbung zurückziehen"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du die Bewerbing wirklich zurückziehen?',
'target-url': path('app_teamer_application_withdraw', { 'uuid': application.uuid })
}) }}>
Bewerbung zurückziehen
</button>
{% endif %}
{% else %}
<div>
Erfüllst du mehrere oder alle Voraussetzungen für diesen Einsatz?
@@ -42,10 +49,10 @@
<a href="{{ path('app_teamer_application_create', { 'uuid': assignment.uuid }) }}" class="btn">
Hier bewerben!
</a>
<a href="{{ path('app_teamer_bookmark_toggle', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="underline">
{% if not isBookmarked %}auf die Merkliste setzen{% else %}von der Merkliste löschen{% endif %}
</a>
{% endif %}
<a href="{{ path('app_teamer_bookmark_toggle', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="underline">
{% if not isBookmarked %}auf die Merkliste setzen{% else %}von der Merkliste löschen{% endif %}
</a>
<a href="{{ returnUrl }}" class="underline">
zurück
</a>