RFC #7436: Docheaders: Module Admin tools > User Admin: No docheader
authorPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 14:26:25 +0000 (14:26 +0000)
committerPatrick Broens <patrick@netcreators.com>
Sun, 17 Feb 2008 14:26:25 +0000 (14:26 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3186 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 5b6ae63..7d81f5d 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 { 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 { padding: 0; margin: 0; overflow: hidden; height: 100%; }
 
 
 /****************************************
index c744a55..7ebfbb6 100755 (executable)
@@ -1125,9 +1125,12 @@ class SC_mod_tools_be_user_index {
                // **************************
                // Initializing
                // **************************
-               $this->doc = t3lib_div::makeInstance('noDoc');
-               $this->doc->form='<form action="" method="POST">';
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
+               $this->doc->setModuleTemplate('templates/beuser.html');
+               $this->doc->docType = 'xhtml_trans';
+               $this->doc->form='<form action="" method="POST">';
+               
                                // JavaScript
                $this->doc->JScode = $this->doc->wrapScriptTags('
                        script_ended = 0;
@@ -1164,13 +1167,9 @@ class SC_mod_tools_be_user_index {
         */
        function main() {
                $this->content='';
-               $this->content.=$this->doc->startPage('Backend User Administration');
-
-               $menu=t3lib_BEfunc::getFuncMenu(0,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']);
 
                $this->content.=$this->doc->header('Backend User Administration');
                $this->content.=$this->doc->spacer(5);
-               $this->content.=$this->doc->section('',$menu).$this->doc->divider(5);
 
                switch($this->MOD_SETTINGS['function']) {
                        case 'compare':
@@ -1185,13 +1184,18 @@ class SC_mod_tools_be_user_index {
                        case 'whoisonline':
                                $this->content.=$this->whoIsOnline();
                        break;
-               }
-
-
-               if ($GLOBALS['BE_USER']->mayMakeShortcut())     {
-                       $this->content.=$this->doc->spacer(20).
-                                               $this->doc->section('',$this->doc->makeShortcutIcon('be_user_uid,compareFlags','function',$this->MCONF['name']));
-               }
+               }               
+                       // Setting up the buttons and markers for docheader
+               $docHeaderButtons = $this->getButtons();
+               //$markers['CSH'] = $docHeaderButtons['csh'];
+               $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu(0,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']);
+               $markers['CONTENT'] = $this->content;
+                       
+                       // Build the <body> for the module
+               $this->content = $this->doc->startPage('Backend User Administration');
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
@@ -1200,12 +1204,35 @@ class SC_mod_tools_be_user_index {
         * @return      [type]          ...
         */
        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' => '',
+                       'save' => ''
+               );
+                       // CSH
+               //$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);
+               
+                       // Shortcut
+               if ($GLOBALS['BE_USER']->mayMakeShortcut())     {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('be_user_uid,compareFlags','function', $this->MCONF['name']);
+               }
+                       
+                       // Save
+               if($this->MOD_SETTINGS['function'] == 'compare' && !t3lib_div::_GP('be_user_uid')) {
+                       $buttons['save'] = '<input type="image" class="c-inputButton" name="ads"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedok.gif','').' title="Update" value="Update" />';              
+               }
+               return $buttons;
+       }
 
 
 
@@ -1291,7 +1318,6 @@ class SC_mod_tools_be_user_index {
                                $menu[]='<input type="checkbox" value="1" name="compareFlags['.$kk.']" id="checkCompare_'.$kk.'"'.($compareFlags[$kk]?' checked="checked"':'').'> <label for="checkCompare_'.$kk.'">'.htmlspecialchars($vv).'</label>';
                        }
                        $outCode = 'Group by:<br />'.implode('<br />',$menu);
-                       $outCode.='<br /><input type="submit" name="ads" value="Update">';
                        $content = $this->doc->section('Group and Compare Users',$outCode,0,1);
 
 
diff --git a/typo3/templates/beuser.html b/typo3/templates/beuser.html
new file mode 100644 (file)
index 0000000..287a749
--- /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######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### -->###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######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### -->###SAVE###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r