RFC #7505: Docheaders: Module Admin tools > Configuration No docheader
authorPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 15:07:13 +0000 (15:07 +0000)
committerPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 15:07:13 +0000 (15:07 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3195 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/stylesheet.css
typo3/sysext/lowlevel/config/index.php
typo3/templates/config.html [new file with mode: 0644]

index dc220fb..f7df167 100755 (executable)
@@ -126,7 +126,7 @@ BODY#typo3-alt-toplogo-php, BODY#typo3-alt-menu-sel-php, BODY#typo3-alt-topmenu-
        background-color: #9BA1A8;
 }
 
-body#typo3-alt-doc-php, body#typo3-db-list-php, body#ext-cms-layout-db-layout-php, body#ext-tstemplate-ts-index-php, body#typo3-mod-web-perm-index-php, body#typo3-mod-web-info-index-php, body#typo3-mod-web-func-index-php, body#ext-version-cm1-index-php, body#ext-setup-mod-index-php, body#typo3-mod-user-ws-index-php, body#typo3-mod-user-ws-workspaceforms-php, body#typo3-mod-php, body#ext-tsconfig-help-mod1-index-php, body#typo3-mod-tools-em-index-php, body#ext-lowlevel-dbint-index-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
+body#typo3-alt-doc-php, body#typo3-db-list-php, body#ext-cms-layout-db-layout-php, body#ext-tstemplate-ts-index-php, body#typo3-mod-web-perm-index-php, body#typo3-mod-web-info-index-php, body#typo3-mod-web-func-index-php, body#ext-version-cm1-index-php, body#ext-setup-mod-index-php, body#typo3-mod-user-ws-index-php, body#typo3-mod-user-ws-workspaceforms-php, body#typo3-mod-php, body#ext-tsconfig-help-mod1-index-php, body#typo3-mod-tools-em-index-php, body#ext-lowlevel-dbint-index-php, body#ext-lowlevel-config-index-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
 
 
 /****************************************
index c7b66a6..516535a 100755 (executable)
@@ -99,8 +99,10 @@ class SC_mod_tools_config_index {
 
                $this->menuConfig();
 
-               $this->doc = t3lib_div::makeInstance('noDoc');
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
+               $this->doc->setModuleTemplate('templates/config.html');                 
+               $this->doc->docType='xhtml_trans';
 
                                // JavaScript
                $this->doc->JScode = '
@@ -150,16 +152,14 @@ class SC_mod_tools_config_index {
        function main() {
                global $BE_USER,$LANG,$TCA,$TYPO3_CONF_VARS;
 
-               $this->content.= $this->doc->startPage('Configuration');
                $this->content.= $this->doc->header('Configuration');
                $this->content.= $this->doc->spacer(5);
 
                $arrayBrowser = t3lib_div::makeInstance('t3lib_arrayBrowser');
 
-               $menu = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.menu').' '.t3lib_BEfunc::getFuncMenu(0,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']).
-                                       '&nbsp;&nbsp;<label for="checkFixedLgd">Crop lines:</label>&nbsp;&nbsp;'.t3lib_BEfunc::getFuncCheck(0,'SET[fixedLgd]',$this->MOD_SETTINGS['fixedLgd'],'','','id="checkFixedLgd"');
-               $this->content.=$this->doc->section('','<nobr>'.$menu.'</nobr>');
-
+               $this->content.= '<label for="checkFixedLgd">Crop lines:</label>&nbsp;&nbsp;' . t3lib_BEfunc::getFuncCheck(0, 'SET[fixedLgd]', $this->MOD_SETTINGS['fixedLgd'], '', '', 'id="checkFixedLgd"');
+               $this->content.= $this->doc->spacer(5);
+               
                switch($this->MOD_SETTINGS['function']) {
                        case 0:
                                $theVar = $TYPO3_CONF_VARS;
@@ -261,10 +261,20 @@ class SC_mod_tools_config_index {
                        </table>
                <br/>
                ';
-
-               if ($BE_USER->mayMakeShortcut())        {
-                       $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('','function',$this->MCONF['name']));
-               }
+               
+                       // Setting up the buttons and markers for docheader
+               $docHeaderButtons = $this->getButtons();
+               $markers = array(
+                       'CSH' => $docHeaderButtons['csh'],
+                       'FUNC_MENU' => $this->getFuncMenu(),
+                       'CONTENT' => $this->content
+               );      
+
+                       // Build the <body> for the module
+               $this->content = $this->doc->startPage('Configuration');
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
@@ -273,10 +283,39 @@ class SC_mod_tools_config_index {
         * @return      void
         */
        function printContent() {
-
-               $this->content.= $this->doc->endPage();
                echo $this->content;
        }
+       
+       /**
+        * Create the panel of buttons for submitting the form or otherwise perform operations.
+        *
+        * @return      array   all available buttons as an assoc. array
+        */
+       private function getButtons()   {
+               
+               $buttons = array(
+                       'csh' => '',
+                       'shortcut' => ''
+               );
+                       // CSH
+               //$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);
+               
+                       // Shortcut
+               if ($GLOBALS['BE_USER']->mayMakeShortcut())     {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('','function',$this->MCONF['name']);
+               }
+               return $buttons;
+       }
+       
+       /**
+        * Create the function menu
+        *
+        * @return      string  HTML of the function menu
+        */
+       private function getFuncMenu() {                
+               $funcMenu = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
+               return $funcMenu;       
+       }
 }
 
 // Include extension?
diff --git a/typo3/templates/config.html b/typo3/templates/config.html
new file mode 100644 (file)
index 0000000..a46fde0
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###FULLDOC### begin -->\r
+<div class="typo3-fullDoc">\r
+       <!-- Page header with buttons, path details and csh -->\r
+       <div id="typo3-docheader">\r
+               <div id="typo3-docheader-row1">\r
+                       <div class="buttonsleft">###BUTTONLIST_LEFT###</div>\r
+                       <div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>\r
+               </div>\r
+               <div id="typo3-docheader-row2">\r
+                       <div class="pagepath"></div>\r
+                       <div class="infooptions"></div>\r
+               </div>\r
+       </div>\r
+       <!-- Content of module, for instance listing, info or editing -->\r
+       <div id="typo3-docbody">\r
+               ###CONTENT###\r
+       </div>\r
+</div>\r
+<!-- ###FULLDOC### end -->\r
+\r
+<!-- Grouping the icons on top -->\r
+\r
+<!-- ###BUTTON_GROUP_WRAP### -->\r
+       <div class="buttongroup">###BUTTONS###</div>\r
+<!-- ###BUTTON_GROUP_WRAP### -->\r
+\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r