Added feature 15645: Make checkboxes at the bottom of modules configurable (Thanks...
authorSusanne Moog <typo3@susannemoog.de>
Sun, 31 Oct 2010 18:06:42 +0000 (18:06 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Sun, 31 Oct 2010 18:06:42 +0000 (18:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9235 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/config_default.php
typo3/sysext/filelist/mod1/file_list.php
typo3/sysext/lang/locallang_csh_corebe.xml
typo3/sysext/list/mod1/db_list.php

index c0dbd41..c1c16a5 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-31  Susanne Moog  <typo3@susanne-moog.de>
+
+       * Added feature 15645: Make checkboxes at the bottom of modules configurable (Thanks to Jörg Klein)
+
 2010-10-31  Steffen Kamper  <steffen@typo3.org>
 
        * Follow-up to #15830: Sprite - IRRE record synchronization icon missing (icon was missing)
index d096206..946f918 100644 (file)
@@ -226,8 +226,13 @@ $TYPO3_CONF_VARS = array(
                'forceCharset' => '',                                   // String: Normally the charset of the backend users language selection is used. If you set this value to a charset found in t3lib/csconvtbl/ (or "utf-8") the backend (and database) will ALWAYS use this charset. Always use a lowercase value.
                'installToolPassword' => '',                    // String: This is the md5-hashed password for the Install Tool. Set this to '' and access will be totally denied. PLEASE consider to externally password protect the typo3/install/ folder, eg. with a .htaccess file.
                'defaultUserTSconfig' => 'options.enableShortcuts=1
-                       options.enableShowPalettes=1',  // String (exclude). Enter lines of default backend user/group TSconfig.
-               'defaultPageTSconfig' => '',                    // String (exclude).Enter lines of default Page TSconfig.
+                       options.enableShowPalettes=1
+                       options.file_list.enableDisplayBigControlPanel=selectable
+                       options.file_list.enableDisplayThumbnails=selectable
+                       options.file_list.enableClipBoard=selectable',  // String (exclude). Enter lines of default backend user/group TSconfig.
+               'defaultPageTSconfig' => 'mod.web_list.enableDisplayBigControlPanel=selectable
+                       mod.web_list.enableClipBoard=selectable
+                       mod.web_list.enableLocalizationView=selectable',                        // String (exclude).Enter lines of default Page TSconfig.
                'defaultPermissions' => array (                 // Default permissions set for new pages in t3lib/tce_main.php. Keys are 'show,edit,delete,new,editcontent'. Enter as comma-list
 //                     'user' => '',                                           // default in tce_main is 'show,edit,delete,new,editcontent'. If this is set (uncomment), this value is used instead.
 //                     'group' => '',                                          // default in tce_main is 'show,edit,new,editcontent'. If this is set (uncomment), this value is used instead.
index c9cc24f..4aa8a33 100644 (file)
@@ -238,6 +238,28 @@ class SC_file_list {
                        $this->filelist = t3lib_div::makeInstance('fileList');
                        $this->filelist->backPath = $BACK_PATH;
 
+                               // Apply predefined values for hidden checkboxes
+                               // Set predefined value for DisplayBigControlPanel:
+                       if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'activated') {
+                               $this->MOD_SETTINGS['bigControlPanel'] = TRUE;   
+                       } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'deactivated') {
+                               $this->MOD_SETTINGS['bigControlPanel'] = FALSE;
+                       }
+
+                               // Set predefined value for DisplayThumbnails:
+                       if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'activated') {
+                               $this->MOD_SETTINGS['displayThumbs'] = TRUE;     
+                       } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'deactivated') {
+                               $this->MOD_SETTINGS['displayThumbs'] = FALSE;
+                       }
+
+                               // Set predefined value for Clipboard:
+                       if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'activated') {
+                               $this->MOD_SETTINGS['clipBoard'] = TRUE;         
+                       } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'deactivated') {
+                               $this->MOD_SETTINGS['clipBoard'] = FALSE;
+                       }
+
                                // if user never opened the list module, set the value for displayThumbs
                        if (!isset($this->MOD_SETTINGS['displayThumbs'])) {
                                $this->MOD_SETTINGS['displayThumbs'] = $BE_USER->uc['thumbnailsByDefault'];
@@ -331,19 +353,46 @@ class SC_file_list {
                                $pageContent.='
 
                                        <!--
-                                               Listing options for clipboard and thumbnails
+                                               Listing options for extended view, clipboard and thumbnails
                                        -->
                                        <div id="typo3-listOptions">
                                ';
 
                                        // Add "display bigControlPanel" checkbox:
-                               $pageContent.=t3lib_BEfunc::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], 'file_list.php', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ' .$LANG->getLL('bigControlPanel', 1) . '</label><br />';
+                               if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'selectable') {
+                                       $pageContent .= t3lib_BEfunc::getFuncCheck(
+                                               $this->id,
+                                               'SET[bigControlPanel]',
+                                               $this->MOD_SETTINGS['bigControlPanel'],
+                                               'file_list.php',
+                                               '',
+                                               'id="bigControlPanel"'
+                                       ) . '<label for="bigControlPanel"> ' . $GLOBALS['LANG']->getLL('bigControlPanel', TRUE) . '</label><br />';
+                               }
 
                                        // Add "display thumbnails" checkbox:
