RFC #7438: Docheaders: Module Help > TypoScript Help: No docheader
authorPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 14:50:05 +0000 (14:50 +0000)
committerPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 14:50:05 +0000 (14:50 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3192 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 7d81f5d..636b4e3 100755 (executable)
@@ -126,7 +126,7 @@ BODY#typo3-alt-toplogo-php, BODY#typo3-alt-menu-sel-php, BODY#typo3-alt-topmenu-
        background-color: #9BA1A8;
 }
 
        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 { 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 { padding: 0; margin: 0; overflow: hidden; height: 100%; }
 
 
 /****************************************
 
 
 /****************************************
index de69802..9b3fe7c 100644 (file)
@@ -90,12 +90,14 @@ class tx_tsconfighelp_module1 extends t3lib_SCbase {
                $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
                $access = is_array($this->pageinfo) ? 1 : 0;
 
                $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
                $access = is_array($this->pageinfo) ? 1 : 0;
 
+                       // Draw the header.
+               $this->doc = t3lib_div::makeInstance('template');
+               $this->doc->backPath = $BACK_PATH;
+               $this->doc->setModuleTemplate('templates/tsconfig_help.html');
+               $this->doc->docType = 'xhtml_trans';
+               
                if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))  {
 
                if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))  {
 
-                               // Draw the header.
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
-                       $this->doc->backPath = $BACK_PATH;
-                       $this->doc->docType = 'xhtml_trans';
                        $this->doc->form = '<form action="" method="POST">';
 
                                // JavaScript
                        $this->doc->form = '<form action="" method="POST">';
 
                                // JavaScript
@@ -116,31 +118,28 @@ class tx_tsconfighelp_module1 extends t3lib_SCbase {
 
                        $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);
 
 
                        $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);
 
-                       $this->content .= $this->doc->startPage($LANG->getLL('title'));
                        $this->content .= $this->doc->header($LANG->getLL('title'));
                        $this->content .= $this->doc->spacer(5);
                        $this->content .= $this->doc->header($LANG->getLL('title'));
                        $this->content .= $this->doc->spacer(5);
-                       $this->content .= $this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));
-                       $this->content .= $this->doc->divider(5);
 
                        // Render content:
                        $this->moduleContent();
 
 
                        // Render content:
                        $this->moduleContent();
 
-                       // ShortCut
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $this->content .= $this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));
-                       }
-
                        $this->content .= $this->doc->spacer(10);
                        $this->content .= $this->doc->spacer(10);
+                       
+                       $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']);
                } else {
                } else {
-                               // If no access or if ID == zero
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
-                       $this->doc->backPath = $BACK_PATH;
-
-                       $this->content .= $this->doc->startPage($LANG->getLL('title'));
                        $this->content .= $this->doc->header($LANG->getLL('title'));
                        $this->content .= $this->doc->header($LANG->getLL('title'));
-                       $this->content .= $this->doc->spacer(5);
-                       $this->content .= $this->doc->spacer(10);
                }
                }
+                       // Setting up the buttons and markers for docheader
+               $docHeaderButtons = $this->getButtons();
+               $markers['CSH'] = $docHeaderButtons['csh'];
+               $markers['CONTENT'] = $this->content;   
+                       
+                       // Build the <body> for the module
+               $this->content = $this->doc->startPage($LANG->getLL('title'));
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
        }
 
        /**
@@ -149,9 +148,32 @@ class tx_tsconfighelp_module1 extends t3lib_SCbase {
         * @return      void
         */
        function printContent() {
         * @return      void
         */
        function printContent() {
-               $this->content .= $this->doc->endPage();
                echo $this->content;
        }
                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()   {
+               global $TCA, $LANG, $BACK_PATH, $BE_USER;
+               
+               $buttons = array(
+                       'csh' => '',
+                       'shortcut' => '',
+               );
+                       // CSH
+               //$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);
+               
+               if (($this->id && is_array($this->pageinfo)) || ($BE_USER->user['admin'] && !$this->id)) {
+                               // Shortcut
+                       if ($BE_USER->mayMakeShortcut()) {
+                               $buttons['shortcut'] = $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+                       }
+               }       
+               return $buttons;
+       }
 
        /**
         * Generates the module content
 
        /**
         * Generates the module content
@@ -780,4 +802,4 @@ foreach ($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
 $SOBE->main();
 $SOBE->printContent();
 
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/templates/tsconfig_help.html b/typo3/templates/tsconfig_help.html
new file mode 100644 (file)
index 0000000..e569765
--- /dev/null
@@ -0,0 +1,29 @@
+<!-- ###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_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r