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

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

index 4e235f8..17cd280 100755 (executable)
@@ -29,7 +29,7 @@
  *
  * This module lets you view the changelog.
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 
 
@@ -81,8 +81,10 @@ class SC_mod_tools_log_index {
                $this->lF = t3lib_div::makeInstance('t3lib_BEDisplayLog');
                $this->menuConfig();
 
-               $this->doc = t3lib_div::makeInstance('noDoc');
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
+               $this->doc->setModuleTemplate('templates/belog.html');
+               $this->doc->docType = 'xhtml_trans';
 
                                // JavaScript
                $this->doc->JScode = '
@@ -173,7 +175,6 @@ class SC_mod_tools_log_index {
        function main() {
                global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
 
-               $this->content.=$this->doc->startPage('Administration log');
                $this->content.=$this->doc->header('Administration log');
                $this->content.=$this->doc->spacer(5);
 
@@ -299,10 +300,17 @@ class SC_mod_tools_log_index {
                $this->content.=$this->doc->section($header,$this->doc->table($codeArr));
 
                $GLOBALS['TYPO3_DB']->sql_free_result($log);
-
-               if ($BE_USER->mayMakeShortcut())        {
-                       $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('','users,time,max,action',$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('Administration log');
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
@@ -311,11 +319,30 @@ class SC_mod_tools_log_index {
         * @return      string          HTML
         */
        function printContent() {
-
-               $this->content.=$this->doc->spacer(20);
-               $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('','users,time,max,action',$this->MCONF['name']);
+               }
+
+               return $buttons;
+       }
 }
 
 // Include extension?
@@ -339,4 +366,4 @@ $SOBE = t3lib_div::makeInstance('SC_mod_tools_log_index');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
-?>
\ No newline at end of file
+?>
diff --git a/typo3/templates/belog.html b/typo3/templates/belog.html
new file mode 100644 (file)
index 0000000..72233e1
--- /dev/null
@@ -0,0 +1,58 @@
+<!-- ###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"></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
+<!-- ###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"></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