[BUGFIX] Misplaced documentation icon in extension manager 09/34809/4
authorXavier Perseguers <xavier@typo3.org>
Sun, 30 Nov 2014 09:13:34 +0000 (10:13 +0100)
committerAlexander Opitz <opitz.alexander@googlemail.com>
Tue, 2 Dec 2014 08:28:18 +0000 (09:28 +0100)
When using EXT:sphinx, the interactive JSON view should take the place of
the always empty SXW view action.

Resolves: #63445
Related: #63430
Releases: master
Change-Id: Ib7f3488ebffb0cc6e6fd5cc0c6c0068c85e0abee
Reviewed-on: http://review.typo3.org/34809
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
typo3/sysext/documentation/Classes/ViewHelpers/FormatsViewHelper.php
typo3/sysext/t3skin/Classes/Slot/IconStyleModifier.php

index 9f8a0ca..803e376 100644 (file)
@@ -64,7 +64,12 @@ class FormatsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHel
                        $output .= ' title="' . htmlspecialchars($title) . '">';
                        $spriteIconHtml = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForFile($extension);
                        $output .= $spriteIconHtml . '</a>' . LF;
-                       $icons[$format->getFormat()] = $output;
+                       $keyFormat = $format->getFormat();
+                       if ($keyFormat === 'json') {
+                               // It should take over the place of sxw which will then never be used
+                               $keyFormat = 'sxw';
+                       }
+                       $icons[$keyFormat] = $output;
                }
                return implode('', array_values($icons));
        }
index 052b222..6d05136 100644 (file)
@@ -109,6 +109,7 @@ class IconStyleModifier {
                't3-icon t3-icon-mimetypes t3-icon-mimetypes-text t3-icon-text-html' => 'fa-file-text-o',
                't3-icon t3-icon-mimetypes t3-icon-mimetypes-word t3-icon-word' => 'fa-file-word-o',
                't3-icon t3-icon-mimetypes t3-icon-mimetypes-x t3-icon-x-sys_language' => 'fa-globe',
+               't3-icon t3-icon-mimetypes t3-icon-mimetypes-text t3-icon-text-js' => 'fa-code',
                't3-icon t3-icon-status t3-icon-status-dialog t3-icon-dialog-error' => 'fa-exclamation-triangle',
                't3-icon t3-icon-status t3-icon-status-dialog t3-icon-dialog-information' => 'fa-info-circle',
                't3-icon t3-icon-status t3-icon-status-status t3-icon-status-locked' => 'fa-lock',