feat: add a Mein Account group to the main menu and lock the page while the drawer is open

This commit is contained in:
fromme committed 2026-11-13 15:04:29 +01:00
1 parent 4530d2434b
commit 8a02b28d00
6 files changed
+164 -24

No files matched your search

+3 -7
View File
@@ -1,6 +1,7 @@
{#
The account menu behind the user's picture: own profile, the other areas (MenuBuilder::createUserMenu)
and logout. Opens on click, closes on a click elsewhere and on Escape.
The account menu behind the user's picture: own profile, the other areas and logout
(MenuBuilder::createUserMenu). Opens on click, closes on a click elsewhere and on Escape. Only from lg
up; below that the same items are reached through the main menu in the drawer.
#}
{% set user_menu = knp_menu_get('default_user') %}
<div class="relative"
@@ -22,11 +23,6 @@
<div class="hidden absolute right-0 top-full mt-2 z-40 min-w-56 border border-line bg-white py-1 text-sm shadow-lg"
role="menu"
{{ stimulus_target('toggle', 'toggle') }}>
{% if app.user.teamer %}
<a href="{{ path('app_teamer_profile_index') }}" class="menu-item flex items-center gap-x-3" role="menuitem">{{ icon('user', 'w-5 h-5 text-muted') }}Mein Profil</a>
{% elseif is_granted('ROLE_ADMINISTRATIVE') %}
<a href="{{ path('app_administrative_profile_index') }}" class="menu-item flex items-center gap-x-3" role="menuitem">{{ icon('user', 'w-5 h-5 text-muted') }}Mein Profil</a>
{% endif %}
{% for item in user_menu.children %}
{% if loop.last %}<hr class="my-1 border-line">{% endif %}
<a href="{{ item.uri }}" class="menu-item flex items-center gap-x-3" role="menuitem">{{ icon(item.extras.icon, 'w-5 h-5 text-muted') }}{{ item.label }}</a>