From 0d326f07e6ba467846dca740fa9070b07ba35126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Na=CC=88gler?= <frank.naegler@typo3.org> Date: Mon, 7 Sep 2015 23:47:30 +0200 Subject: [PATCH] [TASK] Replace icon by the IconFactory actions-view-go-up Resolves: #69596 Releases: master Change-Id: I26ac73af5e2d863753c229b4aef3bfdc3c852456 Reviewed-on: http://review.typo3.org/43110 Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> --- .../ContentElement/MoveElementController.php | 12 ++++++++++-- typo3/sysext/filelist/Classes/FileList.php | 7 +++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php b/typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php index c95530e38af0..a9d8fa08e7a4 100644 --- a/typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php +++ b/typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php @@ -19,6 +19,8 @@ use Psr\Http\Message\ResponseInterface; use TYPO3\CMS\Core\Http\Response; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; +use TYPO3\CMS\Core\Imaging\Icon; +use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; /** @@ -82,6 +84,11 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface */ public $content; + /** + * @var IconFactory + */ + protected $iconFactory; + /** * Constructor */ @@ -114,6 +121,7 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface // Starting document content (header): $this->content = ''; $this->content .= $this->doc->header($this->getLanguageService()->getLL('movingElement')); + $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); } /** @@ -169,7 +177,7 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface $pidPageInfo = BackendUtility::readPageAccess($pageInfo['pid'], $this->perms_clause); if (is_array($pidPageInfo)) { if ($backendUser->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) { - $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => (int)$pageInfo['pid'], 'moveUid' => $this->moveUid))) . '">' . IconUtility::getSpriteIcon('actions-view-go-up') . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />'; + $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => (int)$pageInfo['pid'], 'moveUid' => $this->moveUid))) . '">' . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />'; } else { $code .= IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />'; } @@ -219,7 +227,7 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array( 'uid' => (int)$pageInfo['pid'], 'moveUid' => $this->moveUid - ))) . '">' . IconUtility::getSpriteIcon('actions-view-go-up') . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />'; + ))) . '">' . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />'; } else { $code .= IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />'; } diff --git a/typo3/sysext/filelist/Classes/FileList.php b/typo3/sysext/filelist/Classes/FileList.php index 6d3f45ac7e13..d818d3c3a45b 100644 --- a/typo3/sysext/filelist/Classes/FileList.php +++ b/typo3/sysext/filelist/Classes/FileList.php @@ -470,10 +470,9 @@ class FileList extends AbstractRecordList { $parentFolder = $currentFolder->getParentFolder(); if ($parentFolder->getIdentifier() !== $currentFolder->getIdentifier() && $currentStorage->isWithinFileMountBoundaries($parentFolder)) { $levelUp = $this->linkWrapDir( - IconUtility::getSpriteIcon( - 'actions-view-go-up', - array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel', TRUE)) - ), + '<span title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel', TRUE) . '">' + . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL) + . '</span>', $parentFolder ); } -- GitLab