[BUGFIX] Use Sprite Icon for new Template Button 80/34580/2
authorBenjamin Mack <benni@typo3.org>
Tue, 25 Nov 2014 08:18:11 +0000 (09:18 +0100)
committerBenjamin Mack <benni@typo3.org>
Tue, 25 Nov 2014 11:13:00 +0000 (12:13 +0100)
The icon in the docheader of
the Template module shows
a "create new extension template"
button which is not done via
SpriteIcon but with an old image.

This is now replaced via a Sprite Icon
and an anchor instead of a button.

Resolves: #63309
Releases: master
Change-Id: I3cae9f6454a785572e8cf51f66bfbb77b611951e
Reviewed-on: http://review.typo3.org/34580
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php

index 997214d..204a629 100644 (file)
@@ -248,7 +248,11 @@ class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseS
                        $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
                        if ($this->extClassConf['name'] == 'TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateInformationModuleFunctionController') {
                                // NEW button
-                               $buttons['new'] = '<input type="image" class="c-inputButton" name="createExtension" value="New"' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/new_el.gif', '') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:db_new.php.pagetitle', TRUE) . '" />';
+                               $urlParameters = array(
+                                       'id' => $this->id,
+                                       'template' => 'all'
+                               );
+                               $buttons['new'] = '<a href="' . BackendUtility::getModuleUrl('web_ts', array_merge($urlParameters, array('createExtension' => 'new'))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:db_new.php.pagetitle', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-new') . '</a>';
                                if (!empty($this->e) && !GeneralUtility::_POST('abort') && !GeneralUtility::_POST('saveclose')) {
                                        // no NEW-button while edit
                                        $buttons['new'] = '';