Add quick navigation dropdown to menuItemAdd.tpl
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 1 Mar 2021 10:17:07 +0000 (11:17 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 1 Mar 2021 10:17:07 +0000 (11:17 +0100)
Resolves #3973

wcfsetup/install/files/acp/templates/menuItemAdd.tpl
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 79bd5492f375c125a1682dcafb4917210de1768f..acf573429391b3f9abbe9d9d4eaea656a5689a7f 100644 (file)
        
        <nav class="contentHeaderNavigation">
                <ul>
+                       {if $action == 'edit'}
+                               {*
+                               Technically this dropdown should check whether the number of menu items is larger than one,
+                               but this is non-trivial with the iterator. It's unlikely that there's only a single menu item,
+                               thus we let this slip.
+                               *}
+                               <li class="dropdown">
+                                       <a class="button dropdownToggle"><span class="icon icon16 fa-sort"></span> <span>{lang}wcf.acp.menu.item.button.choose{/lang}</span></a>
+                                       <div class="dropdownMenu">
+                                               <ul class="scrollableDropdownMenu">
+                                                       {foreach from=$menuItemNodeList item='menuItemNode'}
+                                                               <li{if $menuItemNode->itemID == $itemID} class="active"{/if}><a href="{link controller='MenuItemEdit' object=$menuItemNode}{/link}">{if $menuItemNode->getDepth() > 1}{@"&nbsp;&nbsp;&nbsp;&nbsp;"|str_repeat:($menuItemNode->getDepth() - 1)}{/if}{$menuItemNode->getTitle()}</a></li>
+                                                       {/foreach}
+                                               </ul>
+                                       </div>
+                               </li>
+                       {/if}
                        <li><a href="{link controller='MenuItemList' id=$menuID}{/link}" class="button"><span class="icon icon16 fa-list"></span> <span>{lang}wcf.acp.menu.item.list{/lang}</span></a></li>
                        
                        {event name='contentHeaderNavigation'}
index aec7d698b92efeb1c7f9091e0e50614f7b2c4960..bca9a150134db0d9adeb6f321c0041f5ea91e143 100644 (file)
@@ -1226,6 +1226,7 @@ ACHTUNG: Die oben genannten Meldungen sind stark gekürzt. Sie können Details z
                <item name="wcf.acp.menu.link.systemCheck"><![CDATA[Systemüberprüfung]]></item>
                <item name="wcf.acp.menu.link.devtools.missingLanguageItem.list"><![CDATA[Fehlende Texte]]></item>
                <item name="wcf.acp.menu.link.log.email"><![CDATA[E-Mails]]></item>
+               <item name="wcf.acp.menu.item.button.choose"><![CDATA[Menüpunkt wählen]]></item>
        </category>
        <category name="wcf.acp.modificationLog">
                <item name="wcf.acp.modificationLog.list"><![CDATA[Globales Änderungsprotokoll]]></item>
index 54d0e79fc1b0d263ce140689da910079e55ec4c2..6ddd28ca61ddb2dc76edf0a885b5d53b08fc0ddb 100644 (file)
@@ -1203,6 +1203,7 @@ ATTENTION: The messages listed above are greatly shortened. You can view details
                <item name="wcf.acp.menu.link.systemCheck"><![CDATA[System Check]]></item>
                <item name="wcf.acp.menu.link.devtools.missingLanguageItem.list"><![CDATA[Missing Phrases]]></item>
                <item name="wcf.acp.menu.link.log.email"><![CDATA[Emails]]></item>
+               <item name="wcf.acp.menu.item.button.choose"><![CDATA[Choose Menu Item]]></item>
        </category>
        <category name="wcf.acp.modificationLog">
                <item name="wcf.acp.modificationLog.list"><![CDATA[Global Modification Log]]></item>