[TASK] Replace icon by the IconFactory actions-view-go-up 10/43110/2
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 7 Sep 2015 21:47:30 +0000 (23:47 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 8 Sep 2015 05:58:18 +0000 (07:58 +0200)
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>
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/filelist/Classes/FileList.php

index c95530e..a9d8fa0 100644 (file)
@@ -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;
 
 /**
@@ -83,6 +85,11 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface
        public $content;
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
         * Constructor
         */
        public function __construct() {
@@ -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 />';
                                                        }
index 6d3f45a..d818d3c 100644 (file)
@@ -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
                                );
                        }