-                               $pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').' <label for="checkDisplayThumbs">'.$LANG->getLL('displayThumbs',1).'</label><br />';
+                               if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'selectable') {
+                                       $pageContent .= t3lib_BEfunc::getFuncCheck(
+                                               $this->id,
+                                               'SET[displayThumbs]',
+                                               $this->MOD_SETTINGS['displayThumbs'],
+                                               'file_list.php',
+                                               '',
+                                               'id="checkDisplayThumbs"'
+                                       ) . ' <label for="checkDisplayThumbs">' . $GLOBALS['LANG']->getLL('displayThumbs', TRUE) . '</label><br />';
+                               }
 
-                                       // Add clipboard button
-                               $pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'file_list.php','','id="checkClipBoard"').' <label for="checkClipBoard">'.$LANG->getLL('clipBoard',1).'</label>';
+                                       // Add "clipboard" checkbox:
+                               if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'selectable') {
+                                       $pageContent .= t3lib_BEfunc::getFuncCheck(
+                                               $this->id,
+                                               'SET[clipBoard]',
+                                               $this->MOD_SETTINGS['clipBoard'],
+                                               'file_list.php',
+                                               '',
+                                               'id="checkClipBoard"'
+                                       ) . ' <label for="checkClipBoard">' . $GLOBALS['LANG']->getLL('clipBoard', TRUE) . '</label>';
+                               }
 
                                $pageContent.='
                                        </div>
index ec2bfe2..f7dc08d 100755 (executable)
@@ -141,7 +141,7 @@ If you select one of the numeric clipboard pads you will be able to store more t
                        <label index="_list_searchbox.seeAlso">xMOD_csh_corebe:list_module</label>
                        <label index="_list_searchbox.image">EXT:lang/cshimages/core_15.png,</label>
                        <label index="list_options.alttitle">List module options</label>
-                       <label index="list_options.description">Enable the &quot;Extended view&quot; mode to see additional control buttons for each record in the listing. Enable the &quot;Clipboard&quot; to see the clipboard and its content.</label>
+                       <label index="list_options.description">Enable additional options like the &quot;Extended view&quot; mode to see additional control buttons for each record in the listing or the &quot;Clipboard&quot; to see the clipboard and its content.</label>
                        <label index="_list_options.seeAlso">xMOD_csh_corebe:list_module,
 xMOD_csh_corebe:list_clipboard,
 xMOD_csh_corebe:filelist_options</label>
index 124684e..121a373 100644 (file)
@@ -206,6 +206,28 @@ class SC_db_list {
                $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
                $access = is_array($this->pageinfo) ? 1 : 0;
 
+                       // Apply predefined values for hidden checkboxes
+                       // Set predefined value for DisplayBigControlPanel:
+               if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'activated') {
+                       $this->MOD_SETTINGS['bigControlPanel'] = TRUE;   
+               } elseif ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'deactivated') {
+                       $this->MOD_SETTINGS['bigControlPanel'] = FALSE;
+               }
+
+                       // Set predefined value for Clipboard:
+               if ($this->modTSconfig['properties']['enableClipBoard'] === 'activated') {
+                       $this->MOD_SETTINGS['clipBoard'] = TRUE;         
+               } elseif ($this->modTSconfig['properties']['enableClipBoard'] === 'deactivated') {
+                       $this->MOD_SETTINGS['clipBoard'] = FALSE;
+               }
+
+                       // Set predefined value for LocalizationView:
+               if ($this->modTSconfig['properties']['enableLocalizationView'] === 'activated') {
+                       $this->MOD_SETTINGS['localization'] = TRUE;      
+               } elseif ($this->modTSconfig['properties']['enableLocalizationView'] === 'deactivated') {
+                       $this->MOD_SETTINGS['localization'] = FALSE;
+               }
+
                        // Initialize the dblist object:
                $dblist = t3lib_div::makeInstance('localRecordList');
                $dblist->backPath = $BACK_PATH;
