[BUGFIX] EM does not always show description 15/26615/4
authorMichiel Roos <michiel@maxserv.nl>
Thu, 2 Jan 2014 08:23:17 +0000 (09:23 +0100)
committerXavier Perseguers <xavier@typo3.org>
Fri, 3 Jan 2014 14:44:57 +0000 (15:44 +0100)
When an extension (like rsaauth) has configuration options in the
extension manager, the description is not shown as a tooltip when hovering
over the extension name. Then it will only show 'Configure'. Which is not
so helpful.

The ConfigureExtensionViewHelper can be modified to not add a title
attribute on the link. This will ensure that the title attribute of the td
is shown.

Change-Id: Ie6de8033545856cbe4a3689366e05d5d2ad3dc7b
Resolves: #54689
Releases: 6.2
Reviewed-on: https://review.typo3.org/26615
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/extensionmanager/Classes/ViewHelpers/ConfigureExtensionViewHelper.php
typo3/sysext/extensionmanager/Resources/Private/Language/locallang.xlf
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html

index 6f31169..35e218e 100644 (file)
@@ -43,20 +43,28 @@ class ConfigureExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\Act
         *
         * @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
+        * @param boolean $showDescription If TRUE the extension description is also shown in the title attribute
         * @return string the rendered tag or child nodes content
         */
-       public function render($extension, $forceConfiguration = TRUE) {
-               $content = (string) $this->renderChildren();
+       public function render($extension, $forceConfiguration = TRUE, $showDescription = FALSE) {
+               $content = (string)$this->renderChildren();
                if ($extension['installed'] && file_exists(PATH_site . $extension['siteRelPath'] . '/ext_conf_template.txt')) {
                        $uriBuilder = $this->controllerContext->getUriBuilder();
                        $action = 'showConfigurationForm';
-                       $uri = $uriBuilder->reset()->uriFor($action, array(
-                               'extension' => array(
-                                       'key' => $extension['key']
-                               )
-                       ), 'Configuration');
+                       $uri = $uriBuilder->reset()->uriFor(
+                               $action,
+                               array('extension' => array('key' => $extension['key'])),
+                               'Configuration'
+                       );
+                       if ($showDescription) {
+                               $title = $extension['description'] . PHP_EOL .
+                                       \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.clickToConfigure', 'extensionmanager');
+
+                       } else {
+                               $title = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.configure', 'extensionmanager');
+                       }
                        $this->tag->addAttribute('href', $uri);
-                       $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.configure', 'extensionmanager'));
+                       $this->tag->addAttribute('title', $title);
                        $this->tag->setContent($content);
                        $content = $this->tag->render();
                } elseif ($forceConfiguration) {
index c1554ee..f37c137 100644 (file)
@@ -66,6 +66,9 @@
                        <trans-unit id="updateScript.none" xml:space="preserve">
                                <source>No update necessary.</source>
                        </trans-unit>
+                       <trans-unit id="extensionList.clickToConfigure" xml:space="preserve">
+                               <source>(Click to configure)</source>
+                       </trans-unit>
                        <trans-unit id="extensionList.configure" xml:space="preserve">
                                <source>Configure</source>
                        </trans-unit>
index f98b356..74c0530 100644 (file)
@@ -74,7 +74,7 @@
                                        </f:else>
                                </f:if>
 
-                                       <img class="ext-icon" src="../{extension.siteRelPath}/{extension.ext_icon}" alt="{extension.title}" /><em:configureExtension extension="{extension}" forceConfiguration="0">{extension.title}</em:configureExtension>
+                                       <img class="ext-icon" src="../{extension.siteRelPath}/{extension.ext_icon}" alt="{extension.title}" /><em:configureExtension extension="{extension}" forceConfiguration="0" showDescription="1">{extension.title}</em:configureExtension>
                                </td>
                                <td>
                                        {extensionKey}