From 72e808b38fc808f37486a3403461eeda12992d12 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Mon, 18 Dec 2023 15:54:55 +0000
Subject: [PATCH] fixes #3552

Closes #3552

Merge request studip/studip!2440
---
 templates/header.php                  |  3 ++-
 templates/shared/contentgroup-row.php | 10 +++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/templates/header.php b/templates/header.php
index 4b1d8ddedfc..73e37135ed8 100644
--- a/templates/header.php
+++ b/templates/header.php
@@ -190,7 +190,8 @@ if ($navigation) {
                         $action_menu->addLink(
                             URLHelper::getURL($subnav->getURL(), [], true),
                             $subnav->getTitle(),
-                            $subnav->getImage()
+                            $subnav->getImage(),
+                            $subnav->getLinkAttributes()
                         );
                     }
                     SkipLinks::addIndex(_('Profilmenü'), 'header_avatar_image_link', 1, false);
diff --git a/templates/shared/contentgroup-row.php b/templates/shared/contentgroup-row.php
index eecb35de56c..a1052ab9d44 100644
--- a/templates/shared/contentgroup-row.php
+++ b/templates/shared/contentgroup-row.php
@@ -6,7 +6,7 @@
         <?= $image ?>
     </a>
     <div class="action-menu-content">
-    	<? if (!empty($label)): ?>
+        <? if (!empty($label)): ?>
         <div class="action-menu-title" aria-hidden="true">
             <?= htmlReady(_($label)) ?>
         </div>
@@ -19,7 +19,7 @@
 
                 <? if ($has_link_icons): ?>
                     <? if ($action['icon']): ?>
-                        <?= $action['icon'] ?>
+                        <?= $action['icon']->asImg(false, ['class' => 'action-menu-item-icon']) ?>
                     <? else: ?>
                         <span class="action-menu-no-icon"></span>
                     <? endif; ?>
@@ -29,7 +29,11 @@
             <? elseif ($action['type'] === 'button'): ?>
                 <label>
                 <? if ($action['icon']): ?>
-                    <?= $action['icon']->asInput(['name' => $action['name']]) ?>
+                    <?= $action['icon']->asInput(false, [
+                        'class' => 'action-menu-item-icon',
+                        'name'  => $action['name'],
+                        'title' => $action['label'],
+                    ]) ?>
                 <? else: ?>
                     <span class="action-menu-no-icon"></span>
                     <button type="submit" name="<?= htmlReady($action['name']) ?>" style="display: none;"></button>
-- 
GitLab