style: restyle the teamer skills and availability pages

This commit is contained in:
fromme committed 2026-11-12 11:25:30 +01:00
1 parent 8b44c7f14d
commit 981e9f2762
3 files changed
+137 -138

No files matched your search

@@ -2,94 +2,89 @@
{% block title %}Meine Verfügbarkeit{% endblock %}
{#
The periods grouped by year and month; `selected` decides whether a row offers removing the
period or adding it.
#}
{% macro periods(years, selected) %}
{% for year, months in years %}
<h3 class="pt-4 pb-1 text-lg font-bold first:pt-0">
{{ year }}
</h3>
{% for month, availabilities in months %}
<h4 class="pt-2 text-xs font-bold uppercase tracking-wide text-muted">
{{ month }}
</h4>
<ul class="divide-y divide-line">
{% for availability in availabilities %}
<li class="flex items-center justify-between gap-x-4 py-2">
<span>{{ availability }}{% if availability.description %} <span class="text-muted">({{ availability.description }})</span>{% endif %}</span>
{% if selected %}
{% if is_granted('DELETE', availability) %}
<button type="button"
class="text-red-700 hover:text-red-900"
title="Zeitraum entfernen/löschen"
hx-get="{{ path('app_teamer_profile_availability_delete', { 'id': availability.id }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('delete', 'w-5 h-5') }}
</button>
{% endif %}
{% else %}
<a href="{{ path('app_teamer_profile_availability_add', { 'id': availability.id }) }}"
class="text-brand hover:text-brand-dark"
title="Zeitraum hinzufügen">
{{ icon('plus', 'w-5 h-5') }}
</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endfor %}
{% endfor %}
{% endmacro %}
{% block content %}
<h1 class="text-2xl font-bold pb-4">
Meine Verfügbarkeit
</h1>
<p class="pb-8">
<p class="max-w-prose pb-6">
Hier kannst du angeben, wann du allgemein Zeit und Lust hättest, Einsätze zu absolvieren. Wenn wir in diesem
Zeitraum einen Einsatz zu vergeben haben, dann nehmen wir telefonisch oder per E-Mail Kontakt zu dir auf.
</p>
<h2 class="text-xl font-bold pb-2">
Ich bin verfügbar
</h2>
<div class="grid md:grid-cols-2 gap-8 pb-8">
{% for year, months in selectedAvailabilities %}
<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 }}{% if availability.description %} ({{ availability.description }}){% endif %}</span>
{% if is_granted('DELETE', availability) %}
<button type="button"
title="Zeitraum entfernen/löschen"
hx-get="{{ path('app_teamer_profile_availability_delete', { 'id': availability.id }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('delete', 'w-5 h-5') }}
</button>
{% endif %}
</div>
{% endfor %}
</div>
{% endfor %}
<div class="grid gap-6 lg:grid-cols-2 items-start">
<section class="card p-5">
<h2 class="section-title pb-3">
Ich bin verfügbar
</h2>
{% if selectedAvailabilities is empty %}
<p class="text-muted">Du hast bisher keine Verfügbarkeiten hinterlegt.</p>
{% else %}
{{ _self.periods(selectedAvailabilities, true) }}
{% endif %}
</section>
<section class="card p-5">
<h2 class="section-title pb-3">
Weitere Verfügbarkeiten
</h2>
{% if selectableAvailabilities is empty %}
<p class="pb-4 text-muted">Es sind keine weiteren Zeiträume verfügbar.</p>
{% else %}
<div class="pb-4">
{{ _self.periods(selectableAvailabilities, false) }}
</div>
</div>
{% else %}
<div class="md:col-span-2 text-sm">
Du hast bisher keine Verfügbarkeiten hinterlegt.
</div>
{% endfor %}
{% endif %}
<button type="button"
class="btn btn--small btn--secondary"
title="Eigenen Zeitraum hinzufügen"
hx-get="{{ path('app_teamer_profile_availability_create') }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('plus', 'w-4 h-4 shrink-0') }}
<span>Eigenen Zeitraum hinzufügen</span>
</button>
</section>
</div>
<h2 class="text-xl font-bold pb-2">
Weitere Verfügbarkeiten
</h2>
<div class="grid md:grid-cols-2 gap-8 pb-8">
{% for year, months in selectableAvailabilities %}
<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 }}{% if availability.description %} ({{ availability.description }}){% endif %}</span>
<a href="{{ path('app_teamer_profile_availability_add', { 'id': availability.id }) }}"
title="Zeitraum hinzufügen">
{{ icon('plus', 'w-5 h-5') }}
</a>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% else %}
<div class="md:col-span-2 text-sm">
Es sind keine weiteren Zeiträume verfügbar.
</div>
{% endfor %}
</div>
<button type="button"
class="btn"
title="Eigenen Zeitraum hinzufügen"
hx-get="{{ path('app_teamer_profile_availability_create') }}"
hx-target="body"
hx-swap="beforeend">
Eigenen Zeitraum hinzufügen
</button>
{% endblock %}
{% endblock %}
+60 -56
View File
@@ -3,36 +3,40 @@
{% block title %}Meine Jobprofile & Skills{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-4">
<h1 class="text-2xl font-bold pb-6">
Meine Jobprofile &amp; Skills
</h1>
<h2 class="text-xl font-bold pb-2">
Ausbildung
</h2>
<ul class="list-disc pl-4 pb-8">
{% for attendance in teamer.trainingAttendances %}
<li>
{{ attendance.training.name }} {{ attendance.date|date('m/Y') }}
</li>
{% else %}
<li class="text-sm">
Du hast bisher an keinen Fortbildungen teilgenommen
</li>
{% endfor %}
</ul>
<div class="grid gap-6 lg:grid-cols-2 items-start pb-6">
<section class="card p-5">
<h2 class="section-title pb-3">
Ausbildung
</h2>
<ul class="divide-y divide-line">
{% for attendance in teamer.trainingAttendances %}
<li class="flex items-center justify-between gap-x-4 py-2">
<span>{{ attendance.training.name }}</span>
<span class="text-muted">{{ attendance.date|date('m/Y') }}</span>
</li>
{% else %}
<li class="py-2 text-muted">
Du hast bisher an keinen Fortbildungen teilgenommen.
</li>
{% endfor %}
</ul>
</section>
<div class="pb-8">
<h2 class="text-xl font-bold pb-2">
Lizenzen
</h2>
<ul class="list-disc pl-4 pb-8">
{% for license in teamer.licenses %}
<li>
<div class="flex items-center space-x-4">
<span>{{ license.type|license_label }}</span>
<span>{{ license.date|date('m/Y') }}</span>
<section class="card p-5">
<h2 class="section-title pb-3">
Lizenzen
</h2>
<ul class="divide-y divide-line pb-4">
{% for license in teamer.licenses %}
<li class="flex items-center gap-x-4 py-2">
<span class="flex-1">{{ license.type|license_label }}</span>
<span class="text-muted">{{ license.date|date('m/Y') }}</span>
{% if is_granted('DOWNLOAD', license.certificate) %}
<a href="{{ path('app_common_download', { 'uuid': license.certificate.uuid }) }}"
class="text-brand hover:text-brand-dark"
target="_blank"
title="Download Nachweis">
{{ icon('download', 'w-4 h-4') }}
@@ -40,48 +44,48 @@
{% endif %}
{% if is_granted('DELETE', license) %}
<button type="button"
class="text-red-500"
class="text-red-700 hover:text-red-900"
title="Lizenz löschen"
hx-get="{{ path('app_teamer_profile_license_delete', { 'uuid': license.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('delete') }}
{{ icon('delete', 'w-5 h-5') }}
</button>
{% endif %}
</div>
</li>
{% else %}
<li class="text-sm">
Du hast bisher keine Lizenzen hinterlegt
</li>
{% endfor %}
</ul>
<button type="button"
class="btn"
title="Lizenz hinzufügen"
hx-get="{{ path('app_teamer_profile_license_add') }}"
hx-target="body"
hx-swap="beforeend">
Lizenz hinzufügen
</button>
</li>
{% else %}
<li class="py-2 text-muted">
Du hast bisher keine Lizenzen hinterlegt.
</li>
{% endfor %}
</ul>
<button type="button"
class="btn btn--small btn--secondary"
title="Lizenz hinzufügen"
hx-get="{{ path('app_teamer_profile_license_add') }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('plus', 'w-4 h-4 shrink-0') }}
<span>Lizenz hinzufügen</span>
</button>
</section>
</div>
{{ form_start(form) }}
<div class="grid gap-6 lg:grid-cols-2 items-start pb-6">
<section class="card p-5">
<h2 class="section-title pb-3">
Mögliche Jobprofile
</h2>
{{ form_row(form.jobProfiles) }}
</section>
<h2 class="text-xl font-bold pb-2">
Mögliche Jobprofile
</h2>
<div class="pb-8">
{{ form_row(form.jobProfiles) }}
</div>
<h2 class="text-xl font-bold pb-2">
Sonstiges
</h2>
<div class="grid md:grid-cols-2 gap-y-4 md:gap-x-8 pb-8">
<div>
<section class="card p-5">
<h2 class="section-title pb-3">
Sonstiges
</h2>
{{ form_row(form.remarks) }}
</div>
</section>
</div>
<button type="submit" class="btn">