[TASK] Add indexed search icon to plugin wizard 34/32634/3
authorKay Strobach <typo3@kay-strobach.de>
Sun, 26 Feb 2012 20:03:25 +0000 (21:03 +0100)
committerXavier Perseguers <xavier@typo3.org>
Mon, 8 Sep 2014 09:57:52 +0000 (11:57 +0200)
Adds a small icon to the plugin wizard to avoid the hacky 2 click access.
The icon is added to the tab "Plug-Ins".

Change-Id: Ib0b9705acaf69c0c49de660174c536caedda9292
Resolves: #34298
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/9221
Reviewed-by: Kay Strobach <typo3@kay-strobach.de>
Tested-by: Kay Strobach <typo3@kay-strobach.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-on: http://review.typo3.org/32634

typo3/sysext/indexed_search/ext_tables.php
typo3/sysext/indexed_search/pi/ce_wiz.png [new file with mode: 0644]
typo3/sysext/indexed_search/pi/class.tx_indexed_search_pi_wizicon.php [new file with mode: 0644]
typo3/sysext/indexed_search/pi/locallang.xlf

index d42e36f..7a59ff7 100644 (file)
@@ -22,6 +22,9 @@ if (TYPO3_MODE === 'BE') {
                NULL,
                'LLL:EXT:indexed_search/locallang.xlf:mod2_indexed_search'
        );
+
+       $GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses']['tx_indexed_search_pi_wizicon'] =
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'pi/class.tx_indexed_search_pi_wizicon.php';
 }
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('index_config');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('index_config', 'EXT:indexed_search/locallang_csh_indexcfg.xlf');
\ No newline at end of file
diff --git a/typo3/sysext/indexed_search/pi/ce_wiz.png b/typo3/sysext/indexed_search/pi/ce_wiz.png
new file mode 100644 (file)
index 0000000..225b43a
Binary files /dev/null and b/typo3/sysext/indexed_search/pi/ce_wiz.png differ
diff --git a/typo3/sysext/indexed_search/pi/class.tx_indexed_search_pi_wizicon.php b/typo3/sysext/indexed_search/pi/class.tx_indexed_search_pi_wizicon.php
new file mode 100644 (file)
index 0000000..68c65b9
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Icon for plugin wizard
+ */
+class tx_indexed_search_pi_wizicon {
+
+       /**
+        * Adds the indexed_search pi1 wizard icon
+        *
+        * @param array $wizardItems Input array with wizard items for plugins
+        * @return array Modified input array, having the item for indexed_search pi1 added.
+        */
+       public function proc($wizardItems) {
+               $wizardItems['plugins_tx_indexed_search'] = array(
+                       'icon' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('indexed_search') . 'pi/ce_wiz.png',
+                       'title' => $GLOBALS['LANG']->sL('LLL:EXT:indexed_search/pi/locallang.xlf:pi_wizard_title'),
+                       'description' => $GLOBALS['LANG']->sL('LLL:EXT:indexed_search/pi/locallang.xlf:pi_wizard_description'),
+                       'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=indexed_search'
+               );
+               return $wizardItems;
+       }
+
+}
index e5e177c..be3445e 100644 (file)
@@ -251,6 +251,12 @@ All search words are converted to lowercase.</source>
                        <trans-unit id="maketitle_matches" xml:space="preserve">
                                <source>matches</source>
                        </trans-unit>
+                       <trans-unit id="pi_wizard_title" xml:space="preserve">
+                               <source>Indexed Search</source>
+                       </trans-unit>
+                       <trans-unit id="pi_wizard_description" xml:space="preserve">
+                               <source>Search based on a database stored index.</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>