Commit d8a2c80f authored by Philipp Gampe's avatar Philipp Gampe Committed by Wouter Wolters
Browse files

[BUGFIX] file_upload missing back icon

Add a back button to:
 * file_upload
 * file_rename
 * file_newfolder

The code is taken from recordlist.

Resolves: #48065
Releases: 6.2, 6.1, 6.0
Change-Id: If328dd20f09875ab486fa3419ec5de9df8955956
Reviewed-on: https://review.typo3.org/20859
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Felix Kopp
Tested-by: Felix Kopp
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
parent 23e5f4d8
......@@ -221,7 +221,13 @@ class CreateFolderController {
$pageContent .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.newfile'), $code);
$pageContent .= $this->doc->sectionEnd();
$pageContent .= '</form>';
$docHeaderButtons = array();
$docHeaderButtons = array(
'back' => ''
);
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
}
// Add the HTML as a section:
$markerArray = array(
'CSH' => $docHeaderButtons['csh'],
......
......@@ -125,7 +125,8 @@ class FileUploadController {
$pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle')) . $this->doc->section('', $form);
// Header Buttons
$docHeaderButtons = array(
'csh' => BackendUtility::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH'])
'csh' => BackendUtility::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH']),
'back' => ''
);
$markerArray = array(
'CSH' => $docHeaderButtons['csh'],
......@@ -133,6 +134,10 @@ class FileUploadController {
'CONTENT' => $pageContent,
'PATH' => $this->title
);
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
}
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
......
......@@ -161,8 +161,14 @@ class RenameFileController {
$code .= '</form>';
// Add the HTML as a section:
$pageContent .= $code;
$docHeaderButtons = array();
$docHeaderButtons = array(
'back' => ''
);
$docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']);
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
}
// Add the HTML as a section:
$markerArray = array(
'CSH' => $docHeaderButtons['csh'],
......
......@@ -26,7 +26,7 @@
<!-- ###BUTTON_GROUP_WRAP### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
<!-- ###BUTTON_GROUP4### -->###BACK###<!-- ###BUTTON_GROUP4### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUPS_RIGHT### -->
......
......@@ -26,7 +26,7 @@
<!-- ###BUTTON_GROUP_WRAP### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
<!-- ###BUTTON_GROUP4### -->###BACK###<!-- ###BUTTON_GROUP4### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUPS_RIGHT### -->
......
......@@ -26,7 +26,7 @@
<!-- ###BUTTON_GROUP_WRAP### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
<!-- ###BUTTON_GROUP4### -->###BACK###<!-- ###BUTTON_GROUP4### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUPS_RIGHT### -->
......
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