From 4aa56e849a11dc2bae00fe3627e35bb2cd46081d Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 19 May 2016 21:41:46 +0200 Subject: [PATCH] Added 'position' column in menu list --- wcfsetup/install/files/acp/templates/menuList.tpl | 2 ++ wcfsetup/install/files/lib/acp/page/MenuListPage.class.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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'; } } -- 2.20.1