Fix obsolete 'caret-down' icon in menus
authorMarcel Werk <burntime@woltlab.com>
Fri, 1 Mar 2024 17:17:40 +0000 (18:17 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 1 Mar 2024 17:17:40 +0000 (18:17 +0100)
The icon was incorrectly shown in all menus and all levels.

com.woltlab.wcf/templates/__menu.tpl
wcfsetup/install/files/lib/data/menu/Menu.class.php

index b82a58d2349e7ff968c036fc8447c943dfdaf444..a5d2b70b026108d3b59e049000552f69b7be9c9d 100644 (file)
@@ -9,7 +9,7 @@
                                        {if $menuItemNode->getOutstandingItems() > 0}
                                                <span class="boxMenuLinkOutstandingItems badge badgeUpdate" aria-label="{lang}wcf.page.menu.outstandingItems{/lang}">{#$menuItemNode->getOutstandingItems()}</span>
                                        {/if}
-                                       {if $menuItemNode->hasChildren()}
+                                       {if $menuIdentifier == 'com.woltlab.wcf.MainMenu' && $menuItemNode->hasChildren() && $menuItemNode->getDepth() == 1}
                                                {icon name='caret-down' type='solid'}
                                        {/if}
                                </a>
index d6fddbd973dc9f4861e0c7e33fcdc2b7a75835fe..05a94d707b9ebdd4b17738617d9b308cdab24b1e 100644 (file)
@@ -89,6 +89,7 @@ class Menu extends DatabaseObject implements ITitledObject
         WCF::getTPL()->assign([
             'menuItemNodeList' => $this->getMenuItemNodeList(),
             'menuTitle' => $this->getTitle(),
+            'menuIdentifier' => $this->identifier,
         ]);
 
         return WCF::getTPL()->fetch('__menu');