@@ -369,19 +391,66 @@ class SC_db_list {
                        $this->body.='
 
                                        <!--
-                                               Listing options for clipboard and thumbnails
+                                               Listing options for extended view, clipboard and localization view
                                        -->
                                        <div id="typo3-listOptions">
                                                <form action="" method="post">';
 
-                       $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], 'db_list.php', ($this->table ? '&table=' . $this->table : ''), 'id="checkLargeControl"');
-                       $this->body .= '<label for="checkLargeControl">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $LANG->getLL('largeControl', TRUE)) . '</label><br />';
-                       if ($dblist->showClipboard)     {
-                               $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], 'db_list.php', ($this->table ? '&table=' . $this->table : ''), 'id="checkShowClipBoard"');
-                               $this->body .= '<label for="checkShowClipBoard">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $LANG->getLL('showClipBoard', TRUE)) . '</label><br />';
+                               // Add "display bigControlPanel" checkbox:
+                       if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'selectable') {
+                               $this->body .= t3lib_BEfunc::getFuncCheck(
+                                       $this->id,
+                                       'SET[bigControlPanel]',
+                                       $this->MOD_SETTINGS['bigControlPanel'],
+                                       'db_list.php',
+                                       ($this->table ? '&table=' . $this->table : ''),
+                                       'id="checkLargeControl"'
+                               );
+                               $this->body .= '<label for="checkLargeControl">' .
+                                       t3lib_BEfunc::wrapInHelp(
+                                               'xMOD_csh_corebe',
+                                               'list_options',
+                                               $GLOBALS['LANG']->getLL('largeControl', TRUE)
+                                       ) . '</label><br />';
+                       }
+
+                               // Add "clipboard" checkbox:
+                       if ($this->modTSconfig['properties']['enableClipBoard'] === 'selectable') {
+                               if ($dblist->showClipboard)     {
+                                       $this->body .= t3lib_BEfunc::getFuncCheck(
+                                               $this->id,
+                                               'SET[clipBoard]',
+                                               $this->MOD_SETTINGS['clipBoard'],
+                                               'db_list.php',
+                                               ($this->table ? '&table=' . $this->table : ''),
+                                               'id="checkShowClipBoard"'
+                                       );
+                                       $this->body .= '<label for="checkShowClipBoard">' .
+                                               t3lib_BEfunc::wrapInHelp(
+                                                       'xMOD_csh_corebe',
+                                                       'list_options',
+                                                       $GLOBALS['LANG']->getLL('showClipBoard', TRUE)
+                                               ) . '</label><br />';
+                               }
+                       }
+
+                               // Add "localization view" checkbox:
+                       if ($this->modTSconfig['properties']['enableLocalizationView'] === 'selectable') {
+                               $this->body .= t3lib_BEfunc::getFuncCheck(
+                                       $this->id,
+                                       'SET[localization]',
+                                       $this->MOD_SETTINGS['localization'],
+                                       'db_list.php',
+                                       ($this->table ? '&table=' . $this->table : ''),
+                                       'id="checkLocalization"'
+                               );
+                               $this->body .= '<label for="checkLocalization">' .
+                                       t3lib_BEfunc::wrapInHelp(
+                                               'xMOD_csh_corebe',
+                                               'list_options',
+                                               $GLOBALS['LANG']->getLL('localization', TRUE)
+                                       ) . '</label><br />';
                        }
-                       $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[localization]', $this->MOD_SETTINGS['localization'], 'db_list.php', ($this->table ? '&table=' . $this->table : ''), 'id="checkLocalization"');
-                       $this->body .= '<label for="checkLocalization">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $LANG->getLL('localization', TRUE)) . '</label><br />';
 
                        $this->body.='
                                                </form>