feat: adopt ep-design 1.3.0 in admin

This commit is contained in:
fromme committed 2026-11-13 12:42:00 +01:00
1 parent df564c30ae
commit e517163c9a
19 files changed
+127 -140

No files matched your search

+16 -4
View File
@@ -92,6 +92,12 @@
cursor: pointer; cursor: pointer;
} }
/* text size of every E&P app: 14px; text-base (16px) and up only for headings */
body {
font-size: var(--text-sm);
line-height: var(--text-sm--line-height);
}
/* modals: centred (Preflight resets the browser's margin: auto), the page behind dimmed and blurred */ /* modals: centred (Preflight resets the browser's margin: auto), the page behind dimmed and blurred */
dialog:modal { dialog:modal {
margin: auto; margin: auto;
@@ -275,7 +281,7 @@
/* /*
* Lists of entries in a card, as on a dashboard (components/dashboard/): one line per entry, the * Lists of entries in a card, as on a dashboard (components/dashboard/): one line per entry, the
* whole line is the link or button, its parts separated by a dot, the last part cut off with "…". * whole line is the link or button, its parts separated by a dot, the text cut off with "…".
*/ */
.entry-list { .entry-list {
@apply divide-y divide-line; @apply divide-y divide-line;
@@ -299,14 +305,20 @@
} }
.entry-link > * { .entry-link > * {
@apply shrink-0 whitespace-nowrap; @apply shrink-0;
} }
.entry-link > :last-child { /* the text after the icon: one line, cut off as a whole with "…" */
.entry-text {
@apply min-w-0 shrink truncate; @apply min-w-0 shrink truncate;
} }
.entry-link > .entry-dot { /* icons and dots inside the text flow with it (Tailwind's preflight makes svg a block) */
.entry-text :is(svg, img) {
@apply inline-block align-middle;
}
.entry-dot {
@apply text-muted; @apply text-muted;
} }
@@ -1,5 +1,5 @@
{# {#
KnpMenu template for the admin sidebar (layout_admin.html.twig). Items of the first level: KnpMenu template for the sidebar (layout_sidebar.html.twig). Items of the first level:
- a link (`.sidebar-link`); with children, they show below it while it or a child is current - a link (`.sidebar-link`); with children, they show below it while it or a child is current
- without a URI but with children: a group that opens in place (<details>), open while a child is current - without a URI but with children: a group that opens in place (<details>), open while a child is current
- extras `heading` (a group heading) or `divider` (a line) - extras `heading` (a group heading) or `divider` (a line)
+27 -27
View File
@@ -60,7 +60,7 @@
Preise Preise
</h2> </h2>
<div class="data-table-wrapper mb-4"> <div class="data-table-wrapper mb-4">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -135,17 +135,17 @@
{% endif %} {% endif %}
</td> </td>
<td class="text-right"> <td class="text-right">
<twig:dropdown> <twig:menu>
<twig:dropdown:link url="{{ path('app_admin_accommodationprice_edit', { 'id': price.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_accommodationprice_edit', { 'id': price.id }) }}">
bearbeiten bearbeiten
</twig:dropdown:link> </a>
<twig:dropdown:link url="{{ path('app_admin_accommodationprice_duplicate', { 'id': price.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_accommodationprice_duplicate', { 'id': price.id }) }}">
duplizieren duplizieren
</twig:dropdown:link> </a>
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationprice_delete', { 'id': price.id }) }}" warning> <button type="button" class="menu-item-danger" role="menuitem" hx-get="{{ path('app_admin_accommodationprice_delete', { 'id': price.id }) }}" hx-target="body" hx-swap="beforeend">
löschen löschen
</twig:dropdown:hxbutton> </button>
</twig:dropdown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -173,7 +173,7 @@
Verpflegungsleistungen Verpflegungsleistungen
</h2> </h2>
<div class="data-table-wrapper mb-4"> <div class="data-table-wrapper mb-4">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -202,17 +202,17 @@
{{ (service.price / 100) | format_currency(accommodation.currency) }} {{ (service.price / 100) | format_currency(accommodation.currency) }}
</td> </td>
<td class="text-right"> <td class="text-right">
<twig:dropdown> <twig:menu>
<twig:dropdown:link url="{{ path('app_admin_boardservice_edit', { 'id': service.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_boardservice_edit', { 'id': service.id }) }}">
bearbeiten bearbeiten
</twig:dropdown:link> </a>
<twig:dropdown:link url="{{ path('app_admin_boardservice_duplicate', { 'id': service.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_boardservice_duplicate', { 'id': service.id }) }}">
duplizieren duplizieren
</twig:dropdown:link> </a>
<twig:dropdown:hxbutton url="{{ path('app_admin_boardservice_delete', { 'id': service.id }) }}" warning> <button type="button" class="menu-item-danger" role="menuitem" hx-get="{{ path('app_admin_boardservice_delete', { 'id': service.id }) }}" hx-target="body" hx-swap="beforeend">
löschen löschen
</twig:dropdown:hxbutton> </button>
</twig:dropdown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -245,7 +245,7 @@
Die Reihenfolge wird per Drag &amp; Drop festgelegt und gilt auch für das Buchungsformular. Die Reihenfolge wird per Drag &amp; Drop festgelegt und gilt auch für das Buchungsformular.
</p> </p>
<div class="data-table-wrapper mb-4"> <div class="data-table-wrapper mb-4">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -284,17 +284,17 @@
{{ (service.price / 100) | format_currency(accommodation.currency) }} {{ (service.price / 100) | format_currency(accommodation.currency) }}
</td> </td>
<td class="text-right"> <td class="text-right">
<twig:dropdown> <twig:menu>
<twig:dropdown:link url="{{ path('app_admin_additionalservice_edit', { 'id': service.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_additionalservice_edit', { 'id': service.id }) }}">
bearbeiten bearbeiten
</twig:dropdown:link> </a>
<twig:dropdown:link url="{{ path('app_admin_additionalservice_duplicate', { 'id': service.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_additionalservice_duplicate', { 'id': service.id }) }}">
duplizieren duplizieren
</twig:dropdown:link> </a>
<twig:dropdown:hxbutton url="{{ path('app_admin_additionalservice_delete', { 'id': service.id }) }}" warning> <button type="button" class="menu-item-danger" role="menuitem" hx-get="{{ path('app_admin_additionalservice_delete', { 'id': service.id }) }}" hx-target="body" hx-swap="beforeend">
löschen löschen
</twig:dropdown:hxbutton> </button>
</twig:dropdown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -3,7 +3,7 @@
{% block content %} {% block content %}
<twig:page:heading>Gruppenhäuser</twig:page:heading> <twig:page:heading>Gruppenhäuser</twig:page:heading>
<div class="data-table-wrapper"> <div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -44,14 +44,14 @@
{% endif %} {% endif %}
</td> </td>
<td class="text-right"> <td class="text-right">
<twig:dropdown> <twig:menu>
<twig:dropdown:link url="{{ path('app_admin_accommodation_edit', { 'id': accommodation.id, 'r': return_url() }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_accommodation_edit', { 'id': accommodation.id, 'r': return_url() }) }}">
bearbeiten bearbeiten
</twig:dropdown:link> </a>
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodation_delete', { 'id': accommodation.id, 'r': return_url() }) }}" warning> <button type="button" class="menu-item-danger" role="menuitem" hx-get="{{ path('app_admin_accommodation_delete', { 'id': accommodation.id, 'r': return_url() }) }}" hx-target="body" hx-swap="beforeend">
löschen löschen
</twig:dropdown:hxbutton> </button>
</twig:dropdown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -20,13 +20,13 @@
{{ (period.total / 100) | format_currency(booking.pricingCurrency ?? booking.accommodation.currency) }} {{ (period.total / 100) | format_currency(booking.pricingCurrency ?? booking.accommodation.currency) }}
</td> </td>
<td class="py-1 text-right"> <td class="py-1 text-right">
<twig:dropdown> <twig:menu>
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationbooking_period_edit', period_params) }}"> <button type="button" class="menu-item" role="menuitem" hx-get="{{ path('app_admin_accommodationbooking_period_edit', period_params) }}" hx-target="body" hx-swap="beforeend">
bearbeiten bearbeiten
</twig:dropdown:hxbutton> </button>
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationbooking_period_remove', period_params) }}" warning> <button type="button" class="menu-item-danger" role="menuitem" hx-get="{{ path('app_admin_accommodationbooking_period_remove', period_params) }}" hx-target="body" hx-swap="beforeend">
entfernen entfernen
</twig:dropdown:hxbutton> </button>
</twig:dropdown> </twig:menu>
</td> </td>
</tr> </tr>
@@ -1,5 +1,5 @@
{#- Itemised price table, the same lines the customer sees in the offer. Context: booking, priceBreakdown, currency. -#} {#- Itemised price table, the same lines the customer sees in the offer. Context: booking, priceBreakdown, currency. -#}
<table class="w-full text-sm"> <table class="w-full">
{% for period in priceBreakdown.periods | filter(p => p.position == 'leading') %} {% for period in priceBreakdown.periods | filter(p => p.position == 'leading') %}
{% include 'admin/accommodation_booking/_price_period.html.twig' %} {% include 'admin/accommodation_booking/_price_period.html.twig' %}
{% endfor %} {% endfor %}
@@ -46,7 +46,7 @@
Vorausteam, werden mit eigenen Positionen berechnet; Personen und Leistungen gelten Vorausteam, werden mit eigenen Positionen berechnet; Personen und Leistungen gelten
nur für den Zeitraum der Gruppe. nur für den Zeitraum der Gruppe.
</p> </p>
<table class="w-full text-sm"> <table class="w-full">
{% if booking.leadingPeriod %} {% if booking.leadingPeriod %}
{% include 'admin/accommodation_booking/_period_row.html.twig' with { period: booking.leadingPeriod } %} {% include 'admin/accommodation_booking/_period_row.html.twig' with { period: booking.leadingPeriod } %}
{% endif %} {% endif %}
@@ -57,18 +57,18 @@
<td class="py-1 text-right"> <td class="py-1 text-right">
{# One period per side, so only the free sides are offered. #} {# One period per side, so only the free sides are offered. #}
{% if booking.leadingPeriod is null or booking.trailingPeriod is null %} {% if booking.leadingPeriod is null or booking.trailingPeriod is null %}
<twig:dropdown> <twig:menu>
{% if booking.leadingPeriod is null %} {% if booking.leadingPeriod is null %}
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationbooking_period_split', back_params | merge({ position: 'leading' })) }}"> <button type="button" class="menu-item" role="menuitem" hx-get="{{ path('app_admin_accommodationbooking_period_split', back_params | merge({ position: 'leading' })) }}" hx-target="body" hx-swap="beforeend">
am Anfang abteilen am Anfang abteilen
</twig:dropdown:hxbutton> </button>
{% endif %} {% endif %}
{% if booking.trailingPeriod is null %} {% if booking.trailingPeriod is null %}
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationbooking_period_split', back_params | merge({ position: 'trailing' })) }}"> <button type="button" class="menu-item" role="menuitem" hx-get="{{ path('app_admin_accommodationbooking_period_split', back_params | merge({ position: 'trailing' })) }}" hx-target="body" hx-swap="beforeend">
am Ende abteilen am Ende abteilen
</twig:dropdown:hxbutton> </button>
{% endif %} {% endif %}
</twig:dropdown> </twig:menu>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
@@ -148,7 +148,7 @@
<twig:form:section title="Status"> <twig:form:section title="Status">
{# Read-only: the status only ever moves through a named action on the detail page, {# Read-only: the status only ever moves through a named action on the detail page,
so that it cannot be set without the email and timestamp that belong to it. #} so that it cannot be set without the email and timestamp that belong to it. #}
<dl class="grid grid-cols-2 gap-y-1 text-sm"> <dl class="grid grid-cols-2 gap-y-1">
<dt class="text-muted">Status</dt> <dt class="text-muted">Status</dt>
<dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd> <dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd>
<dt class="text-muted">Herkunft</dt> <dt class="text-muted">Herkunft</dt>
@@ -9,7 +9,7 @@
'modal_route': 'app_admin_accommodationbooking_filter', 'modal_route': 'app_admin_accommodationbooking_filter',
}) }} }) }}
<div class="data-table-wrapper"> <div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -90,29 +90,29 @@
<a href="{{ edit_url }}">{{ discounts | length > 0 ? (discounts | join(', ')) : '–' }}</a> <a href="{{ edit_url }}">{{ discounts | length > 0 ? (discounts | join(', ')) : '–' }}</a>
</td> </td>
<td class="text-right"> <td class="text-right">
<twig:dropdown> <twig:menu>
<twig:dropdown:link url="{{ path('app_admin_accommodationbooking_show', { 'id': booking.id, 'r': return_url() }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_accommodationbooking_show', { 'id': booking.id, 'r': return_url() }) }}">
Details Details
</twig:dropdown:link> </a>
<twig:dropdown:link url="{{ edit_url }}"> <a class="menu-item" role="menuitem" href="{{ edit_url }}">
bearbeiten bearbeiten
</twig:dropdown:link> </a>
{# Copying leaves the original alone, so it is offered in every {# Copying leaves the original alone, so it is offered in every
status — see DuplicateController. #} status — see DuplicateController. #}
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationbooking_duplicate', { 'id': booking.id, 'r': return_url() }) }}"> <button type="button" class="menu-item" role="menuitem" hx-get="{{ path('app_admin_accommodationbooking_duplicate', { 'id': booking.id, 'r': return_url() }) }}" hx-target="body" hx-swap="beforeend">
duplizieren duplizieren
</twig:dropdown:hxbutton> </button>
<twig:dropdown:link url="{{ path('app_admin_accommodationbooking_pdf', { 'id': booking.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_accommodationbooking_pdf', { 'id': booking.id }) }}">
PDF herunterladen PDF herunterladen
</twig:dropdown:link> </a>
{# A record that has been in front of the customer gets discarded, {# A record that has been in front of the customer gets discarded,
not removed — see DeleteController. #} not removed — see DeleteController. #}
{% if booking.draft %} {% if booking.draft %}
<twig:dropdown:hxbutton url="{{ path('app_admin_accommodationbooking_delete', { 'id': booking.id, 'r': return_url() }) }}" warning> <button type="button" class="menu-item-danger" role="menuitem" hx-get="{{ path('app_admin_accommodationbooking_delete', { 'id': booking.id, 'r': return_url() }) }}" hx-target="body" hx-swap="beforeend">
löschen löschen
</twig:dropdown:hxbutton> </button>
{% endif %} {% endif %}
</twig:dropdown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -17,7 +17,7 @@
<div class="xl:grid xl:grid-cols-3 xl:gap-6 xl:items-start space-y-6 xl:space-y-0"> <div class="xl:grid xl:grid-cols-3 xl:gap-6 xl:items-start space-y-6 xl:space-y-0">
<div class="xl:col-span-2 space-y-6"> <div class="xl:col-span-2 space-y-6">
<twig:form:section title="Aufenthalt"> <twig:form:section title="Aufenthalt">
<dl class="grid grid-cols-2 gap-y-2 text-sm"> <dl class="grid grid-cols-2 gap-y-2">
<dt class="font-medium">Gruppenhaus</dt> <dt class="font-medium">Gruppenhaus</dt>
<dd>{{ booking.accommodation.name }}</dd> <dd>{{ booking.accommodation.name }}</dd>
<dt class="font-medium">Anreise</dt> <dt class="font-medium">Anreise</dt>
@@ -48,7 +48,7 @@
{% if booking.boardServiceLabel or booking.additionalServices | length > 0 %} {% if booking.boardServiceLabel or booking.additionalServices | length > 0 %}
<twig:form:section title="Leistungen"> <twig:form:section title="Leistungen">
<dl class="grid grid-cols-2 gap-y-2 text-sm"> <dl class="grid grid-cols-2 gap-y-2">
{% if booking.boardServiceLabel %} {% if booking.boardServiceLabel %}
<dt class="font-medium">Verpflegung</dt> <dt class="font-medium">Verpflegung</dt>
<dd>{{ booking.boardServiceLabel }}</dd> <dd>{{ booking.boardServiceLabel }}</dd>
@@ -69,7 +69,7 @@
{% endif %} {% endif %}
<twig:form:section title="Kontakt"> <twig:form:section title="Kontakt">
<dl class="grid grid-cols-2 gap-y-2 text-sm"> <dl class="grid grid-cols-2 gap-y-2">
<dt class="font-medium">Gruppenname</dt> <dt class="font-medium">Gruppenname</dt>
<dd>{{ booking.groupName }}</dd> <dd>{{ booking.groupName }}</dd>
<dt class="font-medium">Anrede</dt> <dt class="font-medium">Anrede</dt>
@@ -101,7 +101,7 @@
<aside class="space-y-6 xl:sticky xl:top-8"> <aside class="space-y-6 xl:sticky xl:top-8">
<twig:form:section title="Status"> <twig:form:section title="Status">
<dl class="grid grid-cols-2 gap-y-1 text-sm"> <dl class="grid grid-cols-2 gap-y-1">
<dt class="text-muted">Status</dt> <dt class="text-muted">Status</dt>
<dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd> <dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd>
<dt class="text-muted">Herkunft</dt> <dt class="text-muted">Herkunft</dt>
@@ -9,7 +9,7 @@
'modal_route': 'app_admin_bookingeditdraft_filter', 'modal_route': 'app_admin_bookingeditdraft_filter',
}) }} }) }}
<div class="data-table-wrapper"> <div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -48,17 +48,17 @@
{% endif %} {% endif %}
</td> </td>
<td> <td>
<twig:dropdown> <twig:menu>
<twig:dropdown:link url="{{ path('app_admin_bookingeditdraft_show', { 'id': draft.id, 'r': return_url() }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_bookingeditdraft_show', { 'id': draft.id, 'r': return_url() }) }}">
Details Details
</twig:dropdown:link> </a>
<twig:dropdown:link url="{{ path('app_admin_bookingeditdraft_export', { 'id': draft.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_bookingeditdraft_export', { 'id': draft.id }) }}">
XLS-Export XLS-Export
</twig:dropdown:link> </a>
<twig:dropdown:hxbutton url="{{ path('app_admin_bookingeditdraft_delete', { 'id': draft.id, 'r': return_url() }) }}" warning> <button type="button" class="menu-item-danger" role="menuitem" hx-get="{{ path('app_admin_bookingeditdraft_delete', { 'id': draft.id, 'r': return_url() }) }}" hx-target="body" hx-swap="beforeend">
löschen löschen
</twig:dropdown:hxbutton> </button>
</twig:dropdown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
+5 -5
View File
@@ -9,7 +9,7 @@
'modal_route': 'app_admin_log_filter', 'modal_route': 'app_admin_log_filter',
}) }} }) }}
<div class="data-table-wrapper"> <div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -57,11 +57,11 @@
</td> </td>
<td> <td>
{% if entry.channel == 'bpn' %} {% if entry.channel == 'bpn' %}
<twig:dropdown> <twig:menu>
<twig:dropdown:link url="{{ path('app_admin_log_xmldumps', { 'id': entry.id }) }}"> <a class="menu-item" role="menuitem" href="{{ path('app_admin_log_xmldumps', { 'id': entry.id }) }}">
XML-Dumps XML-Dumps
</twig:dropdown:link> </a>
</twig:dropdown> </twig:menu>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
+1 -1
View File
@@ -9,7 +9,7 @@
</div> </div>
{% else %} {% else %}
<div class="data-table-wrapper"> <div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -39,7 +39,7 @@
{{ result.data|length }} Empfänger für <code>{{ result.travelCode }}</code>{% if result.busLeg %}, nur {{ result.busLeg.label }}{% endif %} {{ result.data|length }} Empfänger für <code>{{ result.travelCode }}</code>{% if result.busLeg %}, nur {{ result.busLeg.label }}{% endif %}
</p> </p>
</div> </div>
<div class="pb-6 text-sm"> <div class="pb-6">
{% for list in mailing_lists %} {% for list in mailing_lists %}
<p> <p>
Mailjet-Liste <code>{{ list.name }}</code> (ID {{ list.mailjetListId }}, Mailjet-Liste <code>{{ list.name }}</code> (ID {{ list.mailjetListId }},
@@ -72,7 +72,7 @@
{% endif %} {% endif %}
</div> </div>
<div class="data-table-wrapper"> <div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
+5 -5
View File
@@ -9,7 +9,7 @@
'modal_route': 'app_admin_user_filter', 'modal_route': 'app_admin_user_filter',
}) }} }) }}
<div class="data-table-wrapper"> <div class="data-table-wrapper">
<div class="data-table-wrapper__inner text-sm"> <div class="data-table-wrapper__inner">
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
@@ -69,11 +69,11 @@
{{ user.lastLoginAt | date('d.m.Y, H:i') }} {{ user.lastLoginAt | date('d.m.Y, H:i') }}
</td> </td>
<td class="text-right"> <td class="text-right">
<twig:dropdown> <twig:menu>
<twig:dropdown:hxbutton url="{{ path('app_admin_user_permissions', { 'id': user.id, 'r': return_url() }) }}"> <button type="button" class="menu-item" role="menuitem" hx-get="{{ path('app_admin_user_permissions', { 'id': user.id, 'r': return_url() }) }}" hx-target="body" hx-swap="beforeend">
Berechtigungen Berechtigungen
</twig:dropdown:hxbutton> </button>
</twig:dropdown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -9,14 +9,15 @@
{% set is_button = not url and attributes.all|keys|filter(k => k starts with 'hx-')|length > 0 %} {% set is_button = not url and attributes.all|keys|filter(k => k starts with 'hx-')|length > 0 %}
{% set body %} {% set body %}
{% if icon %}{{ include('_partials/_icon.html.twig', {icon: icon, class: 'size-4 text-muted'}) }}{% endif %} {% if icon %}{{ include('_partials/_icon.html.twig', {icon: icon, class: 'size-4 text-muted'}) }}{% endif %}
{% if parts is not null %} <span class="entry-text">
{% for part in parts|filter(p => p is not empty) %} {%- if parts is not null -%}
{% if not loop.first %}<span class="entry-dot" aria-hidden="true">·</span>{% endif %} {%- for part in parts|filter(p => p is not empty) -%}
<span>{{ part }}</span> {% if not loop.first %} <span class="entry-dot" aria-hidden="true">·</span> {% endif %}<span>{{ part }}</span>
{% endfor %} {%- endfor -%}
{% else %} {%- else -%}
<span>{{ block('content') }}</span> {{ block('content') }}
{% endif %} {%- endif -%}
</span>
{% endset %} {% endset %}
{% set attrs = attributes.defaults({class: 'entry-link'}).without('url', 'icon', 'parts') %} {% set attrs = attributes.defaults({class: 'entry-link'}).without('url', 'icon', 'parts') %}
<li> <li>
@@ -1,17 +0,0 @@
{% set warning = warning ?? false %}
{% set method = method ?? 'get' %}
<button type="button"
class="{{ warning ? 'menu-item-danger' : 'menu-item' }}"
role="menuitem"
{{ stimulus_action('menu', 'choose') }}
{{ attributes
.defaults({
'hx-target': 'body',
'hx-swap': 'beforeend',
})
.without('url', 'warning', 'method')
}}
hx-{{ method | lower }}="{{ url }}"
>
{{ block('content') }}
</button>
@@ -1,15 +0,0 @@
{#- The "⋯" menu of a row or card (menu_controller.js); fill it with dropdown:link and dropdown:hxbutton -#}
<div class="relative inline-block text-left" {{ stimulus_controller('menu') }}>
<button type="button"
class="btn-more"
aria-haspopup="menu"
aria-expanded="false"
aria-label="Funktionen"
{{ stimulus_target('menu', 'button') }}
{{ stimulus_action('menu', 'toggle') }}>
{{ icon('dots', 'size-5') }}
</button>
<div class="menu-panel" role="menu" hidden {{ stimulus_target('menu', 'panel') }}>
{% block content %}{% endblock %}
</div>
</div>
@@ -1,7 +0,0 @@
{% set warning = warning ?? false %}
<a href="{{ url }}"
class="{{ warning ? 'menu-item-danger' : 'menu-item' }}"
role="menuitem"
{{ stimulus_action('menu', 'choose') }}>
{{ block('content') }}
</a>
+13
View File
@@ -0,0 +1,13 @@
{#-
A "⋯" menu (menu_controller.js), opened by click or tap, never by hover. The items go in the
content block: links or buttons with the class `menu-item` (or `menu-item-danger`) and
role="menuitem". Choosing one closes the menu.
-#}
{% set label = label ?? 'Aktionen' %}
<div class="relative inline-block" {{ stimulus_controller('menu') }}>
<button type="button" class="btn-more" aria-haspopup="menu" aria-expanded="false" aria-label="{{ label }}"
{{ stimulus_target('menu', 'button') }} {{ stimulus_action('menu', 'toggle') }}>⋯</button>
<div class="menu-panel" role="menu" hidden {{ stimulus_target('menu', 'panel') }} {{ stimulus_action('menu', 'choose') }}>
{% block content %}{% endblock %}
</div>
</div>