From: Marcel Werk Date: Thu, 19 May 2016 19:41:46 +0000 (+0200) Subject: Added 'position' column in menu list X-Git-Tag: 3.0.0_Beta_1~1709 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4aa56e849a11dc2bae00fe3627e35bb2cd46081d;p=GitHub%2FWoltLab%2FWCF.git Added 'position' column in menu list --- diff --git a/wcfsetup/install/files/acp/templates/menuList.tpl b/wcfsetup/install/files/acp/templates/menuList.tpl index 7380782573..8fe4c78e24 100644 --- a/wcfsetup/install/files/acp/templates/menuList.tpl +++ b/wcfsetup/install/files/acp/templates/menuList.tpl @@ -35,6 +35,7 @@ {lang}wcf.global.objectID{/lang} {lang}wcf.global.name{/lang} + {lang}wcf.acp.box.position{/lang} {lang}wcf.acp.menu.items{/lang} {event name='columnHeads'} @@ -57,6 +58,7 @@ {@$menu->menuID} {lang}{$menu->title}{/lang} + {$menu->position} {#$menu->items} {event name='columns'} diff --git a/wcfsetup/install/files/lib/acp/page/MenuListPage.class.php b/wcfsetup/install/files/lib/acp/page/MenuListPage.class.php index aebc64d68f..cbcefbd22e 100644 --- a/wcfsetup/install/files/lib/acp/page/MenuListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/MenuListPage.class.php @@ -37,7 +37,7 @@ class MenuListPage extends SortablePage { /** * @inheritDoc */ - public $validSortFields = ['menuID', 'title', 'items']; + public $validSortFields = ['menuID', 'title', 'position', 'items']; /** * @inheritDoc @@ -45,6 +45,6 @@ class MenuListPage extends SortablePage { protected function initObjectList() { parent::initObjectList(); - $this->objectList->sqlSelects .= '(SELECT COUNT(*) FROM wcf'.WCF_N.'_menu_item WHERE menuID = menu.menuID) AS items'; + $this->objectList->sqlSelects .= '(SELECT COUNT(*) FROM wcf'.WCF_N.'_menu_item WHERE menuID = menu.menuID) AS items, (SELECT position FROM wcf'.WCF_N.'_box WHERE menuID = menu.menuID) AS position'; } }