[BUGFIX] Add back button from info page to element browser wizard
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Controller / ContentElement / ElementInformationController.php
index 117412c..2be0e14 100644 (file)
@@ -212,6 +212,7 @@ class ElementInformationController {
                        $this->content .= $this->renderPreview();
                        $this->content .= $this->renderPropertiesAsTable();
                        $this->content .= $this->renderReferences();
+                       $this->content .= $this->renderBackButton();
                }
        }
 
@@ -436,6 +437,24 @@ class ElementInformationController {
        }
 
        /**
+        * Render a back button, if a returnUrl was provided
+        *
+        * @return string
+        */
+       protected function renderBackButton() {
+               $backLink = '';
+               $returnUrl = GeneralUtility::_GET('returnUrl');
+               if ($returnUrl) {
+                       $backLink .= '
+                               <a class="btn btn-primary" href="' . htmlspecialchars($returnUrl) . '>
+                                       ' . IconUtility::getSpriteIcon('actions-view-go-back') . '
+                                       ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:back', TRUE) . '
+                               </a>';
+               }
+               return $backLink;
+       }
+
+       /**
         * Renders file properties as html table
         *
         * @param array $fieldList