From e517163c9a059e060477bc36f2abf4ccaabd9ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Fri, 13 Nov 2026 12:42:00 +0100 Subject: [PATCH] feat: adopt ep-design 1.3.0 in admin --- assets/styles/ep-design.css | 20 +++++-- .../admin/_partials/_sidebar_menu.html.twig | 2 +- templates/admin/accommodation/_form.html.twig | 54 +++++++++---------- templates/admin/accommodation/index.html.twig | 14 ++--- .../_period_row.html.twig | 12 ++--- .../_price_breakdown.html.twig | 2 +- .../accommodation_booking/edit.html.twig | 16 +++--- .../accommodation_booking/index.html.twig | 26 ++++----- .../accommodation_booking/show.html.twig | 8 +-- .../admin/booking_edit_draft/index.html.twig | 18 +++---- templates/admin/log/index.html.twig | 10 ++-- templates/admin/log/xml_dumps.html.twig | 2 +- .../admin/travel_mailing/index.html.twig | 4 +- templates/admin/user/index.html.twig | 10 ++-- .../components/dashboard/entry.html.twig | 17 +++--- .../components/dropdown/hxbutton.html.twig | 17 ------ templates/components/dropdown/index.html.twig | 15 ------ templates/components/dropdown/link.html.twig | 7 --- templates/components/menu.html.twig | 13 +++++ 19 files changed, 127 insertions(+), 140 deletions(-) delete mode 100644 templates/components/dropdown/hxbutton.html.twig delete mode 100644 templates/components/dropdown/index.html.twig delete mode 100644 templates/components/dropdown/link.html.twig create mode 100644 templates/components/menu.html.twig diff --git a/assets/styles/ep-design.css b/assets/styles/ep-design.css index cb3964fe..6243a890 100644 --- a/assets/styles/ep-design.css +++ b/assets/styles/ep-design.css @@ -92,6 +92,12 @@ 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 */ dialog:modal { margin: auto; @@ -275,7 +281,7 @@ /* * 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 { @apply divide-y divide-line; @@ -299,14 +305,20 @@ } .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; } - .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; } diff --git a/templates/admin/_partials/_sidebar_menu.html.twig b/templates/admin/_partials/_sidebar_menu.html.twig index 389b1f38..597b25ae 100644 --- a/templates/admin/_partials/_sidebar_menu.html.twig +++ b/templates/admin/_partials/_sidebar_menu.html.twig @@ -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 - without a URI but with children: a group that opens in place (
), open while a child is current - extras `heading` (a group heading) or `divider` (a line) diff --git a/templates/admin/accommodation/_form.html.twig b/templates/admin/accommodation/_form.html.twig index 5a9deaf1..b88897da 100644 --- a/templates/admin/accommodation/_form.html.twig +++ b/templates/admin/accommodation/_form.html.twig @@ -60,7 +60,7 @@ Preise
-
+
@@ -135,17 +135,17 @@ {% endif %} {% else %} @@ -173,7 +173,7 @@ Verpflegungsleistungen
-
+
- - + + bearbeiten - - + + duplizieren - - + + +
@@ -202,17 +202,17 @@ {{ (service.price / 100) | format_currency(accommodation.currency) }} {% else %} @@ -245,7 +245,7 @@ Die Reihenfolge wird per Drag & Drop festgelegt und gilt auch für das Buchungsformular.

-
+
- - + + bearbeiten - - + + duplizieren - - + + +
@@ -284,17 +284,17 @@ {{ (service.price / 100) | format_currency(accommodation.currency) }} {% else %} diff --git a/templates/admin/accommodation/index.html.twig b/templates/admin/accommodation/index.html.twig index c6e165a3..2913e4da 100644 --- a/templates/admin/accommodation/index.html.twig +++ b/templates/admin/accommodation/index.html.twig @@ -3,7 +3,7 @@ {% block content %} Gruppenhäuser
-
+
- - + + bearbeiten - - + + duplizieren - - + + +
@@ -44,14 +44,14 @@ {% endif %} {% else %} diff --git a/templates/admin/accommodation_booking/_period_row.html.twig b/templates/admin/accommodation_booking/_period_row.html.twig index 44c58645..9c276636 100644 --- a/templates/admin/accommodation_booking/_period_row.html.twig +++ b/templates/admin/accommodation_booking/_period_row.html.twig @@ -20,13 +20,13 @@ {{ (period.total / 100) | format_currency(booking.pricingCurrency ?? booking.accommodation.currency) }} diff --git a/templates/admin/accommodation_booking/_price_breakdown.html.twig b/templates/admin/accommodation_booking/_price_breakdown.html.twig index dd938a9d..722e5013 100644 --- a/templates/admin/accommodation_booking/_price_breakdown.html.twig +++ b/templates/admin/accommodation_booking/_price_breakdown.html.twig @@ -1,5 +1,5 @@ {#- Itemised price table, the same lines the customer sees in the offer. Context: booking, priceBreakdown, currency. -#} -
- - + + bearbeiten - - + + +
- - + + + +
+
{% for period in priceBreakdown.periods | filter(p => p.position == 'leading') %} {% include 'admin/accommodation_booking/_price_period.html.twig' %} {% endfor %} diff --git a/templates/admin/accommodation_booking/edit.html.twig b/templates/admin/accommodation_booking/edit.html.twig index 6acc30ad..1783e0e6 100644 --- a/templates/admin/accommodation_booking/edit.html.twig +++ b/templates/admin/accommodation_booking/edit.html.twig @@ -46,7 +46,7 @@ Vorausteam, werden mit eigenen Positionen berechnet; Personen und Leistungen gelten nur für den Zeitraum der Gruppe.

-
+
{% if booking.leadingPeriod %} {% include 'admin/accommodation_booking/_period_row.html.twig' with { period: booking.leadingPeriod } %} {% endif %} @@ -57,18 +57,18 @@ @@ -148,7 +148,7 @@ {# 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. #} -
+
Status
{% include 'admin/accommodation_booking/_status_label.html.twig' %}
Herkunft
diff --git a/templates/admin/accommodation_booking/index.html.twig b/templates/admin/accommodation_booking/index.html.twig index 7789681b..e2711012 100644 --- a/templates/admin/accommodation_booking/index.html.twig +++ b/templates/admin/accommodation_booking/index.html.twig @@ -9,7 +9,7 @@ 'modal_route': 'app_admin_accommodationbooking_filter', }) }}
-
+
{# 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 %} - + {% endif %} {% if booking.trailingPeriod is null %} - + {% endif %} - + {% endif %}
@@ -90,29 +90,29 @@ {{ discounts | length > 0 ? (discounts | join(', ')) : '–' }} {% else %} diff --git a/templates/admin/accommodation_booking/show.html.twig b/templates/admin/accommodation_booking/show.html.twig index 3127f406..788eb3f0 100644 --- a/templates/admin/accommodation_booking/show.html.twig +++ b/templates/admin/accommodation_booking/show.html.twig @@ -17,7 +17,7 @@
-
+
Gruppenhaus
{{ booking.accommodation.name }}
Anreise
@@ -48,7 +48,7 @@ {% if booking.boardServiceLabel or booking.additionalServices | length > 0 %} -
+
{% if booking.boardServiceLabel %}
Verpflegung
{{ booking.boardServiceLabel }}
@@ -69,7 +69,7 @@ {% endif %} -
+
Gruppenname
{{ booking.groupName }}
Anrede
@@ -101,7 +101,7 @@
- - + + Details - - + + bearbeiten - + {# Copying leaves the original alone, so it is offered in every status — see DuplicateController. #} - + + PDF herunterladen - + {# A record that has been in front of the customer gets discarded, not removed — see DeleteController. #} {% if booking.draft %} - + {% endif %} - +
@@ -48,17 +48,17 @@ {% endif %} {% else %} diff --git a/templates/admin/log/index.html.twig b/templates/admin/log/index.html.twig index bec74183..150a7c00 100644 --- a/templates/admin/log/index.html.twig +++ b/templates/admin/log/index.html.twig @@ -9,7 +9,7 @@ 'modal_route': 'app_admin_log_filter', }) }}
-
+
- - + + Details - - + + XLS-Export - - + + +
@@ -57,11 +57,11 @@ diff --git a/templates/admin/log/xml_dumps.html.twig b/templates/admin/log/xml_dumps.html.twig index 7b181c3b..ab3ad7ff 100644 --- a/templates/admin/log/xml_dumps.html.twig +++ b/templates/admin/log/xml_dumps.html.twig @@ -9,7 +9,7 @@ {% else %}
-
+
{% if entry.channel == 'bpn' %} - - + + XML-Dumps - - + + {% endif %}
diff --git a/templates/admin/travel_mailing/index.html.twig b/templates/admin/travel_mailing/index.html.twig index e72659d1..68fbf938 100644 --- a/templates/admin/travel_mailing/index.html.twig +++ b/templates/admin/travel_mailing/index.html.twig @@ -39,7 +39,7 @@ {{ result.data|length }} Empfänger für {{ result.travelCode }}{% if result.busLeg %}, nur {{ result.busLeg.label }}{% endif %}

-
+
{% for list in mailing_lists %}

Mailjet-Liste {{ list.name }} (ID {{ list.mailjetListId }}, @@ -72,7 +72,7 @@ {% endif %}

-
+
diff --git a/templates/admin/user/index.html.twig b/templates/admin/user/index.html.twig index 32b68c22..1770a660 100644 --- a/templates/admin/user/index.html.twig +++ b/templates/admin/user/index.html.twig @@ -9,7 +9,7 @@ 'modal_route': 'app_admin_user_filter', }) }}
-
+
@@ -69,11 +69,11 @@ {{ user.lastLoginAt | date('d.m.Y, H:i') }} {% else %} diff --git a/templates/components/dashboard/entry.html.twig b/templates/components/dashboard/entry.html.twig index 4e326479..5d318014 100644 --- a/templates/components/dashboard/entry.html.twig +++ b/templates/components/dashboard/entry.html.twig @@ -9,14 +9,15 @@ {% set is_button = not url and attributes.all|keys|filter(k => k starts with 'hx-')|length > 0 %} {% set body %} {% if icon %}{{ include('_partials/_icon.html.twig', {icon: icon, class: 'size-4 text-muted'}) }}{% endif %} - {% if parts is not null %} - {% for part in parts|filter(p => p is not empty) %} - {% if not loop.first %}{% endif %} - {{ part }} - {% endfor %} - {% else %} - {{ block('content') }} - {% endif %} + + {%- if parts is not null -%} + {%- for part in parts|filter(p => p is not empty) -%} + {% if not loop.first %} {% endif %}{{ part }} + {%- endfor -%} + {%- else -%} + {{ block('content') }} + {%- endif -%} + {% endset %} {% set attrs = attributes.defaults({class: 'entry-link'}).without('url', 'icon', 'parts') %}
  • diff --git a/templates/components/dropdown/hxbutton.html.twig b/templates/components/dropdown/hxbutton.html.twig deleted file mode 100644 index 41ed00e5..00000000 --- a/templates/components/dropdown/hxbutton.html.twig +++ /dev/null @@ -1,17 +0,0 @@ -{% set warning = warning ?? false %} -{% set method = method ?? 'get' %} - diff --git a/templates/components/dropdown/index.html.twig b/templates/components/dropdown/index.html.twig deleted file mode 100644 index 94b2664e..00000000 --- a/templates/components/dropdown/index.html.twig +++ /dev/null @@ -1,15 +0,0 @@ -{#- The "⋯" menu of a row or card (menu_controller.js); fill it with dropdown:link and dropdown:hxbutton -#} -
    - - -
    diff --git a/templates/components/dropdown/link.html.twig b/templates/components/dropdown/link.html.twig deleted file mode 100644 index a66a736d..00000000 --- a/templates/components/dropdown/link.html.twig +++ /dev/null @@ -1,7 +0,0 @@ -{% set warning = warning ?? false %} - - {{ block('content') }} - diff --git a/templates/components/menu.html.twig b/templates/components/menu.html.twig new file mode 100644 index 00000000..0efb4ffa --- /dev/null +++ b/templates/components/menu.html.twig @@ -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' %} +
    + + +
  • - - + + +