Commit badeec39 authored by Frank Nägler's avatar Frank Nägler Committed by Anja Leichsenring
Browse files

[TASK] Replace icon by the IconFactory actions-view-go-back

Resolves: #69595
Releases: master
Change-Id: I1190490dfa23cdc206f1cffbd7975ef9d668c786
Reviewed-on: http://review.typo3.org/43109

Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 0d326f07
......@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Core\Http\Response;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......@@ -131,7 +133,8 @@ class ElementHistoryController implements \TYPO3\CMS\Core\Http\ControllerInterfa
// Start history object
$historyObj = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\History\RecordHistory::class);
if ($historyObj->returnUrl) {
$buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
return $buttons;
}
......
......@@ -494,7 +494,7 @@ class ElementInformationController implements \TYPO3\CMS\Core\Http\ControllerInt
if ($returnUrl) {
$backLink .= '
<a class="btn btn-primary" href="' . htmlspecialchars($returnUrl) . '>
' . IconUtility::getSpriteIcon('actions-view-go-back') . '
' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '
' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:back', TRUE) . '
</a>';
}
......
......@@ -272,6 +272,7 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface
'csh' => '',
'back' => ''
);
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
if ($this->page_id) {
if ((string)$this->table == 'pages') {
$buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_pages');
......@@ -279,7 +280,7 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface
$buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs');
}
if ($this->R_URI) {
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
}
return $buttons;
......
......@@ -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;
use TYPO3\CMS\Core\Utility\PathUtility;
......@@ -339,10 +341,11 @@ class NewContentElementController implements \TYPO3\CMS\Core\Http\ControllerInte
'csh' => '',
'back' => ''
);
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
if ($this->id && $this->access) {
$buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'new_ce');
if ($this->R_URI) {
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
}
return $buttons;
......
......@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Backend\Controller\File;
*/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
......@@ -234,9 +236,10 @@ class CreateFolderController implements \TYPO3\CMS\Core\Http\ControllerInterface
$docHeaderButtons = array(
'back' => ''
);
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
// Add the HTML as a section:
$markerArray = array(
......
......@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Backend\Controller\File;
*/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
......@@ -134,7 +136,8 @@ class FileUploadController implements \TYPO3\CMS\Core\Http\ControllerInterface {
);
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
$this->content .= $this->doc->endPage();
......
......@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Backend\Controller\File;
*/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
......@@ -162,7 +164,8 @@ class RenameFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
$docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename');
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
// Add the HTML as a section:
$markerArray = array(
......
......@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Backend\Controller\File;
use TYPO3\CMS\Backend\Template\DocumentTemplate;
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\Resource\Exception\InsufficientFileAccessPermissionsException;
use TYPO3\CMS\Core\Resource\Folder;
use TYPO3\CMS\Core\Resource\ResourceFactory;
......@@ -186,9 +188,10 @@ class ReplaceFileController implements \TYPO3\CMS\Core\Http\ControllerInterface
$docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename');
// Back
if ($this->returnUrl) {
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl))
. '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">'
. IconUtility::getSpriteIcon('actions-view-go-back')
. $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)
. '</a>';
}
// Add the HTML as a section:
......
......@@ -329,7 +329,7 @@ class NewRecordController implements \TYPO3\CMS\Core\Http\ControllerInterface {
}
// Back
if ($this->R_URI) {
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
if (is_array($this->pageinfo) && $this->pageinfo['uid']) {
// View
......
......@@ -325,7 +325,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
$href = htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl, array('id' => $this->id)));
$buttons['back'] = '<a href="' . $href . '" class="typo3-goBack" title="'
. $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">'
. IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
. $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
}
return $buttons;
......
......@@ -316,7 +316,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass {
'id' => $this->id
);
$aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
$buttons['back'] = '<a href="' . htmlspecialchars($aHref) . '" class="typo3-goBack" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
$buttons['back'] = '<a href="' . htmlspecialchars($aHref) . '" class="typo3-goBack" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
}
// Shortcut
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment