RFC #7433: Docheaders: Module User Tools > User settings : No docheader
authorPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 14:13:15 +0000 (14:13 +0000)
committerPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 14:13:15 +0000 (14:13 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3183 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index cf57a8d..6dba26d 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 { 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 { padding: 0; margin: 0; overflow: hidden; height: 100%; }
 
 
 /****************************************
@@ -702,3 +702,4 @@ PRE.ts-hl .ts-linenum { background-color: #eee; }
 H2,H3,H4,DIV { border: 1px dotted #666; }
 */
 
+
index cbfc31f..4554413 100755 (executable)
@@ -244,8 +244,8 @@ class SC_mod_user_setup_index {
 
                        // Create instance of object for output of data
                $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->divClass = 'typo3-fullDoc';
                $this->doc->backPath = $BACK_PATH;
+               $this->doc->setModuleTemplate('templates/setup.html');
                $this->doc->docType = 'xhtml_trans';
                $this->doc->JScodeLibArray['dyntabmenu'] = $this->doc->getDynTabMenuJScode();
 
@@ -286,8 +286,6 @@ class SC_mod_user_setup_index {
                        // Start page:
                $menuItems = array();
                $this->doc->loadJavascriptLib('md5.js');
-               $this->content .= $this->doc->startPage($LANG->getLL('UserSettings'));
-               $this->content .= $this->doc->header($LANG->getLL('UserSettings').' - '.$BE_USER->user['realName'].' ['.$BE_USER->user['username'].']');
                        
                        // use a wrapper div
                $this->content .= '<div id="user-setup-wrapper">';
@@ -297,6 +295,7 @@ class SC_mod_user_setup_index {
                $this->loadModules->observeWorkspaces = TRUE;
                $this->loadModules->load($TBE_MODULES);
 
+               $this->content .= $this->doc->header($LANG->getLL('UserSettings').' - '.$BE_USER->user['realName'].' ['.$BE_USER->user['username'].']');
 
                        // If password is updated, output whether it failed or was OK.
                if ($this->PASSWORD_UPDATED)    {
@@ -487,7 +486,6 @@ class SC_mod_user_setup_index {
                $this->content .= $this->doc->spacer(20);
                $this->content .= $this->doc->section('','
                        <input type="hidden" name="simUser" value="'.$this->simUser.'" />
-                       <input type="submit" name="submit" value="'.$LANG->getLL('save').'" />
                        <input type="submit" name="data[setValuesToDefault]" value="'.$LANG->getLL('setToStandard').'" onclick="return confirm(\''.$LANG->getLL('setToStandardQuestion').'\');" />'.
                        t3lib_BEfunc::cshItem('_MOD_user_setup', 'reset', $BACK_PATH,'|')
                );
@@ -495,13 +493,17 @@ class SC_mod_user_setup_index {
                        // Notice
                $this->content .= $this->doc->spacer(30);
                $this->content .= $this->doc->section('', $LANG->getLL('activateChanges'));
-
-                       // CSH general:
-               $this->content .= '<br/><br/>'.t3lib_BEfunc::cshItem('_MOD_user_setup', '', $BACK_PATH, '|');
-
-                       // shortcut
-               $this->content .= $this->doc->spacer(30);
-               $this->content .= $this->doc->makeShortcutIcon('','',$this->MCONF['name']);
+               
+                       // 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('UserSettings'));
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
                
                        // end of wrapper div
                $this->content .= '</div>';
@@ -513,12 +515,36 @@ class SC_mod_user_setup_index {
         * @return      void
         */
        function printContent() {
-               $this->content.= $this->doc->endPage();
                echo $this->content;
-               exit;
        }
 
+       /**
+        * 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 $LANG, $BACK_PATH, $BE_USER;
+               
+               $buttons = array(
+                       'csh' => '',
+                       'save' => '',
+                       'shortcut' => '',
+               );
 
+                       //CSH
+               $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_user_setup', '', $BACK_PATH, '|');
+               
+                       // Save
+               $buttons['save'] = '<input type="image" class="c-inputButton" name="submit" value="' . $LANG->getLL('save') . '"' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/savedok.gif','') . ' title="' . $LANG->getLL('save') . '" />';
+
+               if ($BE_USER->mayMakeShortcut())        {
+                               // Shortcut
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('','',$this->MCONF['name']);
+               }
+                       
+               return $buttons;
+       }
 
 
 
diff --git a/typo3/templates/setup.html b/typo3/templates/setup.html
new file mode 100644 (file)
index 0000000..6dc87f5
--- /dev/null
@@ -0,0 +1,66 @@
+<!-- ###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###</div>\r
+               </div>\r
+               <div id="typo3-docheader-row2">\r
+                       <div class="pagepath">###CSH###</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### -->###SAVE###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###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###</div>\r
+               </div>\r
+               <div id="typo3-docheader-row2">\r
+                       <div class="pagepath">###CSH###</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### -->###SAVE###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r