7562: Docheaders: Module History: No docheader
authorPatrick Broens <patrick@netcreators.com>
Mon, 3 Mar 2008 15:46:25 +0000 (15:46 +0000)
committerPatrick Broens <patrick@netcreators.com>
Mon, 3 Mar 2008 15:46:25 +0000 (15:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3361 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/show_rechis.php
typo3/stylesheet.css
typo3/templates/show_rechis.html [new file with mode: 0644]

index 408febe..9d0a05e 100755 (executable)
@@ -94,11 +94,12 @@ class SC_show_rechis {
                global $LANG;
 
                        // Create internal template object:
-               $this->doc = t3lib_div::makeInstance('mediumDoc');
+               $this->doc = t3lib_div::makeInstance('template');
+               $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->docType = 'xhtml_trans';
+               $this->doc->setModuleTemplate('templates/show_rechis.html');
 
                        // Start the page header:
-               $this->content.=$this->doc->startPage($LANG->getLL('title'));
                $this->content.=$this->doc->header($LANG->getLL('title'));
                $this->content.=$this->doc->spacer(5);
        }
@@ -114,19 +115,17 @@ class SC_show_rechis {
                        // Start history object
                $historyObj = t3lib_div::makeInstance('recordHistory');
 
-                       // Return link:
-               if ($historyObj->returnUrl)     {
-                       $this->content .= '<a href="'.htmlspecialchars($historyObj->returnUrl).'" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg('','gfx/goback.gif','width="14" height="14"').' alt="" />'.$LANG->getLL('returnLink',1).'</a>';
-               }
-
                        // Get content:
                $this->content .= $historyObj->main();
 
-                       // Return link:
-               if ($historyObj->returnUrl)     {
-                       $link = '<a href="'.htmlspecialchars($historyObj->returnUrl).'" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg('','gfx/goback.gif','width="14" height="14"').' alt="" />'.$LANG->getLL('returnLink',1).'</a>';
-                       $this->content .= $this->doc->section($LANG->getLL('return'),$link,0,1);
-               }
+                       // Setting up the buttons and markers for docheader
+               $docHeaderButtons = $this->getButtons();        
+               $markers['CONTENT'] = $this->content;
+               $markers['CSH'] = $docHeaderButtons['csh'];
+               
+                       // Build the <body> for the module
+               $this->content = $this->doc->startPage($LANG->getLL('title'));
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        }
 
        /**
@@ -140,6 +139,30 @@ class SC_show_rechis {
                $this->content = $this->doc->insertStylesAndJS($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() {         
+               $buttons = array(
+                       'csh' => '',
+                       'back' => ''            
+               );
+
+                       // CSH  
+               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '');
+
+                       // Start history object
+               $historyObj = t3lib_div::makeInstance('recordHistory');
+
+               if ($historyObj->returnUrl)     {
+                       $buttons['back']= '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack"><img' . t3lib_iconWorks::skinImg('', 'gfx/goback.gif') . ' alt="" title="' . $GLOBALS['LANG']->getLL('returnLink', 1) . '" /></a>';
+               }
+               
+               return $buttons;
+       }
 }
 
 // Include extension?
@@ -163,4 +186,4 @@ $SOBE = t3lib_div::makeInstance('SC_show_rechis');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
-?>
\ No newline at end of file
+?>
index 3015b9a..298afd9 100755 (executable)
@@ -144,7 +144,8 @@ body#ext-version-cm1-index-php,
 body#typo3-pagetree,
 body#ext-cms-layout-db-new-content-el-php,
 body#typo3-db-new-php,
-body#typo3-move-el-php {
+body#typo3-move-el-php,
+body#typo3-show-rechis-php {
        padding: 0;
        margin: 0;
        overflow: hidden;
diff --git a/typo3/templates/show_rechis.html b/typo3/templates/show_rechis.html
new file mode 100644 (file)
index 0000000..42ba749
--- /dev/null
@@ -0,0 +1,30 @@
+<!-- ###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
+<!-- ###BUTTON_GROUP_WRAP### -->\r
+       <div class="buttongroup">###BUTTONS###</div>\r
+<!-- ###BUTTON_GROUP_WRAP### -->\r
+\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+<!-- ###BUTTON_GROUP1### -->###BACK###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r