From 18be7a1ffcdb5f65d09d9ace29fa4b0343fb6931 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 3 Feb 2019 15:22:58 +0100 Subject: [PATCH] Make devtools project list sortable Close #2842 --- .../files/acp/templates/devtoolsProjectList.tpl | 6 +++--- .../acp/page/DevtoolsProjectListPage.class.php | 15 +++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/devtoolsProjectList.tpl b/wcfsetup/install/files/acp/templates/devtoolsProjectList.tpl index d50f541b77..a8fa0ec277 100644 --- a/wcfsetup/install/files/acp/templates/devtoolsProjectList.tpl +++ b/wcfsetup/install/files/acp/templates/devtoolsProjectList.tpl @@ -34,9 +34,9 @@ - - - + + + {event name='columnHeads'} diff --git a/wcfsetup/install/files/lib/acp/page/DevtoolsProjectListPage.class.php b/wcfsetup/install/files/lib/acp/page/DevtoolsProjectListPage.class.php index bf6af93a83..efae7d3ca5 100644 --- a/wcfsetup/install/files/lib/acp/page/DevtoolsProjectListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/DevtoolsProjectListPage.class.php @@ -1,7 +1,7 @@ * @package WoltLabSuite\Core\Acp\Page * @since 3.1 + * + * @property DevtoolsProjectList $objectList */ -class DevtoolsProjectListPage extends MultipleLinkPage { +class DevtoolsProjectListPage extends SortablePage { /** * @inheritDoc */ public $activeMenuItem = 'wcf.acp.menu.link.devtools.project.list'; + /** + * @inheritDoc + */ + public $defaultSortField = 'name'; + /** * @inheritDoc */ @@ -39,7 +46,7 @@ class DevtoolsProjectListPage extends MultipleLinkPage { public $neededPermissions = ['admin.configuration.package.canInstallPackage']; /** - * @var DevtoolsProjectList + * @inheritDoc */ - public $objectList; + public $validSortFields = ['projectID', 'name', 'path']; } -- 2.20.1
{lang}wcf.global.objectID{/lang}{lang}wcf.acp.devtools.project.name{/lang}{lang}wcf.acp.devtools.project.path{/lang}{lang}wcf.global.objectID{/lang}{lang}wcf.acp.devtools.project.name{/lang}{lang}wcf.acp.devtools.project.path{/lang}