From daa922784caeeb558402aa3b806045a0b9980583 Mon Sep 17 00:00:00 2001 From: Georg Ringer <georg.ringer@gmail.com> Date: Thu, 16 Feb 2017 16:06:51 +0100 Subject: [PATCH] [TASK] Improve page tree in access module If the root page is selected, the following is improved: - show the sitename instead of '[root-level]' - show the world icon for the first pages (all with pid = 0) Resolves: #79857 Releases: master Change-Id: I449a34e356ec43f8679bb9cdcd4c790fd4701004 Reviewed-on: https://review.typo3.org/51719 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Thomas Hohn <thomas@hohn.dk> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php | 3 ++- .../sysext/beuser/Classes/Controller/PermissionController.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php b/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php index a1fd88e4b2cf..afd4c79cb85a 100644 --- a/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php +++ b/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php @@ -689,7 +689,8 @@ abstract class AbstractTreeView } $title = $this->showDefaultTitleAttribute ? htmlspecialchars('UID: ' . $row['uid']) : $this->getTitleAttrib($row); $iconFactory = GeneralUtility::makeInstance(IconFactory::class); - $icon = '<span title="' . $title . '">' . $iconFactory->getIconForRecord($this->table, $row, Icon::SIZE_SMALL)->render() . '</span>'; + $icon = $row['pid'] === 0 ? $iconFactory->getIcon('apps-pagetree-folder-root', Icon::SIZE_SMALL) : $iconFactory->getIconForRecord($this->table, $row, Icon::SIZE_SMALL); + $icon = '<span title="' . $title . '">' . $icon->render() . '</span>'; return $this->wrapIcon($icon, $row); } diff --git a/typo3/sysext/beuser/Classes/Controller/PermissionController.php b/typo3/sysext/beuser/Classes/Controller/PermissionController.php index 6317dedf09e5..e731d9c42798 100644 --- a/typo3/sysext/beuser/Classes/Controller/PermissionController.php +++ b/typo3/sysext/beuser/Classes/Controller/PermissionController.php @@ -210,7 +210,7 @@ class PermissionController extends ActionController public function indexAction() { if (!$this->id) { - $this->pageInfo = ['title' => '[root-level]', 'uid' => 0, 'pid' => 0]; + $this->pageInfo = ['title' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], 'uid' => 0, 'pid' => 0]; } if ($this->getBackendUser()->workspace != 0) { @@ -280,7 +280,7 @@ class PermissionController extends ActionController $this->view->assign('depth', $this->depth); if (!$this->id) { - $this->pageInfo = ['title' => '[root-level]', 'uid' => 0, 'pid' => 0]; + $this->pageInfo = ['title' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], 'uid' => 0, 'pid' => 0]; } if ($this->getBackendUser()->workspace != 0) { // Adding FlashMessage with the permission setting matrix: -- GitLab