[TASK] Make the extension titles link to the configuration 76/23376/2
authorNicole Cordes <typo3@cordes.co>
Mon, 29 Jul 2013 16:13:53 +0000 (18:13 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 27 Aug 2013 18:33:35 +0000 (20:33 +0200)
In the extension manager make the extension titles link to the
configuration again. This will provide an additional clickable area and
it allows the integrators to continue using the known behavior.

Resolves: #50234
Releases: 6.2, 6.1, 6.0
Change-Id: I120e8fb47628fe118291cbdd57951a0238ebcd71
Reviewed-on: https://review.typo3.org/23376
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/extensionmanager/Classes/ViewHelpers/ConfigureExtensionViewHelper.php
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html

index f78bfbe..a9cf009 100644 (file)
@@ -41,11 +41,12 @@ class ConfigureExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\Act
        /**
         * Renders a configure extension link if the extension has configuration options
         *
-        * @param array $extension
-        * @return string the rendered a tag
+        * @param array $extension Extension configuration array with extension information
+        * @param boolean $forceConfiguration If TRUE the content is only returned if a link could be generated
+        * @return string the rendered tag or child nodes content
         */
-       public function render($extension) {
-               $tag = '';
+       public function render($extension, $forceConfiguration = TRUE) {
+               $content = (string) $this->renderChildren();
                if ($extension['installed'] && file_exists(PATH_site . $extension['siteRelPath'] . '/ext_conf_template.txt')) {
                        $uriBuilder = $this->controllerContext->getUriBuilder();
                        $action = 'showConfigurationForm';
@@ -56,10 +57,13 @@ class ConfigureExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\Act
                        ), 'Configuration');
                        $this->tag->addAttribute('href', $uri);
                        $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.configure', 'extensionmanager'));
-                       $this->tag->setContent(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-extension-configure'));
-                       $tag = $this->tag->render();
+                       $this->tag->setContent($content);
+                       $content = $this->tag->render();
+               } elseif ($forceConfiguration) {
+                       $content = '';
                }
-               return $tag;
+
+               return $content;
        }
 
 }
index 77d8638..0216a29 100644 (file)
@@ -67,7 +67,7 @@
                                        </f:else>
                                </f:if>
 
-                                       <em:image src="../{extension.siteRelPath}/{extension.ext_icon}" alt="{extension.title}" height="16" />{extension.title}
+                                       <em:image src="../{extension.siteRelPath}/{extension.ext_icon}" alt="{extension.title}" height="16" /><em:configureExtension extension="{extension}" forceConfiguration="0">{extension.title}</em:configureExtension>
                                </td>
                                <td>
                                        {extensionKey}
@@ -76,7 +76,7 @@
                                        {extension.version}
                                </td>
                                <td class="icons">
-                                       <em:configureExtension extension="{extension}" />
+                                       <em:configureExtension extension="{extension}"><f:be.buttons.icon icon="actions-system-extension-configure" title="{f:translate(key:'extensionList.configure')}" /></em:configureExtension>
                                        <em:updateScript extensionKey="{extension.key}" />
                                        <em:removeExtension extension="{extension}" />
                                        <f:be.buttons.icon uri="{f:uri.action(action:'downloadExtensionZip',controller:'Action',arguments:'{extension:extension.key}')}" icon="actions-system-extension-download" title="{f:translate(key:'extensionList.downloadzip')}"/>