RESOLVED - # 6517: Add icons and grouping to the page type selector
authorIngo Renner <ingo.renner@typo3.org>
Sat, 13 Oct 2007 19:06:09 +0000 (19:06 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Sat, 13 Oct 2007 19:06:09 +0000 (19:06 +0000)
http://bugs.typo3.org/view.php?id=6517

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2548 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
t3lib/stddb/tables.php
typo3/sysext/cms/ext_tables.php
typo3/sysext/cms/locallang_tca.xml

index 641d87d..cc63620 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-13  Ingo Renner  <ingo@typo3.org>
+
+       * Fixed bug 6517: Add icons and grouping to the page type selector
+
 2007-10-09  Benjamin Mack  <mack@xnos.org>
 
        * (minor) indexed_search - Added info where additional doc. can be found
index 4aa1fa0..d8ae2ff 100755 (executable)
@@ -1546,7 +1546,7 @@ class t3lib_TCEforms      {
                $item.= '</select>';
 
                        // Create icon table:
-               if (count($selicons))   {
+               if (count($selicons) && !$config['noIconsBelowSelect']) {
                        $item.='<table border="0" cellpadding="0" cellspacing="0" class="typo3-TCEforms-selectIcons">';
                        $selicon_cols = intval($config['selicon_cols']);
                        if (!$selicon_cols)     $selicon_cols=count($selicons);
index 507f59a..7855002 100755 (executable)
@@ -162,11 +162,13 @@ $TCA['pages'] = Array (
                        'config' => Array (
                                'type' => 'select',
                                'items' => Array (
-                                       Array('LLL:EXT:lang/locallang_tca.php:doktype.I.0', '1'),
-                                       Array('LLL:EXT:lang/locallang_tca.php:doktype.I.1', '254'),
-                                       Array('LLL:EXT:lang/locallang_tca.php:doktype.I.2', '255')
+                                       array('LLL:EXT:lang/locallang_tca.php:doktype.I.0', '1', 'i/pages.gif'),
+                                       array('LLL:EXT:lang/locallang_tca.php:doktype.I.1', '254', 'i/sysf.gif'),
+                                       array('LLL:EXT:lang/locallang_tca.php:doktype.I.2', '255', 'i/recycler.gif')
                                ),
-                               'default' => '1'
+                               'default' => '1',
+                               'iconsInOptionTags' => 1,
+                               'noIconsBelowSelect' => 1
                        )
                ),
                'title' => Array (
index 6179287..79470c3 100755 (executable)
@@ -65,17 +65,29 @@ if (TYPO3_MODE=='BE')       {
                $TCA['pages']['columns']['doktype']['config']['items'],
                1,
                0,
-               Array(
-                       Array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.0', '2'),
-                       Array('LLL:EXT:lang/locallang_general.php:LGL.external', '3'),
-                       Array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.2', '4'),
-                       Array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.3', '5'),
-                       Array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.4', '6'),
-                       Array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.5', '7'),
-                       Array('-----', '--div--'),
-                       Array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.7', '199')
+               array(
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.0', '2', 'i/pages.gif'),
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.3', '5', 'i/pages_notinmenu.gif'),
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.4', '6', 'i/be_users_section.gif'),
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.div.link', '--div--'),
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.2', '4', 'i/pages_shortcut.gif'),
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.5', '7', 'i/pages_mountpoint.gif'),
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.8', '3', 'i/pages_link.gif'),
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.div.special', '--div--')
                )
        );
+       array_splice(
+               $TCA['pages']['columns']['doktype']['config']['items'],
+               10,
+               0,
+               array(
+                       array('LLL:EXT:cms/locallang_tca.php:pages.doktype.I.7', '199', 'i/spacer_icon.gif')
+               )
+       );
+       array_unshift(
+               $TCA['pages']['columns']['doktype']['config']['items'],
+               array('LLL:EXT:cms/locallang_tca.php:pages.doktype.div.page', '--div--')
+       );
 
        // Setting enablecolumns:
        $TCA['pages']['ctrl']['enablecolumns'] = Array (
index 0c424a3..84b8505 100755 (executable)
                        <label index="pages.doktype.I.3">Not in menu</label>
                        <label index="pages.doktype.I.4">Backend User Section</label>
                        <label index="pages.doktype.I.5">Mount Point</label>
-                       <label index="pages.doktype.I.7">Spacer</label>
+                       <label index="pages.doktype.I.7">Visual Menu Separator</label>
+                       <label index="pages.doktype.I.8">Link to external URL</label>
+                       <label index="pages.doktype.div.page">Page</label>
+                       <label index="pages.doktype.div.link">Link</label>
+                       <label index="pages.doktype.div.special">Special</label>
                        <label index="pages.hidden">Hide page:</label>
                        <label index="pages.layout.I.1">Layout 1</label>
                        <label index="pages.layout.I.2">Layout 2</label>