RFC #7262: Fixing docheader in the backend modules
authorPatrick Broens <patrick@netcreators.com>
Tue, 5 Feb 2008 16:46:59 +0000 (16:46 +0000)
committerPatrick Broens <patrick@netcreators.com>
Tue, 5 Feb 2008 16:46:59 +0000 (16:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3074 709f56b5-9817-0410-a4d7-c38de5d9e867

26 files changed:
typo3/alt_doc.php
typo3/class.db_list_extra.inc
typo3/db_list.php
typo3/mod/web/func/index.php
typo3/mod/web/info/index.php
typo3/mod/web/perm/index.php
typo3/stylesheet.css
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/layout/locallang.xml
typo3/sysext/lang/locallang_mod_web_list.xml
typo3/sysext/tstemplate/ts/index.php
typo3/sysext/tstemplate/ts/locallang.xml [new file with mode: 0644]
typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php
typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php
typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php
typo3/sysext/version/cm1/index.php
typo3/template.php
typo3/templates/alt_doc.html [new file with mode: 0644]
typo3/templates/db_layout.html [new file with mode: 0644]
typo3/templates/db_layout_quickedit.html [new file with mode: 0644]
typo3/templates/db_list.html [new file with mode: 0644]
typo3/templates/func.html [new file with mode: 0644]
typo3/templates/info.html [new file with mode: 0644]
typo3/templates/perm.html [new file with mode: 0644]
typo3/templates/tstemplate.html [new file with mode: 0644]
typo3/templates/version.html [new file with mode: 0644]

index dfec5da..d2a7704 100755 (executable)
@@ -139,6 +139,7 @@ class SC_alt_doc {
         * @var mediumDoc
         */
        var $doc;
+       var $template;                  // a static HTML template, usually in templates/alt_doc.html
        var $content;                   // Content accumulation
 
        var $retUrl;                    // Return URL script, processed. This contains the script (if any) that we should RETURN TO from the alt_doc.php script IF we press the close button. Thus this variable is normally passed along from the calling script so we can properly return if needed.
@@ -425,6 +426,8 @@ class SC_alt_doc {
                $this->recTitle = t3lib_div::_GP('recTitle');
                $this->disHelp = t3lib_div::_GP('disHelp');
                $this->noView = t3lib_div::_GP('noView');
+               
+               $this->perms_clause = $BE_USER->getPagePermsClause(1);
 
                        // Set other internal variables:
                $this->R_URL_getvars['returnUrl']=$this->retUrl;
@@ -446,13 +449,11 @@ class SC_alt_doc {
 
                        // Create an instance of the document template object
                $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->divClass = 'typo3-fullDoc';
                $this->doc->backPath = $BACK_PATH;
+               $this->doc->setModuleTemplate('templates/alt_doc.html');        
                $this->doc->docType = 'xhtml_trans';
-               $this->doc->inDocStylesArray[] = 'html { overflow: hidden; }';
-
-               $this->doc->form='<form action="'.htmlspecialchars($this->R_URI).'" method="post" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" name="editform" onsubmit="document.editform._scrollPosition.value=(document.documentElement.scrollTop || document.body.scrollTop); return TBE_EDITOR.checkSubmit(1);">';
-
+               $this->doc->form = '<form action="'.htmlspecialchars($this->R_URI).'" method="post" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" name="editform" onsubmit="document.editform._scrollPosition.value=(document.documentElement.scrollTop || document.body.scrollTop); return TBE_EDITOR.checkSubmit(1);">';                   
+               
                $this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
                $this->doc->JScode = $this->doc->wrapScriptTags('
                        function jumpToUrl(URL,formEl)  {       //
@@ -462,16 +463,6 @@ class SC_alt_doc {
                                        formEl.checked = formEl.checked ? 0 : 1;
                                }
                        }
-
-                               // workaround since IE6 cannot deal with relative height for scrolling elements
-                       function resizeDocBody()        {
-                               $("typo3-docbody").style.height = (document.body.offsetHeight - parseInt($("typo3-docheader").getStyle("height")));
-                       }
-                       if (/MSIE 6/.test(navigator.userAgent)) {
-                               Event.observe(window, "resize", resizeDocBody, false);
-                               Event.observe(document, "load", resizeDocBody, false);
-                       }
-
                                // Object: TS:
                        function typoSetup      ()      {       //
                                this.uniqueID = "";
@@ -516,11 +507,7 @@ class SC_alt_doc {
         */
        function main() {
                global $BE_USER,$LANG;
-
-                       // Starting content accumulation:
-               $this->content='';
-               $this->content.=$this->doc->startPage('TYPO3 Edit Document');
-
+               
                        // Begin edit:
                if (is_array($this->editconf))  {
                        
@@ -549,31 +536,41 @@ class SC_alt_doc {
                                // Creating the editing form, wrap it with buttons, document selector etc.
                        $editForm = $this->makeEditForm();
 
+
+
                        if ($editForm)  {
                                $this->firstEl = reset($this->elementsData);
 
                                        // Module configuration
                                $this->modTSconfig = ($this->viewId ? t3lib_BEfunc::getModTSconfig($this->viewId,'mod.xMOD_alt_doc') : array());
 
-                               $this->content .= 
-                                       $this->tceforms->printNeededJSFunctions_top().
-                                       $this->compileHeader().'
-       <div id="typo3-docbody">'.
-                                       $this->extraFormHeaders.
-                                       $this->compileForm($editForm).
-                                       $this->tceforms->printNeededJSFunctions().
-                                       $this->functionMenus().
-
-                                       // Add CSH:
-                                       t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'TCEforms', $GLOBALS['BACK_PATH'],'<br/>|',FALSE,'margin-top: 20px;').
-                                       '<br /><br />'.
-                                       $this->shortCutLink().
-                                       $this->openInNewWindowLink().'
-       </div>';
-
-                               $this->tceformMessages();
+                               $body.= $this->tceforms->printNeededJSFunctions_top();
+                               $body.= $this->compileForm($editForm);
+                               $body.= $this->tceforms->printNeededJSFunctions();
+                               $body.= $this->functionMenus();
+                               $body.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'TCEforms', $GLOBALS['BACK_PATH'], '<br/>|', FALSE, 'margin-top: 20px;') . '<br /><br />';
+                               $body.= $this->tceformMessages();
                        }
                }
+               
+               // Access check...
+               // The page will show only if there is a valid page and if this page may be viewed by the user
+               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->viewId, $this->perms_clause);
+               
+                       // Setting up the buttons and markers for docheader
+               $docHeaderButtons = $this->getButtons();
+               $markers = array(
+                       'LANGSELECTOR' => $this->langSelector(),
+                       'EXTRAHEADER' => $this->extraFormHeaders(),
+                       'CSH' => $docHeaderButtons['csh'],
+                       'CONTENT' => $body
+               );
+
+                       // Build the <body> for the module
+               $this->content = $this->doc->startPage('TYPO3 Edit Document');
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
 
@@ -583,8 +580,6 @@ class SC_alt_doc {
         * @return      void
         */
        function printContent() {
-               $this->content.= $this->doc->endPage();
-               $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
        }
 
@@ -799,28 +794,24 @@ class SC_alt_doc {
                return $editForm;
        }
 
-
-       /**
-        * Create the panel of buttons for submitting the form or otherwise perform operations.
-        *
-        * @return      string          HTML code, comprised of images linked to various actions.
-        * @deprecated  since TYPO3 4.2, as there are other functions (getButtons) now for getting the button panel
-        */
-       function makeButtonPanel()      {
-               $btns = $this->getButtons();
-               unset($btns['shortcut']);
-               return implode('', $btns);
-       }
-
-
        /**
         * Create the panel of buttons for submitting the form or otherwise perform operations.
         *
         * @return      array   all available buttons as an assoc. array
         */
-       function getButtons()   {
+       private function getButtons()   {
                global $TCA,$LANG;
-               $buttons = array();
+               $buttons = array(
+                       'save' => '',
+                       'save_view' => '',
+                       'save_new' => '',
+                       'save_close' => '',
+                       'close' => '',
+                       'delete' => '',
+                       'undo' => '',
+                       'history' => '',
+                       'columns_only' => ''
+               );
 
                        // Render SAVE type buttons:
                        // The action of each button is decided by its name attribute. (See doProcessData())
@@ -890,115 +881,31 @@ class SC_alt_doc {
                        }
                }
                $buttons['shortcut'] = $this->shortCutLink();
+               $buttons['open_in_new_window'] = $this->openInNewWindowLink();
                return $buttons;
        }
-
-
-       /**
-        * Create the selector box form element which allows to select between open documents.
-        * Can be disabled through Page TSconfig.
-        *
-        * @return      string          HTML <select> element  (if applicable)
-        */
-       function makeDocSel()   {
-               global $BE_USER,$LANG;
-
-               $docSel = '';
-                       // Render the selector ONLY if it has not been disabled:
-               if (!$this->modTSconfig['properties']['disableDocSelector'])    {
-
-                               // Checking if the currently open document is stored in the list of "open documents" - if not, then add it:
-                       if ((strcmp($this->docDat[1],$this->storeUrlMd5)||!isset($this->docHandler[$this->storeUrlMd5])) && !$this->dontStoreDocumentRef)       {
-                               $this->docHandler[$this->storeUrlMd5]=array($this->storeTitle,$this->storeArray,$this->storeUrl);
-                               $BE_USER->pushModuleData('alt_doc.php',array($this->docHandler,$this->storeUrlMd5));
-                       }
-
-                               // Now, create the document selector box:
-                       if (is_array($this->docHandler))        {
-                               $opt = array();
-                               $opt[] = '<option value="">[ '.$LANG->getLL('openDocs',1).': ]</option>';
-
-                                       // Traverse the list of open documents:
-                               foreach($this->docHandler as $md5k => $setupArr)        {
-                                       $theValue = 'alt_doc.php?'.$setupArr[2].'&returnUrl='.rawurlencode($this->retUrl);
-                                       $opt[]='<option value="'.htmlspecialchars($theValue).'"'.(!strcmp($md5k,$this->storeUrlMd5)?' selected="selected"':'').'>'.htmlspecialchars(strip_tags(t3lib_div::htmlspecialchars_decode($setupArr[0]))).'</option>';
-                               }
-
-                                       // Compile the selector box finally:
-                               $onChange = 'if(this.options[this.selectedIndex].value && !TBE_EDITOR.isFormChanged()){window.location.href=(this.options[this.selectedIndex].value);}';
-                               $docSel='<select name="_docSelector" onchange="'.htmlspecialchars($onChange).'">'.implode('',$opt).'</select>';
-
-                                       // Add CSH:
-                               $docSel.=t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'TCEforms_docSelector', $GLOBALS['BACK_PATH'],'', TRUE);
-                       }
-               }
-               return $docSel;
-       }
-
-       /**
-        * Create the selector box form element which allows to select a clear-cache operation.
-        * Can be disabled through Page TSconfig.
-        *
-        * @return      string          HTML <select> element (if applicable)
-        * @see template::clearCacheMenu()
-        */
-       function makeCmenu()    {
-               $cMenu = '';
-
-                       // Generate the menu if NOT disabled:
-               if (!$this->modTSconfig['properties']['disableCacheSelector'])  {
-                       $cMenu = $this->doc->clearCacheMenu(intval($this->viewId),!$this->modTSconfig['properties']['disableDocSelector']);
-
-                               // Add CSH:
-                       $cMenu.=t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'TCEforms_cacheSelector', $GLOBALS['BACK_PATH'],'', TRUE);
-               }
-               return $cMenu;
-       }
-
-
-       /**
-        * Put together the various elements for the header
-        *
-        * @return      string          Composite HTML
-        */
-       function compileHeader()        {
-               global $LANG;
-
-               $btns = $this->getButtons();
-               $docSel = $this->makeDocSel();
-               $cMenu = $this->makeCmenu();
-
-               $content = '
-       <!-- Page header with buttons for saving & closing and path details -->
-       <div id="typo3-docheader">
-               <div id="typo3-docheader-row1">
-                       <div class="buttonsleft">'.$btns['save'].$btns['save_view'].$btns['save_close'].$btns['save_new'].$btns['translation_save'].'</div>
-                       <div class="buttonsright">'.$docSel.$cMenu.$btns['delete'].$btns['shortcut'].$btns['history'].$buttons['columns_only'].$btns['undo'].$btns['close'].'</div>
-               </div>
-               ';
-
-               if (is_array($this->tceforms->extraFormHeaders))        {
-                       $this->extraFormHeaders = '<div id="typo3-docheader-rowextra">'.implode(chr(10), $this->tceforms->extraFormHeaders).'</div>';
-               }
-
-
-                       // language switch/selector for editing
-                       // show only when a single record is edited - multiple records are too confusing
+       
+       function langSelector() {
+               $langSelector = '';
+               
+                       // language switch/selector for editing, show only when a single record is edited
+                       // - multiple records are too confusing
                if (count($this->elementsData) == 1) {
-                       $langSelector = '<div class="langselector">'.$this->languageSwitch($this->firstEl['table'], $this->firstEl['uid'], $this->firstEl['pid']).'</div>';
+                       $langSelector = $this->languageSwitch($this->firstEl['table'], $this->firstEl['uid'], $this->firstEl['pid']);
                }
-
+               return $langSelector;
+       }
+       
+       function extraFormHeaders() {
+               $extraHeader = '';
                
-               $content.='
-               <div id="typo3-docheader-row2">
-                       <div class="pagepath">'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.htmlspecialchars($this->generalPathOfForm).'</div>
-                       <div class="infooptions">'.$langSelector.'</div>
-               </div>
-       </div>';
-               return $content;
+               if (is_array($this->tceforms->extraFormHeaders)) {
+                       $extraTemplate = t3lib_parsehtml::getSubpart($this->doc->moduleTemplate, '###DOCHEADER_EXTRAHEADER###');
+                       $extraTemplate = t3lib_parsehtml::substituteMarker($extraTemplate, '###EXTRAHEADER###', implode(chr(10), $this->tceforms->extraFormHeaders));
+               }
+               return $extraTemplate;
        }
 
-
        /**
         * Put together the various elements (buttons, selectors, form) into a table
         *
@@ -1067,11 +974,11 @@ class SC_alt_doc {
         * @return      string
         */
        function openInNewWindowLink()  {
-               global $BE_USER,$LANG;
+               global $BE_USER, $LANG;
                if ($this->returnUrl == 'close.html') {
                        return '';
                }
-               $aOnClick = 'vHWin=window.open(\''.t3lib_div::linkThisScript(array('returnUrl'=>'close.html')).'\',\''.md5($this->R_URI).'\',\''.($BE_USER->uc['edit_wideDocument']?'width=670,height=500':'width=600,height=400').',status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
+               $aOnClick = 'vHWin=window.open(\''.t3lib_div::linkThisScript(array('returnUrl'=>'close.html')).'\',\''.md5($this->R_URI).'\',\'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
                return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
                                '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/open_in_new_window.gif','width="19" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.openInNewWindow',1).'" alt="" /></a>';
        }
@@ -1084,14 +991,13 @@ class SC_alt_doc {
         */
        function tceformMessages()      {
                if (count($this->tceforms->commentMessages))    {
-                       $this->content.='
-
-<!-- TCEFORM messages
-'.htmlspecialchars(implode(chr(10),$this->tceforms->commentMessages)).'
--->
-
-';
+                       $tceformMessages = '
+                               <!-- TCEFORM messages
+                               '.htmlspecialchars(implode(chr(10),$this->tceforms->commentMessages)).'
+                               -->
+                       ';
                }
+               return $tceformMessages;
        }
 
 
index 68c87a9..6f6b645 100755 (executable)
@@ -117,184 +117,141 @@ class localRecordList extends recordList {
        var $CBnames=array();                                   // Tracking names of elements (for clipboard use)
        var $duplicateStack=array();                    // Used to track which elements has duplicates and how many
 
-
        /**
-        * Writes the top of the full listing
+        * Create the panel of buttons for submitting the form or otherwise perform operations.
         *
-        * @param       array           Current page record
-        * @return      void            (Adds content to internal variable, $this->HTMLcode)
+        * @return      array   all available buttons as an assoc. array
         */
-       function writeTop($row) {
-               global $LANG;
-
-                       // Makes the code for the pageicon in the top
-               $this->pageRow = $row;
-               $this->counter++;
-               $alttext = t3lib_BEfunc::getRecordIconAltText($row,'pages');
-               $iconImg = t3lib_iconWorks::getIconImage('pages',$row,$this->backPath,'class="absmiddle" title="'.htmlspecialchars($alttext).'"');
-               $titleCol = 'test';     // pseudo title column name
-               $this->fieldArray = Array($titleCol,'up');              // Setting the fields to display in the list (this is of course "pseudo fields" since this is the top!)
-
-
-                       // Filling in the pseudo data array:
-               $theData = Array();
-               $theData[$titleCol] = $this->widthGif;
-
-                       // Get users permissions for this row:
-               $localCalcPerms = $GLOBALS['BE_USER']->calcPerms($row);
-
-               $theData['up']=array();
-
-                       // Initialize control panel for currect page ($this->id):
-                       // Some of the controls are added only if $this->id is set - since they make sense only on a real page, not root level.
-               $theCtrlPanel =array();
-
-                       // "View page" icon is added:
-               $theCtrlPanel[]='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id,$this->backPath,t3lib_BEfunc::BEgetRootLine($this->id))).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'" alt="" />'.
-                                               '</a>';
-
-                       // If edit permissions are set (see class.t3lib_userauthgroup.php)
-               if ($localCalcPerms&2)  {
+       public function getButtons()    {
+               global $LANG;   
+               
+               $buttons = array(
+                       'csh' => '', 
+                       'view' => '', 
+                       'edit' => '', 
+                       'hide_unhide' => '', 
+                       'move' => '', 
+                       'new_record' => '',
+                       'paste' => '',
+                       'level_up' => '', 
+                       'cache' => '', 
+                       'reload' => '', 
+                       'shortcut' => '',
+                       'back' => '',
+                       'csv' => '',
+                       'export' => ''
+               );
 
-                               // Adding "Edit page" icon:
-                       if ($this->id)  {
-                               $params='&edit[pages]['.$row['uid'].']=edit';
-                               $theCtrlPanel[]='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,-1)).'">'.
-                                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.$LANG->getLL('editPage',1).'" alt="" />'.
+                       // Get users permissions for this page record:
+               $localCalcPerms = $GLOBALS['BE_USER']->calcPerms($this->pageRow);
+       
+                       // CSH
+               if (!strlen($this->id)) {
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $GLOBALS['BACK_PATH']);
+               } elseif(!$this->id) {
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $GLOBALS['BACK_PATH']);
+               } else {
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $GLOBALS['BACK_PATH']);
+               }
+               
+               if (isset($this->id)) {
+                               // View
+                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id, $this->backPath, t3lib_BEfunc::BEgetRootLine($this->id))) . '">' .
+                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/zoom.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" alt="" />' .
+                                                       '</a>';
+                       
+                               // New record
+                       if (!$GLOBALS['SOBE']->modTSconfig['properties']['noCreateRecordsLink']) {
+                               $buttons['new_record'] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'db_new.php?id=' . $this->id . '\');') . '">' .
+                                                               '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/new_el.gif') . ' title="' . $LANG->getLL('newRecordGeneral', 1) . '" alt="" />' .
                                                                '</a>';
                        }
-
-                               // Adding "New record" icon:
-                       if (!$GLOBALS['SOBE']->modTSconfig['properties']['noCreateRecordsLink'])        {
-                               $theCtrlPanel[]='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$this->backPath.'db_new.php?id='.$this->id.'\');').'">'.
-                                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_el.gif','width="11" height="12"').' title="'.$LANG->getLL('newRecordGeneral',1).'" alt="" />'.
+                                               
+                               // If edit permissions are set (see class.t3lib_userauthgroup.php)
+                       if ($localCalcPerms&2 && !empty($this->id))     {               
+                       
+                                       // Edit
+                               $params = '&edit[pages][' . $this->pageRow['uid'] . ']=edit';
+                               $buttons['edit'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->backPath, -1)) . '">' .
+                                                               '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/edit2.gif') . ' title="' . $LANG->getLL('editPage', 1) . '" alt="" />' .
                                                                '</a>';
-                       }
-
-                               // Adding "Hide/Unhide" icon:
-                       if ($this->id)  {
-                               if ($row['hidden'])     {
-                                       $params='&data[pages]['.$row['uid'].'][hidden]=0';
-                                       $theCtrlPanel[]='<a href="#" onclick="'.htmlspecialchars('return jumpToUrl(\''.$GLOBALS['SOBE']->doc->issueCommand($params,-1).'\');').'">'.
-                                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_unhide.gif','width="11" height="10"').' title="'.$LANG->getLL('unHidePage',1).'" alt="" />'.
+                                       // Unhide               
+                               if ($this->pageRow['hidden'])   {
+                                       $params = '&data[pages][' . $this->pageRow['uid'] . '][hidden]=0';
+                                       $buttons['hide_unhide'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' .
+                                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_unhide.gif') . ' title="' . $LANG->getLL('unHidePage', 1) . '" alt="" />' .
                                                                        '</a>';
+                                       // Hide
                                } else {
-                                       $params='&data[pages]['.$row['uid'].'][hidden]=1';
-                                       $theCtrlPanel[]='<a href="#" onclick="'.htmlspecialchars('return jumpToUrl(\''.$GLOBALS['SOBE']->doc->issueCommand($params,-1).'\');').'">'.
-                                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_hide.gif','width="11" height="10"').' title="'.$LANG->getLL('hidePage',1).'" alt="" />'.
+                                       $params = '&data[pages][' . $this->pageRow['uid'] . '][hidden]=1';
+                                       $buttons['hide_unhide'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">'.
+                                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_hide.gif') . ' title="' . $LANG->getLL('hidePage', 1) . '" alt="" />' .
                                                                        '</a>';
                                }
-                       }
-
-                               // Adding "move page" button:
-                       if ($this->id)  {
-                               $theCtrlPanel[]='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$this->backPath.'move_el.php?table=pages&uid='.$row['uid'].'\');').'">'.
-                                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/move_'.($this->table=='tt_content'?'record':'page').'.gif','width="11" height="12"').' title="'.$LANG->getLL('move_page',1).'" alt="" />'.
-                                                               '</a>';
-                       }
-               }
-
-                       // "Paste into page" link:
-               if (($localCalcPerms&8) || ($localCalcPerms&16))        {
-                       $elFromTable = $this->clipObj->elFromTable('');
-                       if (count($elFromTable))        {
-                               $theCtrlPanel[]='<a href="'.htmlspecialchars($this->clipObj->pasteUrl('',$this->id)).'" onclick="'.htmlspecialchars('return '.$this->clipObj->confirmMsg('pages',$this->pageRow,'into',$elFromTable)).'">'.
-                                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/clip_pasteafter.gif','width="12" height="12"').' title="'.$LANG->getLL('clip_paste',1).'" alt="" />'.
+                               
+                                       // Move
+                               $buttons['move'] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'move_el.php?table=pages&uid=' . $this->pageRow['uid'] . '\');') . '">' .
+                                                               '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/move_' . ($this->table == 'tt_content' ? 'record' : 'page') . '.gif') . ' title="' . $LANG->getLL('move_page', 1) . '" alt="" />' .
                                                                '</a>';
-                       }
-               }
-
-                       // Finally, compile all elements of the control panel into table cells:
-               if (count($theCtrlPanel))       {
-                       $theData['up'][]='
-
-                               <!--
-                                       Control panel for page
-                               -->
-                               <table border="0" cellpadding="0" cellspacing="0" class="bgColor4" id="typo3-dblist-ctrltop">
-                                       <tr>
-                                               <td>'.implode('</td>
-                                               <td>',$theCtrlPanel).'</td>
-                                       </tr>
-                               </table>';
-               }
-
-
-                       // Add "clear-cache" link:
-               $theData['up'][]='<a href="'.htmlspecialchars($this->listURL().'&clear_cache=1').'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/clear_cache.gif','width="14" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.clear_cache',1).'" alt="" />'.
-                                               '</a>';
-
-                       // Add "CSV" link, if a specific table is shown:
-               if ($this->table)       {
-                       $theData['up'][]='<a href="'.htmlspecialchars($this->listURL().'&csv=1').'">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/csv.gif','width="27" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.csv',1).'" alt="" />'.
+                                                               
+                                       // Up one level
+                               $buttons['level_up'] = '<a href="' . htmlspecialchars($this->listURL($this->pageRow['pid'])) . '" onclick="setHighlight(' . $this->pageRow['pid'] . ')">' .
+                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/pages_up.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel', 1) . '" alt="" />' .
                                                        '</a>';
-               }
-
-                       // Add "Export" link, if a specific table is shown:
-               if ($this->table && t3lib_extMgm::isLoaded('impexp'))   {
-                       $theData['up'][]='<a href="'.htmlspecialchars($this->backPath.'mod.php?M=xMOD_tximpexp&tx_impexp[action]=export&tx_impexp[list][]='.rawurlencode($this->table.':'.$this->id)).'">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,t3lib_extMgm::extRelPath('impexp').'export.gif',' width="18" height="16"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.export',1).'" alt="" />'.
-                                                       '</a>';
-               }
 
-                       // Add "refresh" link:
-               $theData['up'][]='<a href="'.htmlspecialchars($this->listURL()).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'.
-                                               '</a>';
-
-
-                       // Add icon with clickmenu, etc:
-               if ($this->id)  {       // If there IS a real page...:
-
-                               // Setting title of page + the "Go up" link:
-                       $theData[$titleCol].='<br /><span title="'.htmlspecialchars($row['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($row['_thePath'],-$this->fixedL)).'</span>';
-                       $theData['up'][]='<a href="'.htmlspecialchars($this->listURL($row['pid'])).'" onclick="setHighlight('.$row['pid'].')">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/pages_up.gif','width="18" height="16"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />'.
+                       }
+                               
+                       
+                               // Paste
+                       if (($localCalcPerms&8) || ($localCalcPerms&16)) {
+                               $elFromTable = $this->clipObj->elFromTable('');
+                               if (count($elFromTable)) {
+                                       $buttons['paste'] = '<a href="' . htmlspecialchars($this->clipObj->pasteUrl('', $this->id)) . '" onclick="' . htmlspecialchars('return ' . $this->clipObj->confirmMsg('pages', $this->pageRow, 'into', $elFromTable)) . '">' .
+                                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/clip_pasteafter.gif') . ' title="' . $LANG->getLL('clip_paste', 1) . '" alt="" />' .
+                                                                       '</a>';
+                               }
+                       }
+       
+                               // Cache
+                       $buttons['cache'] = '<a href="' . htmlspecialchars($this->listURL() . '&clear_cache=1') . '">' .
+                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/clear_cache.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.clear_cache', 1) . '" alt="" />' .
                                                        '</a>';
-
-                               // Make Icon:
-                       $theIcon = $this->clickMenuEnabled ? $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg,'pages',$this->id) : $iconImg;
-               } else {        // On root-level of page tree:
-
-                               // Setting title of root (sitename):
-                       $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_cs($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],-$this->fixedL));
-
-                               // Make Icon:
-                       $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_website.gif','width="18" height="16"').' alt="" />';
-               }
-
-                       // If there is a returnUrl given, add a back-link:
-               if ($this->returnUrl)   {
-                       $theData['up'][]='<a href="'.htmlspecialchars(t3lib_div::linkThisUrl($this->returnUrl,array('id'=>$this->id))).'" class="typo3-goBack">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/goback.gif','width="14" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.goBack',1).'" alt="" />'.
+       
+                       if ($this->table) {
+                               
+                                       // CSV
+                               $buttons['csv'] = '<a href="' . htmlspecialchars($this->listURL() . '&csv=1') . '">' .
+                                                               '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/csv.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.csv', 1) . '" alt="" />' .
+                                                               '</a>';
+                                                               
+                                       // Export
+                               if (t3lib_extMgm::isLoaded('impexp')) {
+                                       $buttons['export'] = '<a href="' . htmlspecialchars($this->backPath. 'mod.php?M=xMOD_tximpexp&tx_impexp[action]=export&tx_impexp[list][]=' . rawurlencode($this->table . ':' . $this->id)) . '">' .
+                                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, t3lib_extMgm::extRelPath('impexp') . 'export.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.export', 1) . '" alt="" />' .
+                                                                       '</a>';
+                               }
+                               
+                       }
+       
+                               // Reload
+                       $buttons['reload'] = '<a href="' . htmlspecialchars($this->listURL()) . '">' .
+                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/refresh_n.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.reload', 1) . '" alt="" />' .
                                                        '</a>';
+                                                       
+                               // Shortcut
+                       if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
+                               $buttons['shortcut'] = $GLOBALS['TBE_TEMPLATE']->makeShortcutIcon('id, imagemode, pointer, table, search_field, search_levels, showLimit, sortField, sortRev', implode(',', array_keys($this->MOD_MENU)), 'web_list');
+                       }
+                       
+                               // Back
+                       if ($this->returnUrl) {
+                               $buttons['back'] = '<a href="' . htmlspecialchars(t3lib_div::linkThisUrl($this->returnUrl, array('id' => $this->id))) . '" class="typo3-goBack">' .
+                                                               '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/goback.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.goBack', 1) . '" alt="" />' .
+                                                               '</a>';
+                       }
                }
 
-                       // Finally, the "up" pseudo field is compiled into a table - has been accumulated in an array:
-               $theData['up']='
-                       <table border="0" cellpadding="0" cellspacing="0">
-                               <tr>
-                                       <td>'.implode('</td>
-                                       <td>',$theData['up']).'</td>
-                               </tr>
-                       </table>';
-
-                       // ... and the element row is created:
-               $out.=$this->addelement(1,$theIcon,$theData,'',$this->leftMargin);
-
-                       // ... and wrapped into a table and added to the internal ->HTMLcode variable:
-               $this->HTMLcode.='
-
-
-               <!--
-                       Page header for db_list:
-               -->
-                       <table border="0" cellpadding="0" cellspacing="0" id="typo3-dblist-top">
-                               '.$out.'
-                       </table>';
+               return $buttons;
        }
 
        /**
index 1aea128..142c6ed 100755 (executable)
@@ -66,6 +66,7 @@ require_once (PATH_t3lib.'class.t3lib_page.php');
 require_once (PATH_t3lib.'class.t3lib_pagetree.php');
 require_once (PATH_t3lib.'class.t3lib_recordlist.php');
 require_once (PATH_t3lib.'class.t3lib_clipboard.php');
+require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 require_once ($BACK_PATH.'class.db_list.inc');
 require_once ($BACK_PATH.'class.db_list_extra.inc');
 $BE_USER->modAccess($MCONF,1);
@@ -204,6 +205,7 @@ class SC_db_list {
                        // Start document template object:
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
+               $this->doc->setModuleTemplate('templates/db_list.html');        
                $this->doc->docType='xhtml_trans';
 
                        // Loading current page record and checking access:
@@ -227,8 +229,9 @@ class SC_db_list {
                $dblist->alternateBgColors=$this->modTSconfig['properties']['alternateBgColors']?1:0;
                $dblist->allowedNewTables = t3lib_div::trimExplode(',',$this->modTSconfig['properties']['allowedNewTables'],1);
                $dblist->newWizards=$this->modTSconfig['properties']['newWizards']?1:0;
-
-
+               $dblist->pageRow = $this->pageinfo;
+               $dblist->counter++;
+               $dblist->MOD_MENU = array('bigControlPanel' => '', 'clipBoard' => '', 'localization' => '');
 
                        // Clipboard is initialized:
                $dblist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');          // Start clipboard
@@ -284,9 +287,6 @@ class SC_db_list {
                        $dblist->start($this->id,$this->table,$this->pointer,$this->search_field,$this->search_levels,$this->showLimit);
                        $dblist->setDispFields();
 
-                               // Render the page header:
-                       $dblist->writeTop($this->pageinfo);
-
                                // Render versioning selector:
                        $dblist->HTMLcode.= $this->doc->getVersionSelector($this->id);
 
@@ -352,41 +352,23 @@ class SC_db_list {
                                // Setting up the context sensitive menu:
                        $this->doc->getContextMenuCode();
                } // access
-
-
-
+               
                        // Begin to compile the whole page, starting out with page header:
-               $this->content='';
-               $this->content.=$this->doc->startPage('DB list');
-               $this->content.= '<form action="'.htmlspecialchars($dblist->listURL()).'" method="post" name="dblistForm">';
-
-                       // List Module CSH:
-               if (!strlen($this->id)) {
-                       $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $GLOBALS['BACK_PATH'],'<br/>|');
-               } elseif (!$this->id)   {       // zero...:
-                       $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $GLOBALS['BACK_PATH'],'<br/>|');
-               }
-
-                       // Add listing HTML code:
-               $this->content.= $dblist->HTMLcode;
-               $this->content.= '<input type="hidden" name="cmd_table" /><input type="hidden" name="cmd" /></form>';
-
-                       // List Module CSH:
-               if ($this->id)  {
-                       $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $GLOBALS['BACK_PATH'],'<br/>|');
-               }
-
+               $this->body='';
+               $this->body.= '<form action="'.htmlspecialchars($dblist->listURL()).'" method="post" name="dblistForm">';
+               $this->body.= $dblist->HTMLcode;
+               $this->body.= '<input type="hidden" name="cmd_table" /><input type="hidden" name="cmd" /></form>';
 
                        // If a listing was produced, create the page footer with search form etc:
                if ($dblist->HTMLcode)  {
 
                                // Making field select box (when extended view for a single table is enabled):
                        if ($dblist->table)     {
-                               $this->content.=$dblist->fieldSelectBox($dblist->table);
+                               $this->body.=$dblist->fieldSelectBox($dblist->table);
                        }
 
                                // Adding checkbox options for extended listing and clipboard display:
-                       $this->content.='
+                       $this->body.='
 
                                        <!--
                                                Listing options for clipboard and thumbnails
@@ -394,51 +376,41 @@ class SC_db_list {
                                        <div id="typo3-listOptions">
                                                <form action="" method="post">';
 
-                       $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[bigControlPanel]',$this->MOD_SETTINGS['bigControlPanel'],'db_list.php',($this->table?'&table='.$this->table:''),'id="checkLargeControl"').' <label for="checkLargeControl">'.$LANG->getLL('largeControl',1).'</label><br />';
+                       $this->body.=t3lib_BEfunc::getFuncCheck($this->id,'SET[bigControlPanel]',$this->MOD_SETTINGS['bigControlPanel'],'db_list.php',($this->table?'&table='.$this->table:''),'id="checkLargeControl"').' <label for="checkLargeControl">'.$LANG->getLL('largeControl',1).'</label><br />';
                        if ($dblist->showClipboard)     {
-                               $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'db_list.php',($this->table?'&table='.$this->table:''),'id="checkShowClipBoard"').' <label for="checkShowClipBoard">'.$LANG->getLL('showClipBoard',1).'</label><br />';
+                               $this->body.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'db_list.php',($this->table?'&table='.$this->table:''),'id="checkShowClipBoard"').' <label for="checkShowClipBoard">'.$LANG->getLL('showClipBoard',1).'</label><br />';
                        }
-                       $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[localization]',$this->MOD_SETTINGS['localization'],'db_list.php',($this->table?'&table='.$this->table:''),'id="checkLocalization"').' <label for="checkLocalization">'.$LANG->getLL('localization',1).'</label><br />';
-                       $this->content.='
+                       $this->body.=t3lib_BEfunc::getFuncCheck($this->id,'SET[localization]',$this->MOD_SETTINGS['localization'],'db_list.php',($this->table?'&table='.$this->table:''),'id="checkLocalization"').' <label for="checkLocalization">'.$LANG->getLL('localization',1).'</label><br />';
+                       $this->body.='
                                                </form>
                                        </div>';
-                       $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_options', $GLOBALS['BACK_PATH']);
+                       $this->body.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_options', $GLOBALS['BACK_PATH']);
 
                                // Printing clipboard if enabled:
                        if ($this->MOD_SETTINGS['clipBoard'] && $dblist->showClipboard) {
-                               $this->content.= $dblist->clipObj->printClipboard();
-                               $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_clipboard', $GLOBALS['BACK_PATH']);
-                       }
-
-                               // Link for creating new records:
-                       if (!$this->modTSconfig['properties']['noCreateRecordsLink'])   {
-                               $this->content.='
-
-                                       <!--
-                                               Link for creating a new record:
-                                       -->
-                                       <div id="typo3-newRecordLink">
-                                       <a href="'.htmlspecialchars($this->doc->backPath . 'db_new.php?id='.$this->id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                                                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/new_el.gif','width="11" height="12"').' alt="" />'.
-                                                               $LANG->getLL('newRecordGeneral',1).
-                                                               '</a>
-                                       </div>';
+                               $this->body.= $dblist->clipObj->printClipboard();
+                               $this->body.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_clipboard', $GLOBALS['BACK_PATH']);
                        }
 
                                // Search box:
-                       $this->content.=$dblist->getSearchBox();
+                       $this->body.=$dblist->getSearchBox();
 
                                // Display sys-notes, if any are found:
-                       $this->content.=$dblist->showSysNotesForPage();
-
-                               // ShortCut:
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $this->content.='<br/>'.$this->doc->makeShortcutIcon('id,imagemode,pointer,table,search_field,search_levels,showLimit,sortField,sortRev',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']);
-                       }
+                       $this->body.=$dblist->showSysNotesForPage();
                }
 
-                       // Finally, close off the page:
+                       // Setting up the buttons and markers for docheader
+               $docHeaderButtons = $dblist->getButtons();
+               $markers = array(
+                       'CSH' => $docHeaderButtons['csh'],
+                       'CONTENT' => $this->body
+               );
+               
+                       // Build the <body> for the module
+               $this->content = $this->doc->startPage('DB list');
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
                $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
index faa1ff0..686370f 100755 (executable)
@@ -55,6 +55,7 @@ require($BACK_PATH.'init.php');
 require($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:lang/locallang_mod_web_func.xml');
 require_once(PATH_t3lib.'class.t3lib_scbase.php');
+require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 
 $BE_USER->modAccess($MCONF,1);
 
@@ -101,8 +102,9 @@ class SC_mod_web_func_index extends t3lib_SCbase {
                // Main
                // **************************
                if ($this->id && $access)       {
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
+                       $this->doc = t3lib_div::makeInstance('template');
                        $this->doc->backPath = $BACK_PATH;
+                       $this->doc->setModuleTemplate('templates/func.html');
                        $this->doc->docType = 'xhtml_trans';
 
                                // JavaScript
@@ -123,18 +125,6 @@ class SC_mod_web_func_index extends t3lib_SCbase {
 
                        $this->doc->form='<form action="index.php" method="post"><input type="hidden" name="id" value="'.$this->id.'" />';
 
-                       $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.
-                               $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.
-                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>';
-
-                               // Draw the header.
-                       $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->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);
-
-
                        $vContent = $this->doc->getVersionSelector($this->id,1);
                        if ($vContent)  {
                                $this->content.=$this->doc->section('',$vContent);
@@ -143,17 +133,23 @@ class SC_mod_web_func_index extends t3lib_SCbase {
 
                        $this->extObjContent();
 
-
-
                                // Function Module CSH:
                        $this->content.= t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH'],'<br/><br/>|', FALSE, 'margin-top: 30px;');
-
-                               // ShortCut
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id','function,wiz,import_function,export_function',$this->MCONF['name']));
-                       }
-
                        $this->content.=$this->doc->spacer(10);
+                       
+                               // Setting up the buttons and markers for docheader
+                       $docHeaderButtons = $this->getButtons();
+                       $markers = array(
+                               'CSH' => $docHeaderButtons['csh'],
+                               'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                               '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);
                } else {
                                // If no access or if ID == zero
 
@@ -165,6 +161,8 @@ class SC_mod_web_func_index extends t3lib_SCbase {
                        $this->content.=$this->doc->section('','<br />'.$LANG->getLL('clickAPage_content'),0,1);
                        $this->content.=$this->doc->spacer(5);
                        $this->content.=$this->doc->spacer(10);
+                       $this->content.= $this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                }
        }
 
@@ -174,10 +172,45 @@ class SC_mod_web_func_index extends t3lib_SCbase {
         * @return      void
         */
        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()   {
+               global $TCA, $LANG, $BACK_PATH, $BE_USER;
+               
+               $buttons = array(
+                       'csh' => '',
+                       'view' => '',
+                       'record_list' => '',
+                       'shortcut' => '',
+               );
+                       // CSH
+               $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);
+               
+                       // View page
+               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
+                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
+                               '</a>';
+
+                       // Shortcut
+               if ($BE_USER->mayMakeShortcut())        {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+               }
+               
+                       // If access to Web>List for user, then link to that module.
+               if ($BE_USER->check('modules','web_list'))      {
+                       $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                       $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
+                                       '</a>';
+               }
+               return $buttons;
+       }
 }
 
 // Include extension?
index 75bc3d4..9359d21 100755 (executable)
@@ -54,6 +54,7 @@ require($BACK_PATH.'init.php');
 require($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:lang/locallang_mod_web_info.xml');
 require_once (PATH_t3lib.'class.t3lib_scbase.php');
+require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 
 $BE_USER->modAccess($MCONF,1);
 
@@ -100,8 +101,9 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                                $this->pageinfo=array('title' => '[root-level]','uid'=>0,'pid'=>0);
                        }
 
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
+                       $this->doc = t3lib_div::makeInstance('template');
                        $this->doc->backPath = $BACK_PATH;
+                       $this->doc->setModuleTemplate('templates/info.html');
                        $this->doc->docType = 'xhtml_trans';
                        $this->doc->tableLayout = Array (
                                '0' => Array (
@@ -121,27 +123,14 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                                        window.location.href = URL;
                                }
                        ');
-                       $this->doc->postCode=$this->doc->wrapScriptTags('
+                       $this->doc->postCode = $this->doc->wrapScriptTags('
                                script_ended = 1;
                                if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
                        ');
 
-
                                // Setting up the context sensitive menu:
                        $this->doc->getContextMenuCode();
-
-                       $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.
-                               $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.
-                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>';
-
-                               // Draw the header.
                        $this->doc->form = '<form action="index.php" method="post" name="webinfoForm">';
-                       $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->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);
-
 
                        $vContent = $this->doc->getVersionSelector($this->id,1);
                        if ($vContent)  {
@@ -150,18 +139,23 @@ class SC_mod_web_info_index extends t3lib_SCbase {
 
                        $this->extObjContent();
 
-
-
-
                                // Info Module CSH:
                        $this->content.= t3lib_BEfunc::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH'], '<br/>|', FALSE, 'margin-top: 30px;');
-
-                               // 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);
+                       
+                               // Setting up the buttons and markers for docheader
+                       $docHeaderButtons = $this->getButtons();
+                       $markers = array(
+                               'CSH' => $docHeaderButtons['csh'],
+                               'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                               '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);
                } else {
                                // If no access or if ID == zero
                        $this->doc = t3lib_div::makeInstance('mediumDoc');
@@ -171,6 +165,8 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                        $this->content.=$this->doc->header($LANG->getLL('title'));
                        $this->content.=$this->doc->spacer(5);
                        $this->content.=$this->doc->spacer(10);
+                       $this->content.= $this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                }
        }
 
@@ -179,11 +175,48 @@ class SC_mod_web_info_index extends t3lib_SCbase {
         *
         * @return      void
         */
-       function printContent() {
-               $this->content.= $this->doc->endPage();
+       function printContent() {               
                $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()   {
+               global $TCA, $LANG, $BACK_PATH, $BE_USER;
+               
+               $buttons = array(
+                       'csh' => '',
+                       'view' => '',
+                       'record_list' => '',
+                       'shortcut' => '',
+               );
+                       // CSH
+               $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH']);
+               
+                       // View page
+               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
+                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
+                               '</a>';
+
+                       // Shortcut
+               if ($BE_USER->mayMakeShortcut())        {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+               }
+               
+                       // If access to Web>List for user, then link to that module.
+               if ($BE_USER->check('modules','web_list'))      {
+                       $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                       $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
+                                       '</a>';
+               }
+               return $buttons;
+       }
+       
 }
 
 // Include extension?
index cfd137b..eefe071 100755 (executable)
@@ -66,6 +66,7 @@ require($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:lang/locallang_mod_web_perm.xml');
 require_once (PATH_t3lib.'class.t3lib_pagetree.php');
 require_once (PATH_t3lib.'class.t3lib_page.php');
+require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 
 $BE_USER->modAccess($MCONF,1);
 
@@ -142,9 +143,11 @@ class SC_mod_web_perm_index {
                $this->perms_clause = $BE_USER->getPagePermsClause(1);
 
                        // Initializing document template object:
-               $this->doc = t3lib_div::makeInstance('mediumDoc');
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->docType = 'xhtml_trans';
+               $this->doc->setModuleTemplate('templates/perm.html');
+               
                $this->doc->form='<form action="'.$BACK_PATH.'tce_db.php" method="post" name="editform">';
                $this->doc->JScode = '<script type="text/javascript" src="'.$BACK_PATH.'../t3lib/jsfunc.updateform.js"></script>';
                $this->doc->JScode.= $this->doc->wrapScriptTags('
@@ -216,7 +219,7 @@ class SC_mod_web_perm_index {
         */
        function main() {
                global $BE_USER,$LANG;
-
+               
                        // Access check...
                        // The page will show only if there is a valid page and if this page may be viewed by the user
                $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
@@ -242,44 +245,37 @@ class SC_mod_web_perm_index {
                        }
 
                                // Draw the HTML page header.
-                       $this->content.=$this->doc->startPage($LANG->getLL('permissions'));
                        $this->content.=$this->doc->header($LANG->getLL('permissions').($this->edit?': '.$LANG->getLL('Edit'):''));
                        $this->content.=$this->doc->spacer(5);
-                       $this->content.=$this->doc->section('',
-                               $this->doc->funcMenu(
-                                       $this->doc->getHeader('pages',$this->pageinfo,htmlspecialchars($this->pageinfo['_thePath'])).'<br />'.
-                                               $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.
-                                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>',
-                                       t3lib_BEfunc::getFuncMenu($this->id,'SET[mode]',$this->MOD_SETTINGS['mode'],$this->MOD_MENU['mode'])
-                               ));
-                       $this->content.=$this->doc->divider(5);
-
-
 
                        $vContent = $this->doc->getVersionSelector($this->id,1);
                        if ($vContent)  {
                                $this->content.=$this->doc->section('',$vContent);
                        }
 
-
-
                                // Main function, branching out:
                        if (!$this->edit)       {
                                $this->notEdit();
                        } else {
                                $this->doEdit();
                        }
-
-                               // ShortCut
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $this->content.=
-                                       $this->doc->spacer(20).
-                                       $this->doc->section('',$this->doc->makeShortcutIcon('id,edit,return_id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));
-                       }
+                       
+                       $docHeaderButtons = $this->getButtons();
+
+                       $markers['CSH'] = $this->docHeaderButtons['csh'];
+                       $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[mode]', $this->MOD_SETTINGS['mode'], $this->MOD_MENU['mode']);
+                       $markers['CONTENT'] = $this->content;
+                       
+                               // Build the <body> for the module
+                       $this->content = $this->doc->startPage($LANG->getLL('permissions'));
+                       $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+                       $this->content.= $this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                } else {
                                // If no access or if ID == zero
                        $this->content.=$this->doc->startPage($LANG->getLL('permissions'));
                        $this->content.=$this->doc->header($LANG->getLL('permissions'));
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                }
        }
 
@@ -289,12 +285,46 @@ class SC_mod_web_perm_index {
         * @return      void
         */
        function printContent() {
-               $this->content.= $this->doc->endPage();
                $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()   {
+               global $TCA, $LANG, $BACK_PATH, $BE_USER;
+               
+               $buttons = array(
+                       'csh' => '',
+                       'view' => '',
+                       'record_list' => '',
+                       'shortcut' => '',
+               );
+                       // CSH
+               $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH']);
+               
+                       // View page
+               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
+                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
+                               '</a>';
+
+                       // Shortcut
+               if ($BE_USER->mayMakeShortcut())        {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+               }
+               
+                       // If access to Web>List for user, then link to that module.
+               if ($BE_USER->check('modules','web_list'))      {
+                       $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                       $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
+                                       '</a>';
+               }
+               return $buttons;
+       }
 
 
 
index 3bf5248..43b316e 100755 (executable)
@@ -126,8 +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 { 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 { padding: 0; margin: 0; overflow: hidden; height: 100%; }
 
 
 /****************************************
@@ -376,13 +375,14 @@ div#typo3-docheader-row2 { background: #e4e0db; height: 27px; line-height: 27px;
 div#typo3-docheader div.buttonsleft  { margin: 0 0 0 3px; line-height: 16px; float: left; }
 div#typo3-docheader div.buttonsright { margin: 0 3px 0 0; line-height: 16px; float: right; }
 div#typo3-docheader img, div#typo3-docheader input { margin: 2px 3px 0; vertical-align: top; }
-div#typo3-docheader img.typo3-csh-icon { margin: 2px 15px 0 2px; }
-div#typo3-docheader select { margin: 2px 0 0; }
+div#typo3-docheader img.typo3-csh-icon { margin: 2px 2px 0 2px; }
+div#typo3-docheader select { margin: 1px 0 0; }
 div#typo3-docheader div.pagepath { margin-left: 6px; float: left; }
 div#typo3-docheader div.infooptions { margin-right: 6px; float: right; }
-div#typo3-docbody { width: 98%; padding: 2% 0% 2% 2%; overflow: auto; top: 49px; bottom: 0; position: absolute; z-index: 2; }
-* html div#typo3-docbody { height: 90%; top: 49px; padding-top: 0; padding-bottom: 0; }
+div#typo3-docbody { width: 98%; padding: 2% 0% 2% 2%; overflow: auto; top: 51px; bottom: 0; position: absolute; z-index: 2; }
+* html div#typo3-docbody { height: 90%; top: 51px; padding-top: 0; padding-bottom: 0; }
 * html div#typo3-docbody table.typo3-TCEforms { margin-top: 20px; }
+div#typo3-docheader div.buttongroup { height: 20px; float: left; padding-right: 20px; border-right: 1px dashed #ccc; margin-right: 5px; }
 
 /* Login Screen
 
@@ -454,6 +454,9 @@ BODY#typo3-file-edit-php DIV#c-submit, BODY#typo3-file-edit-php DIV#c-edit {
        margin-top: 10px;
 }
 
+/* Module docheader */
+SPAN.typo3-docheader-pagePath { font-weight: bold; }
+
 /* Web > Page */
 TABLE.typo3-page-ceHeader { width: 100%; }
 TABLE.typo3-page-ceHeader IMG { vertical-align: middle; }
@@ -484,7 +487,7 @@ DIV#typo3-newRecordLink, DIV.typo3-newRecordLink, DIV.typo3-localizationLink, DI
 DIV#typo3-newRecordLink IMG, DIV.typo3-newRecordLink IMG, DIV.typo3-localizationLink IMG, DIV.typo3-synchronizationLink IMG { margin-right: 5px; vertical-align: middle; }
 
 INPUT.smallCheckboxes { vertical-align: middle; margin: 0px; padding: 0px; width: 12px; height: 12px; }
-DIV#typo3-listOptions { margin: 10px 0px 10px 0px; }
+DIV#typo3-listOptions { margin: 10px 0px 10px 0px; width: 93%; }
 
 /* Web > Template */
 .typo3-tstemplate-ceditor-control { margin-right: 3px; vertical-align: bottom;cursor:pointer;}
@@ -592,8 +595,8 @@ TABLE.ver-subtree TR.typo3-ver-noComp TD { font-style: italic; }
  *********************************************/
 
 /* context menus */
-div#contentMenu0 { z-index: 1; position: absolute; }
-div#contentMenu1 { z-index: 2; position: absolute; }
+div#contentMenu0 { z-index: 10; position: absolute; }
+div#contentMenu1 { z-index: 20; position: absolute; }
 
 /* Dimmed span tag color (disabled) */
 .typo3-dimmed { color: #666; }
@@ -686,3 +689,5 @@ PRE.ts-hl .ts-linenum { background-color: #eee; }
 H2,H3,H4,DIV { border: 1px dotted #666; }
 */
 
+
+
index c896a59..63978ee 100755 (executable)
@@ -75,6 +75,7 @@ $LANG->includeLLFile('EXT:cms/layout/locallang.xml');
 require_once(PATH_t3lib.'class.t3lib_pagetree.php');
 require_once(PATH_t3lib.'class.t3lib_page.php');
 require_once(PATH_t3lib.'class.t3lib_recordlist.php');
+require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
 require_once(PATH_typo3.'class.db_list.inc');
 require_once('class.tx_cms_layout.php');
 require_once(PATH_t3lib.'class.t3lib_positionmap.php');
@@ -403,8 +404,9 @@ class SC_db_layout {
                        $this->EDIT_CONTENT = ($this->CALC_PERMS&16) ? 1 : 0;
 
                                // Start document template object:
-                       $this->doc = t3lib_div::makeInstance('mediumDoc');
+                       $this->doc = t3lib_div::makeInstance('template');
                        $this->doc->backPath = $BACK_PATH;
+                       $this->doc->setModuleTemplate('templates/db_layout.html');                      
                        $this->doc->docType='xhtml_trans';
 
                                // JavaScript:
@@ -430,21 +432,87 @@ class SC_db_layout {
                                        return false;
                                }
                        ');
+                       $this->doc->JScode.= $this->doc->wrapScriptTags('
+                               var DTM_array = new Array();
+                               var DTM_origClass = new String();
+
+                                       // if tabs are used in a popup window the array might not exists
+                               if(!top.DTM_currentTabs) {
+                                       top.DTM_currentTabs = new Array();
+                               }
+
+                               function DTM_activate(idBase,index,doToogle)    {       //
+                                               // Hiding all:
+                                       if (DTM_array[idBase])  {
+                                               for(cnt = 0; cnt < DTM_array[idBase].length ; cnt++)    {
+                                                       if (DTM_array[idBase][cnt] != idBase+"-"+index) {
+                                                               document.getElementById(DTM_array[idBase][cnt]+"-DIV").style.display = "none";
+                                                               document.getElementById(DTM_array[idBase][cnt]+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
+                                                       }
+                                               }
+                                       }
+
+                                               // Showing one:
+                                       if (document.getElementById(idBase+"-"+index+"-DIV"))   {
+                                               if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block")      {
+                                                       document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
+                                                       if(DTM_origClass=="") {
+                                                               document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
+                                                       } else {
+                                                               DTM_origClass = "tab";
+                                                       }
+                                                       top.DTM_currentTabs[idBase] = -1;
+                                               } else {
+                                                       document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
+                                                       if(DTM_origClass=="") {
+                                                               document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
+                                                       } else {
+                                                               DTM_origClass = "tabact";
+                                                       }
+                                                       top.DTM_currentTabs[idBase] = index;
+                                               }
+                                       }
+                               }
+                               function DTM_toggle(idBase,index,isInit)        {       //
+                                               // Showing one:
+                                       if (document.getElementById(idBase+"-"+index+"-DIV"))   {
+                                               if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block")  {
+                                                       document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
+                                                       if(isInit) {
+                                                               document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
+                                                       } else {
+                                                               DTM_origClass = "tab";
+                                                       }
+                                                       top.DTM_currentTabs[idBase+"-"+index] = 0;
+                                               } else {
+                                                       document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
+                                                       if(isInit) {
+                                                               document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
+                                                       } else {
+                                                               DTM_origClass = "tabact";
+                                                       }
+                                                       top.DTM_currentTabs[idBase+"-"+index] = 1;
+                                               }
+                                       }
+                               }
+
+                               function DTM_mouseOver(obj) {   //
+                                               DTM_origClass = obj.attributes.getNamedItem(\'class\').nodeValue;
+                                               obj.attributes.getNamedItem(\'class\').nodeValue += "_over";
+                               }
+
+                               function DTM_mouseOut(obj) {    //
+                                               obj.attributes.getNamedItem(\'class\').nodeValue = DTM_origClass;
+                                               DTM_origClass = "";
+                               }
+                       ');
 
                                // Setting doc-header
                        $this->doc->form='<form action="'.htmlspecialchars('db_layout.php?id='.$this->id.'&imagemode='.$this->imagemode).'" method="post">';
 
                                // Creating the top function menu:
-                       $this->topFuncMenu = t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'],'db_layout.php','').
-                                               (count($this->MOD_MENU['language'])>1 ? '<br />'.t3lib_BEfunc::getFuncMenu($this->id,'SET[language]',$this->current_sys_language,$this->MOD_MENU['language'],'db_layout.php','') : '');
-
-                               // Creating the top edit page icon:
-                       if ($this->CALC_PERMS&2)        {
-                               $params='&edit[pages]['.$this->id.']=edit';
-                               $this->editIcon='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$BACK_PATH)).'"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/edit2.gif','width="11" height="12"').' vspace="2" align="top" title="'.$LANG->getLL('editPageProperties',1).'" alt="" /></a>';
-                       } else {
-                               $this->editIcon='';
-                       }
+                       $this->topFuncMenu = t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'],'db_layout.php','');
+                       $this->languageMenu = (count($this->MOD_MENU['language'])>1 ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.language',1) . t3lib_BEfunc::getFuncMenu($this->id,'SET[language]',$this->current_sys_language,$this->MOD_MENU['language'],'db_layout.php','') : '');
 
                                // Find columns
                        $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED');             // SHARED page-TSconfig settings.
@@ -455,35 +523,42 @@ class SC_db_layout {
 
                                // Render the primary module content:
                        if ($this->MOD_SETTINGS['function']==0) {
-                               $this->renderQuickEdit();       // QuickEdit
+                               $body = $this->renderQuickEdit();       // QuickEdit
                        } else {
-                               $this->renderListContent();     // All other listings
+                               $body = $this->renderListContent();     // All other listings
                        }
 
-
-                               // ShortCut
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id,edit_record,pointer,new_unique_uid,search_field,search_levels,showLimit',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));
-                       }
-
-                               // Ending page:
-                       $this->content.=$this->doc->spacer(10);
-                       $this->content.=$this->doc->endPage();
+                               // Setting up the buttons and markers for docheader
+                       $docHeaderButtons = $this->getButtons($this->MOD_SETTINGS['function']==0 ? 'quickEdit' : '');
+                       $markers = array(
+                               'CSH' => $docHeaderButtons['csh'],
+                               'TOP_FUNCTION_MENU' => $this->editSelect . $this->topFuncMenu,
+                               'LANGSELECTOR' => $this->languageMenu,
+                               'CONTENT' => $body
+                       );      
+
+                               // 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);
+                       
                } else {
 
                                // If no access or id value, create empty document:
                        $this->doc = t3lib_div::makeInstance('mediumDoc');
                        $this->doc->docType='xhtml_trans';
                        $this->doc->backPath = $BACK_PATH;
+                       
                        $this->doc->JScode = $this->doc->wrapScriptTags('
                                if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
                        ');
+                       
                        $this->content=$this->doc->startPage($LANG->getLL('title'));
                        $this->content.=$this->doc->section($LANG->getLL('clickAPage_header'),$LANG->getLL('clickAPage_content'),0,1);
-
                        $this->content.= t3lib_BEfunc::cshItem($this->descrTable,'',$BACK_PATH,'<br/><br/>');
-
                        $this->content.=$this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                }
        }
 
@@ -494,7 +569,9 @@ class SC_db_layout {
         */
        function renderQuickEdit()      {
                global $LANG,$BE_USER,$BACK_PATH;
-
+                       // Alternative template
+               $this->doc->setModuleTemplate('templates/db_layout_quickedit.html');
+               
                        // Alternative form tag; Quick Edit submits its content to tce_db.php.
                $this->doc->form='<form action="'.htmlspecialchars($BACK_PATH.'tce_db.php?&prErr=1&uPT=1').'" method="post" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">';
 
@@ -606,18 +683,18 @@ class SC_db_layout {
 
 
                        // Splitting the edit-record cmd value into table/uid:
-               $eRParts = explode(':',$edit_record);
+               $this->eRParts = explode(':',$edit_record);
 
 
 
                        // Delete-button flag?
-               $deleteButton = (t3lib_div::testInt($eRParts[1]) && $edit_record && (($eRParts[0]!='pages'&&$this->EDIT_CONTENT) || ($eRParts[0]=='pages'&&($this->CALC_PERMS&4))));
+               $this->deleteButton = (t3lib_div::testInt($this->eRParts[1]) && $edit_record && (($this->eRParts[0]!='pages'&&$this->EDIT_CONTENT) || ($this->eRParts[0]=='pages'&&($this->CALC_PERMS&4))));
 
                        // If undo-button should be rendered (depends on available items in sys_history)
-               $undoButton=0;
-               $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename='.$GLOBALS['TYPO3_DB']->fullQuoteStr($eRParts[0], 'sys_history').' AND recuid='.intval($eRParts[1]), '', 'tstamp DESC', '1');
-               if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes))     {
-                       $undoButton=1;
+               $this->undoButton=0;
+               $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->eRParts[0], 'sys_history').' AND recuid='.intval($this->eRParts[1]), '', 'tstamp DESC', '1');
+               if ($this->undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes))       {
+                       $this->undoButton=1;
                }
 
                        // Setting up the Return URL for coming back to THIS script (if links take the user to another script)
@@ -627,97 +704,32 @@ class SC_db_layout {
                unset($R_URL_getvars['popView']);
                unset($R_URL_getvars['new_unique_uid']);
                $R_URL_getvars['edit_record']=$edit_record;
-               $R_URI = $R_URL_parts['path'].'?'.t3lib_div::implodeArrayForUrl('',$R_URL_getvars);
+               $this->R_URI = $R_URL_parts['path'].'?'.t3lib_div::implodeArrayForUrl('',$R_URL_getvars);
 
                        // Setting close url/return url for exiting this script:
-               $closeUrl = $this->local_linkThisScript(array('SET'=>array('function'=>1)));    // Goes to 'Columns' view if close is pressed (default)
+               $this->closeUrl = $this->local_linkThisScript(array('SET'=>array('function'=>1)));      // Goes to 'Columns' view if close is pressed (default)
 
                if ($BE_USER->uc['condensedMode'])      {
-                       $closeUrl = $BACK_PATH.'alt_db_navframe.php';
+                       $this->closeUrl = $BACK_PATH.'alt_db_navframe.php';
                }
                if ($this->returnUrl)   {
-                       $closeUrl = $this->returnUrl;
+                       $this->closeUrl = $this->returnUrl;
                }
                        // Return-url for JavaScript:
                $retUrlStr = $this->returnUrl?"+'&returnUrl='+'".rawurlencode($this->returnUrl)."'":'';
 
-                       // Drawing tool bar:
-               $toolBar=
-                       '<select name="edit_record" onchange="'.htmlspecialchars('jumpToUrl(\'db_layout.php?id='.$this->id.'&edit_record=\'+escape(this.options[this.selectedIndex].value)'.$retUrlStr.',this);').'">'.implode('',$opt).'</select>'.
-
-                       '<input class="c-inputButton" type="image" name="savedok"'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/savedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc',1).'" alt="" />'.
-
-                       '<a href="#" onclick="'.htmlspecialchars('document.editform.redirect.value+=\'&popView=1\'; TBE_EDITOR.checkAndDoSubmit(1); return false;').'">'.
-                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/savedokshow.gif','width="21" height="16"').' class="c-inputButton" title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDocShow',1).'" alt="" />'.
-                               '</a>'.
-
-                       '<a href="#" onclick="'.htmlspecialchars('jumpToUrl(unescape(\''.rawurlencode($closeUrl).'\')); return false;').'">'.
-                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/closedok.gif','width="21" height="16"').' class="c-inputButton" title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc',1).'" alt="" />'.
-                               '</a>'.
-
-                       ($deleteButton ? '<a href="#" onclick="'.htmlspecialchars('return deleteRecord(\''.$eRParts[0].'\',\''.$eRParts[1].'\',\''.t3lib_div::getIndpEnv('SCRIPT_NAME').'?id='.$this->id.'\');').'">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/deletedok.gif','width="21" height="16"').' class="c-inputButton" title="'.$LANG->getLL('deleteItem',1).'" alt="" />'.
-                                                       '</a>' : '').
-
-                       ($undoButton ? '<a href="#" onclick="'.htmlspecialchars('window.location.href=\''.$BACK_PATH.'show_rechis.php?element='.rawurlencode($eRParts[0].':'.$eRParts[1]).'&revert=ALL_FIELDS&sumUp=-1&returnUrl='.rawurlencode($R_URI).'\'; return false;').'">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/undo.gif','width="21" height="16"').' class="c-inputButton" title="'.htmlspecialchars(sprintf($LANG->getLL('undoLastChange'),t3lib_BEfunc::calcAge(time()-$undoButtonR['tstamp'],$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))).'" alt="" />'.
-                                                       '</a>' : '');
-
-               $toolBar.='<img src="clear.gif" width="15" height="1" align="top" alt="" />';
-
-               $toolBar.=$undoButton?'<a href="#" onclick="'.htmlspecialchars('jumpToUrl(\''.$BACK_PATH.'show_rechis.php?element='.rawurlencode($eRParts[0].':'.$eRParts[1]).'&returnUrl='.rawurlencode($R_URI).'#latest\');return false;').'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/history2.gif','width="13" height="12"').' class="c-inputButton" title="'.$LANG->getLL('recordHistory',1).'" alt="" />'.
-                                       '</a>':'';
-
-               $toolBar.='<a href="'.htmlspecialchars('db_new_content_el.php?id='.$this->id.'&sys_language_uid='.$this->current_sys_language.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/new_record.gif','width="16" height="12"').' class="c-inputButton" title="'.$LANG->getLL('newContentElement',1).'" alt="" />'.
-                                       '</a>';
-
-               if (t3lib_div::testInt($eRParts[1])) $toolBar.='<a href="'.htmlspecialchars($BACK_PATH.'move_el.php?table='.$eRParts[0].'&uid='.$eRParts[1].'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/move_'.($eRParts[0]=='tt_content'?'record':'page').'.gif','width="11" height="12"').' class="c-inputButton" title="'.$LANG->getLL('move_'.($eRParts[0]=='tt_content'?'record':'page'),1).'" alt="" /></a>';
-
-               $toolBar.='<a href="#" onclick="'.htmlspecialchars('jumpToUrl(\''.$BACK_PATH.'db_new.php?id='.$this->id.'&pagesOnly=1&returnUrl='.rawurlencode($R_URI).'\');return false;').'">'.
-                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/new_page.gif','width="13" height="12"').' class="c-inputButton" title="'.$LANG->getLL('newPage',1).'" alt="" />'.
-                               '</a>';
-
-               $toolBar.='<a href="'.htmlspecialchars($this->local_linkThisScript(array('edit_record'=>'pages:'.$this->id))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/edit2.gif','width="11" height="12"').' class="c-inputButton" title="'.$LANG->getLL('editPageProperties',1).'" alt="" />'.
-                               '</a>';
-               $toolBar.='<img src="clear.gif" width="15" height="1" align="top" alt="" />';
-
-                       // CSH:
-               $toolBar.= t3lib_BEfunc::cshItem($this->descrTable,'quickEdit',$BACK_PATH,'',FALSE,'margin-top: 0px; margin-bottom: 0px;');
-
-                       // Setting page properties:
-               $hS2 = '
-                       <table border="0" cellpadding="0" cellspacing="0" width="460">
-                               <tr>
-                                       <td valign="top" width="99%">'.$this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath'],0,explode('|','<a href="'.htmlspecialchars($this->local_linkThisScript(array('edit_record'=>'pages:'.$this->id))).'">|</a>')).'</td>
-                                       <td valign="top" width="1%">'.$this->topFuncMenu.'</td>
-                                       <td valign="top" width="1%"><img src="clear.gif" width="1" height="3" alt="" /><br />'.$this->editIcon.'</td>
-                               </tr>
-                               <tr>
-                                       <td><img src="clear.gif" width="300" height="1" alt="" /></td>
-                                       <td></td>
-                                       <td></td>
-                               </tr>
-                               <tr>
-                                       <td colspan="3" class="bgColor4">'.$toolBar.'</td>
-                               </tr>
-                       </table>';
-
-               $content.=$this->doc->startPage($LANG->getLL('title'));
-               $content.=$this->doc->section('',$hS2);
-               $content.=$this->doc->spacer(7);
+                       // Drawing the edit record selectbox
+               $this->editSelect = '<select name="edit_record" onchange="' . htmlspecialchars('jumpToUrl(\'db_layout.php?id=' . $this->id . '&edit_record=\'+escape(this.options[this.selectedIndex].value)' . $retUrlStr . ',this);') . '">' . implode('', $opt) . '</select>';
 
                        // Creating editing form:
-               if ($BE_USER->check('tables_modify',$eRParts[0]) && $edit_record && (($eRParts[0]!='pages'&&$this->EDIT_CONTENT) || ($eRParts[0]=='pages'&&($this->CALC_PERMS&1))))     {
+               if ($BE_USER->check('tables_modify',$this->eRParts[0]) && $edit_record && (($this->eRParts[0]!='pages'&&$this->EDIT_CONTENT) || ($this->eRParts[0]=='pages'&&($this->CALC_PERMS&1))))   {
 
                                // Splitting uid parts for special features, if new:
-                       list($uidVal,$ex_pid,$ex_colPos) = explode('/',$eRParts[1]);
+                       list($uidVal,$ex_pid,$ex_colPos) = explode('/',$this->eRParts[1]);
 
                                // Convert $uidVal to workspace version if any:
                        if ($uidVal!='new')     {
-                               if ($draftRecord = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $eRParts[0], $uidVal, 'uid'))      {
+                               if ($draftRecord = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $this->eRParts[0], $uidVal, 'uid'))        {
                                        $uidVal = $draftRecord['uid'];
                                }
                        }
@@ -725,13 +737,13 @@ class SC_db_layout {
                                // Initializing transfer-data object:
                        $trData = t3lib_div::makeInstance('t3lib_transferData');
                        $trData->addRawData = TRUE;
-                       $trData->defVals[$eRParts[0]] = array (
+                       $trData->defVals[$this->eRParts[0]] = array (
                                'colPos' => intval($ex_colPos),
                                'sys_language_uid' => intval($this->current_sys_language)
                        );
                        $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
                        $trData->lockRecords=1;
-                       $trData->fetchRecord($eRParts[0],($uidVal=='new'?$this->id:$uidVal),$uidVal);   // 'new'
+                       $trData->fetchRecord($this->eRParts[0],($uidVal=='new'?$this->id:$uidVal),$uidVal);     // 'new'
 
                                // Getting/Making the record:
                        reset($trData->regTableItems_data);
@@ -745,7 +757,7 @@ class SC_db_layout {
                                $rec['uid'] = $uidVal;
 
                                        // Checking internals access:
-                               $recordAccess = $BE_USER->recordEditAccessInternals($eRParts[0],$uidVal);
+                               $recordAccess = $BE_USER->recordEditAccessInternals($this->eRParts[0],$uidVal);
                        }
 
                        if (!$recordAccess)     {
@@ -772,26 +784,26 @@ class SC_db_layout {
 
                                        // Render form, wrap it:
                                $panel='';
-                               $panel.=$tceforms->getMainFields($eRParts[0],$rec);
-                               $panel=$tceforms->wrapTotal($panel,$rec,$eRParts[0]);
+                               $panel.=$tceforms->getMainFields($this->eRParts[0],$rec);
+                               $panel=$tceforms->wrapTotal($panel,$rec,$this->eRParts[0]);
 
                                        // Add hidden fields:
                                $theCode=$panel;
                                if ($uidVal=='new')     {
-                                       $theCode.='<input type="hidden" name="data['.$eRParts[0].']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
+                                       $theCode.='<input type="hidden" name="data['.$this->eRParts[0].']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
                                }
                                $theCode.='
                                        <input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />
                                        <input type="hidden" name="_disableRTE" value="'.$tceforms->disableRTE.'" />
                                        <input type="hidden" name="edit_record" value="'.$edit_record.'" />
-                                       <input type="hidden" name="redirect" value="'.htmlspecialchars($uidVal=='new' ? t3lib_extMgm::extRelPath('cms').'layout/db_layout.php?id='.$this->id.'&new_unique_uid='.$new_unique_uid.'&returnUrl='.rawurlencode($this->returnUrl) : $R_URI ).'" />
+                                       <input type="hidden" name="redirect" value="'.htmlspecialchars($uidVal=='new' ? t3lib_extMgm::extRelPath('cms').'layout/db_layout.php?id='.$this->id.'&new_unique_uid='.$new_unique_uid.'&returnUrl='.rawurlencode($this->returnUrl) : $this->R_URI ).'" />
                                        ';
 
                                        // Add JavaScript as needed around the form:
                                $theCode=$tceforms->printNeededJSFunctions_top().$theCode.$tceforms->printNeededJSFunctions();
 
                                        // Add warning sign if record was "locked":
-                               if ($lockInfo=t3lib_BEfunc::isRecordLocked($eRParts[0],$rec['uid']))    {
+                               if ($lockInfo=t3lib_BEfunc::isRecordLocked($this->eRParts[0],$rec['uid']))      {
                                        $lockIcon='
 
                                                <!--
@@ -842,7 +854,7 @@ class SC_db_layout {
 
 
                        // Select element matrix:
-               if ($eRParts[0]=='tt_content' && t3lib_div::testInt($eRParts[1]))       {
+               if ($this->eRParts[0]=='tt_content' && t3lib_div::testInt($this->eRParts[1]))   {
                        $posMap = t3lib_div::makeInstance('ext_posMap');
                        $posMap->backPath = $BACK_PATH;
                        $posMap->cur_sys_language=$this->current_sys_language;
@@ -852,19 +864,7 @@ class SC_db_layout {
                                // CSH:
                        $HTMLcode.= t3lib_BEfunc::cshItem($this->descrTable,'quickEdit_selElement',$BACK_PATH,'|<br/>');
 
-                       $HTMLcode.=$posMap->printContentElementColumns($this->id,$eRParts[1],$this->colPosList,$this->MOD_SETTINGS['tt_content_showHidden'],$R_URI);
-
-                       $HTMLcode.='<br /><br />'.
-                                               '<a href="'.htmlspecialchars($BACK_PATH.'move_el.php?table=tt_content&uid='.$eRParts[1].'&sys_language_uid='.$this->current_sys_language.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'"><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/move_record.gif','width="11" height="12"').' vspace="0" hspace="5" align="top" title="'.$LANG->getLL('move_record',1).'" alt="" />'.
-                                               $LANG->getLL('move_record',1).
-                                               '</a>';
-
-                       $HTMLcode.='<br /><img src="clear.gif" width="1" height="5" alt="" />';
-                       $HTMLcode.='<br />'.
-                                               '<a href="'.htmlspecialchars('db_new_content_el.php?id='.$this->id.'&sys_language_uid='.$this->current_sys_language.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/new_record.gif','width="16" height="12"').' vspace="0" hspace="2" align="top" title="'.$LANG->getLL('newContentElement',1).'" alt="" />'.
-                                               $LANG->getLL('newContentElement',1).
-                                               '</a>';
+                       $HTMLcode.=$posMap->printContentElementColumns($this->id,$this->eRParts[1],$this->colPosList,$this->MOD_SETTINGS['tt_content_showHidden'],$this->R_URI);
 
                        $content.=$this->doc->spacer(20);
                        $content.=$this->doc->section($LANG->getLL('CEonThisPage'),$HTMLcode,0,1);
@@ -879,9 +879,7 @@ class SC_db_layout {
        -->
        ';
                }
-
-                       // Adding content to internal accumulation variable:
-               $this->content.=$content;
+               return $content;
        }
 
        /**
@@ -1034,130 +1032,43 @@ class SC_db_layout {
                        // For Context Sensitive Menus:
                $this->doc->getContextMenuCode();
 
-
-                       // Draw the page properties.
-               $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath'],$this->modTSconfig['properties']['disableIconToolbar']?1:0).'<br />'.
-                                               $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.
-                                               '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>';
-
-               if (!$this->modTSconfig['properties']['disableIconToolbar'])    {
-                               // Create icon "toolbar" for common operations like creating/moving elements/pages etc.
-                       $toolBar='';
-                               // History:
-                       $toolBar.='<a href="#" onclick="'.htmlspecialchars('jumpToUrl(\''.$BACK_PATH.'show_rechis.php?element='.rawurlencode('pages:'.$this->id).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')).'#latest\');return false;').'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/history2.gif','width="13" height="12"').' vspace="2" hspace="2" align="top" title="'.$LANG->getLL('recordHistory',1).'" alt="" />'.
-                                               '</a>';
-                               // New content element
-                       $toolBar.='<a href="'.htmlspecialchars('db_new_content_el.php?id='.$this->id.'&sys_language_uid='.$this->current_sys_language.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/new_record.gif','width="16" height="12"').' vspace="2" hspace="1" align="top" title="'.$LANG->getLL('newContentElement',1).'" alt="" />'.
-                                               '</a>';
-                               // Move page:
-                       $toolBar.='<a href="'.htmlspecialchars($BACK_PATH.'move_el.php?table=pages&uid='.$this->id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/move_page.gif','width="11" height="12"').' vspace="2" hspace="2" align="top" title="'.$LANG->getLL('move_page',1).'" alt="" />'.
-                                               '</a>';
-                               // Create new page (wizard):
-                       $toolBar.='<a href="#" onclick="'.htmlspecialchars('jumpToUrl(\''.$BACK_PATH.'db_new.php?id='.$this->id.'&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')).'\');return false;').'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/new_page.gif','width="13" height="12"').' hspace="0" vspace="2" align="top" title="'.$LANG->getLL('newPage',1).'" alt="" />'.
-                                               '</a>';
-                               // Edit page properties:
-                       $params='&edit[pages]['.$this->id.']=edit';
-                       $toolBar.='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$BACK_PATH)).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/edit2.gif','width="11" height="12"').' hspace="2" vspace="2" align="top" title="'.$LANG->getLL('editPageProperties',1).'" alt="" />'.
-                                               '</a>';
-
-                               // Add CSH (Context Sensitive Help) icon to tool bar:
-                       $toolBar.= t3lib_BEfunc::cshItem($this->descrTable,'columns_'.$this->MOD_SETTINGS['function'],$BACK_PATH,'',FALSE,'margin-top: 0px; margin-bottom: 0px;');
-
-                               // Wrap the toolbar into a table:
-                       $headerSection.='
-                               <table border="0" cellpadding="0" cellspacing="0" class="bgColor4">
-                                       <tr>
-                                               <td>'.$toolBar.'</td>
-                                       </tr>
-                               </table>';
-               }
-
-                       // Create menu of table-icons for jumping to table-listing anchor points:
-               if ($this->MOD_SETTINGS['function']!=3 && count($tableOutput)>1)        {
-                       $goToTable_menu = '<td valign="top" width="1%" nowrap="nowrap">'.$h_menu.'</td>';
-               } else {
-                       $goToTable_menu = '';
-               }
-
-                       // Compile the whole header section into a table: Toolbar, Table selector, Function menu(s), Page-edit icon:
-               $hS2='
-                       <table border="0" cellpadding="0" cellspacing="0" width="100%">
-                               <tr>
-                                       <td valign="top" width="99%">'.$headerSection.'</td>
-                                       '.$goToTable_menu.'
-                                       <td valign="top" width="1%">'.$this->topFuncMenu.'</td>
-                                       <td valign="top" align="right" width="1%"><img src="clear.gif" width="1" height="3" alt="" /><br />'.$this->editIcon.'</td>
-                               </tr>
-                       </table>';
-
-                       // Create page properties:
-               $this->content.=$this->doc->startPage($LANG->getLL('title'));
-               $this->content.=$this->doc->section('',$hS2);
-
-
                        // Now, create listing based on which element is selected in the function menu:
 
                if ($this->MOD_SETTINGS['function']==3) {
 
                                // Making page info:
-                       $this->content.=$this->doc->spacer(10);
-                       $this->content.=$this->doc->section($LANG->getLL('pageInformation'),$dblist->getPageInfoBox($this->pageinfo,$this->CALC_PERMS&2),0,1);
+                       $content.=$this->doc->spacer(10);
+                       $content.=$this->doc->section($LANG->getLL('pageInformation'),$dblist->getPageInfoBox($this->pageinfo,$this->CALC_PERMS&2),0,1);
                } else {
 
                                // Add the content for each table we have rendered (traversing $tableOutput variable)
                        foreach($tableOutput as $table => $output)      {
-                               $this->content.=$this->doc->section('<a name="'.$table.'"></a>'.$dblist->activeTables[$table],$output,TRUE,TRUE,0,TRUE);
-                               $this->content.=$this->doc->spacer(15);
-                               $this->content.=$this->doc->sectionEnd();
+                               $content.=$this->doc->section('<a name="'.$table.'"></a>'.$dblist->activeTables[$table],$output,TRUE,TRUE,0,TRUE);
+                               $content.=$this->doc->spacer(15);
+                               $content.=$this->doc->sectionEnd();
                        }
 
                                // Making search form:
                        if (!$this->modTSconfig['properties']['disableSearchBox'] && count($tableOutput))       {
-                               $this->content.=$this->doc->section($LANG->sL('LLL:EXT:lang/locallang_core.php:labels.search'),$dblist->getSearchBox(),0,1);
+                               $content.=$this->doc->section($LANG->sL('LLL:EXT:lang/locallang_core.php:labels.search'),$dblist->getSearchBox(),0,1);
                        }
 
                                // Making display of Sys-notes (from extension "sys_note")
                        $dblist->id=$this->id;
                        $sysNotes = $dblist->showSysNotesForPage();
                        if ($sysNotes)  {
-                               $this->content.=$this->doc->spacer(10);
-                               $this->content.=$this->doc->section($LANG->getLL('internalNotes'),$sysNotes,0,1);
-                       }
-
-                               // Display advanced options: Clear cache, new record link etc:
-                       if (!$this->modTSconfig['properties']['disableAdvanced'])       {
-
-                                       // Clear cache links:
-                               $af_content = $this->doc->clearCacheMenu($this->id);
-
-                                       // "Create new record" link:
-                               if (!$this->modTSconfig['properties']['noCreateRecordsLink']) {
-                                       $af_content.='
-
-                                       <!--
-                                               Link for creating a new record:
-                                       -->
-                                       <div id="typo3-newRecordLink">
-                                                       <a href="'.htmlspecialchars($BACK_PATH.'db_new.php?id='.$this->id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/new_el.gif','width="11" height="12"').' alt="" />'.
-                                               $LANG->getLL('newRecordGeneral',1).
-                                               '</a>
-                                       </div>';
-                               }
-
-                                       // Add content of the advanced-options section:
-                               $this->content.=$this->doc->spacer(10);
-                               $this->content.=$this->doc->section($LANG->getLL('advancedFunctions'),$af_content,0,1);
+                               $content.=$this->doc->spacer(10);
+                               $content.=$this->doc->section($LANG->getLL('internalNotes'),$sysNotes,0,1);
                        }
 
                                // Add spacer in bottom of page:
-                       $this->content.=$this->doc->spacer(10);
+                       $content.=$this->doc->spacer(10);
                }
+
+                       // Ending page:
+               $content.=$this->doc->spacer(10);
+               
+               return $content;
        }
 
        /**
@@ -1169,17 +1080,142 @@ class SC_db_layout {
                echo $this->content;
        }
 
+       /***************************
+        *
+        * Sub-content functions, rendering specific parts of the module content.
+        *
+        ***************************/
+       
+       /**
+        * Create the panel of buttons for submitting the form or otherwise perform operations.
+        *
+        * @param       string  Identifier for function of module
+        * @return      array   all available buttons as an assoc. array
+        */
+       private function getButtons($function = '')     {
+               global $TCA, $LANG, $BACK_PATH, $BE_USER;
+               
+               $buttons = array(
+                       'view' => '',
+                       'history_page' => '', 
+                       'new_content' => '', 
+                       'move_page' => '',
+                       'move_record' => '',
+                       'new_page' => '', 
+                       'edit_page' => '',
+                       'record_list' => '',
+                       'csh' => '',
+                       'shortcut' => '',
+                       'cache' => '',
+                       'savedok' => '',
+                       'savedokshow' => '',
+                       'closedok' => '',
+                       'deletedok' => '',
+                       'undo' => '',
+                       'history_record' => ''
+               );
 
+                       // View page
+               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
+                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif', 'width="12" height="12"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
+                               '</a>';
 
+                       // Shortcut
+               if ($BE_USER->mayMakeShortcut())        {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+               }
+               
+                       // Cache
+               if (!$this->modTSconfig['properties']['disableAdvanced'])       {
+                       $buttons['cache'] = '<a href="' . htmlspecialchars('db_layout.php?id=' . $this->pageinfo['uid'] . '&clear_cache=1') . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/clear_cache.gif', 'width="14" height="14"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.clear_cache', 1) . '" alt="" />' .
+                                       '</a>';
+               }
+               
+                       // If access to Web>List for user, then link to that module.
+               if ($BE_USER->check('modules','web_list'))      {
+                       $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                       $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif', 'width="11" height="11"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
+                                       '</a>';
+               }
+                       
+               if (!$this->modTSconfig['properties']['disableIconToolbar'])    {               
+                       
+                               // Page history
+                       $buttons['history_page'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(\'' . $BACK_PATH . 'show_rechis.php?element=' . rawurlencode('pages:' . $this->id) . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '#latest\');return false;') . '">' .
+                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/history2.gif', 'width="13" height="12"') . ' vspace="2" hspace="2" align="top" title="' . $LANG->getLL('recordHistory', 1) . '" alt="" />' .
+                                               '</a>';
+                               // New content element
+                       $buttons['new_content'] = '<a href="' . htmlspecialchars('db_new_content_el.php?id=' . $this->id . '&sys_language_uid=' . $this->current_sys_language . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
+                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/new_record.gif', 'width="16" height="12"') . ' vspace="2" hspace="1" align="top" title="' . $LANG->getLL('newContentElement', 1) . '" alt="" />' .
+                                               '</a>';
+                               // Move page
+                       $buttons['move_page'] = '<a href="' . htmlspecialchars($BACK_PATH . 'move_el.php?table=pages&uid=' . $this->id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
+                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/move_page.gif', 'width="11" height="12"') . ' vspace="2" hspace="2" align="top" title="' . $LANG->getLL('move_page', 1) . '" alt="" />' .
+                                               '</a>';
+                               // Move record
+                       if (t3lib_div::testInt($this->eRParts[1])) {
+                               $buttons['move_record'] = '<a href="' . htmlspecialchars($BACK_PATH . 'move_el.php?table=' . $this->eRParts[0] . '&uid=' . $this->eRParts[1] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
+                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/move_' . ($this->eRParts[0] == 'tt_content' ? 'record' : 'page') . '.gif', 'width="11" height="12"') . ' class="c-inputButton" title="' . $LANG->getLL('move_' . ($this->eRParts[0] == 'tt_content' ? 'record' : 'page'), 1) . '" alt="" />' .
+                                               '</a>';
+                       }
+                               // Create new page (wizard)
+                       $buttons['new_page'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(\'' . $BACK_PATH . 'db_new.php?id=' . $this->id . '&pagesOnly=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '\');return false;') . '">' .
+                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/new_page.gif', 'width="13" height="12"') . ' hspace="0" vspace="2" align="top" title="' . $LANG->getLL('newPage', 1) . '" alt="" />' .
+                                               '</a>';
+                               // Edit page properties
+                       if ($this->CALC_PERMS&2)        {
+                               $params='&edit[pages][' . $this->id . ']=edit';
+                               $buttons['edit_page'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $BACK_PATH)) . '">' .
+                                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/edit2.gif', 'width="11" height="12"') . ' hspace="2" vspace="2" align="top" title="' . $LANG->getLL('editPageProperties', 1) . '" alt="" />' .
+                                                       '</a>';
+                       }
 
-
-
-
-
-
-
-
-
+                               // Add CSH (Context Sensitive Help) icon to tool bar
+                       if($function == 'quickEdit') {
+                               $buttons['csh'] = t3lib_BEfunc::cshItem($this->descrTable, 'quickEdit', $BACK_PATH, '', FALSE, 'margin-top: 0px; margin-bottom: 0px;');
+                       } else {
+                               $buttons['csh'] = t3lib_BEfunc::cshItem($this->descrTable, 'columns_' . $this->MOD_SETTINGS['function'], $BACK_PATH, '', FALSE, 'margin-top: 0px; margin-bottom: 0px;');
+                       }
+                       
+                       if($function == 'quickEdit') {
+                                       // Save record
+                               $buttons['savedok'] = '<input class="c-inputButton" type="image" name="savedok"' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/savedok.gif','') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '" alt="" />';
+       
+                                       // Save record and show page
+                               $buttons['savedokshow'] = '<a href="#" onclick="' . htmlspecialchars('document.editform.redirect.value+=\'&popView=1\'; TBE_EDITOR.checkAndDoSubmit(1); return false;') . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/savedokshow.gif', 'width="21" height="16"') . ' class="c-inputButton" title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDocShow', 1) . '" alt="" />' .
+                                       '</a>';
+       
+                                       // Close record
+                               $buttons['closedok'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(unescape(\'' . rawurlencode($this->closeUrl) . '\')); return false;') . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/closedok.gif', 'width="21" height="16"') . ' class="c-inputButton" title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '" alt="" />' .
+                                       '</a>';
+       
+                                       // Delete record
+                               if($this->deleteButton) {
+                                       $buttons['deletedok'] = '<a href="#" onclick="' . htmlspecialchars('return deleteRecord(\'' . $this->eRParts[0] . '\',\'' . $this->eRParts[1] . '\',\'' . t3lib_div::getIndpEnv('SCRIPT_NAME') . '?id=' . $this->id . '\');') . '">' .
+                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/deletedok.gif','width="21" height="16"') . ' class="c-inputButton" title="' . $LANG->getLL('deleteItem', 1) . '" alt="" />' .
+                                               '</a>';
+                               }
+                                       
+                               if($this->undoButton) {         
+                                               // Undo button
+                                       $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars('window.location.href=\'' . $BACK_PATH . 'show_rechis.php?element=' . rawurlencode($this->eRParts[0] . ':' . $this->eRParts[1]) . '&revert=ALL_FIELDS&sumUp=-1&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;') . '">' .
+                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/undo.gif', 'width="21" height="16"') . ' class="c-inputButton" title="' . htmlspecialchars(sprintf($LANG->getLL('undoLastChange'), t3lib_BEfunc::calcAge(time() - $this->undoButtonR['tstamp'], $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '" alt="" />' .
+                                               '</a>';
+                                       
+                                               // History button
+                                       $buttons['history_record'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(\'' . $BACK_PATH . 'show_rechis.php?element=' . rawurlencode($this->eRParts[0] . ':' . $this->eRParts[1]) . '&returnUrl=' . rawurlencode($this->R_URI) . '#latest\');return false;') . '">' .
+                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/history2.gif', 'width="13" height="12"') . ' class="c-inputButton" title="' . $LANG->getLL('recordHistory', 1) . '" alt="" />' .
+                                               '</a>';
+                               }
+                       }
+               }
+               
+               return $buttons;
+       }
 
        /*******************************
         *
index 89ad670..46f2b08 100755 (executable)
@@ -48,6 +48,7 @@
                        <label index="noAccess_msg">You do not have access to edit the requested record.</label>
                        <label index="undoLastChange">Undo/Redo last change (%s ago)</label>
                        <label index="recordHistory">View record change history</label>
+                       <label index="viewContent">Viewing content of</label>
                        <label index="tt_board_subject">Subject</label>
                        <label index="tt_board_author">Author</label>
                        <label index="tt_board_date">Date</label>
index 61c06b8..de56f2f 100755 (executable)
@@ -50,6 +50,7 @@
                        <label index="defaultLanguage">Default</label>
                        <label index="multipleLanguages">All languages</label>
                        <label index="Localize">Localize to:</label>
+                       <label index="viewRecords">Viewing records of</label>
                </languageKey>
        </data>
 </T3locallang>
\ No newline at end of file
index 0e274cb..fe79f5f 100644 (file)
@@ -40,10 +40,11 @@ unset($MCONF);
 require ("conf.php");
 require ($BACK_PATH."init.php");
 require ($BACK_PATH."template.php");
+$LANG->includeLLFile('EXT:tstemplate/ts/locallang.xml');
 require_once (PATH_t3lib."class.t3lib_page.php");
 require_once (PATH_t3lib."class.t3lib_tstemplate.php");
 require_once (PATH_t3lib."class.t3lib_tsparser_ext.php");
-
+require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 require_once (PATH_t3lib."class.t3lib_scbase.php");
 
 $BE_USER->modAccess($MCONF,1);
@@ -92,13 +93,16 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
 
                // Access check...
                // The page will show only if there is a valid page and if this page may be viewed by the user
-               $pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
-               $access = is_array($pageinfo) ? 1 : 0;
+               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
+               $access = is_array($this->pageinfo) ? 1 : 0;
 
                if ($this->id && $access)       {
                        $this->doc = t3lib_div::makeInstance("template");
                        $this->doc->backPath = $BACK_PATH;
-
+                       $this->doc->setModuleTemplate('templates/tstemplate.html');
+                       $this->doc->docType = 'xhtml_trans';
+                       $this->doc->form = '<form action="index.php?id='.$this->id.'" method="post" enctype="'.$GLOBALS["TYPO3_CONF_VARS"]["SYS"]["form_enctype"].'" name="editForm">';
+                       
 
                                // JavaScript
                        $this->doc->JScode = '
@@ -145,29 +149,25 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
 
                                // Setting up the context sensitive menu:
                        $this->doc->getContextMenuCode();
-
-
-                       $headerSection = $this->doc->getHeader("pages",$pageinfo,$pageinfo["_thePath"]).'<br>'.
-                               $LANG->sL("LLL:EXT:lang/locallang_core.php:labels.path").': '.
-                               '<span title="'.htmlspecialchars($pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($pageinfo['_thePath'],-50)).'</span>';
-
-                               // Draw the header.
-                       $this->doc->form='<form action="index.php?id='.$this->id.'" method="post" enctype="'.$GLOBALS["TYPO3_CONF_VARS"]["SYS"]["form_enctype"].'" name="editForm">';
-                       $this->content.=$this->doc->startPage("Template Tools");
-                       $this->content.=$this->doc->header("Template Tools");
-                       $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"])));
-
-
+                               
+                               // Build the modulle content
+                       $this->content = $this->doc->header("Template Tools");
                        $this->extObjContent();
-
-
-
-                       // ShortCut
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon("id,e,sObj,template","function,ts_browser_type,constant_editor_cat",$this->MCONF["name"]));
-                       }
                        $this->content.=$this->doc->spacer(10);
+                       
+                               // Setting up the buttons and markers for docheader
+                       $docHeaderButtons = $this->getButtons();
+                       $markers = array(
+                               'CSH' => $docHeaderButtons['csh'],
+                               'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                               'CONTENT' => $this->content
+                       );
+                       
+                               // Build the <body> for the module
+                       $this->content = $this->doc->startPage('Template Tools');
+                       $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+                       $this->content.= $this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                } else {
                                // If no access or if ID == zero
 
@@ -175,7 +175,7 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
                        $this->doc->backPath = $BACK_PATH;
 
                        $this->content.=$this->doc->startPage("Template Tools");
-                       $this->content.=$this->doc->header("Template Tools");
+                       $this->content.=$this->doc->header($LANG->getLL('moduleTitle', 1));
                        $this->content.=$this->doc->spacer(5);
 
 
@@ -215,7 +215,7 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
                        This is an overview of the pages in the database containing one or more template records. Click a page title to go to the page.
                        <BR><BR>
                        '.$table);
-               //      debug($pArray);
+
                        // ********************************************
                        // RENDER LIST of pages with templates, END
                        // ********************************************
@@ -228,13 +228,69 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
                        }
 
                        $this->content.=$this->doc->spacer(10);
+                       $this->content.=$this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                }
        }
-       function printContent() {
-
-               $this->content.=$this->doc->endPage();
+       function printContent() {       
                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(
+                       'back' => '',
+                       'close' => '',
+                       'save' => '',
+                       'view' => '',
+                       'record_list' => '',
+                       'shortcut' => '',
+               );
+
+                       // View page
+               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
+                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
+                               '</a>';
+
+                       // Shortcut
+               if ($BE_USER->mayMakeShortcut())        {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+               }
+               
+                       // If access to Web>List for user, then link to that module.
+               if ($BE_USER->check('modules','web_list'))      {
+                       $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                       $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
+                                       '</a>';
+               }
+
+               if($this->extClassConf['name'] == 'tx_tstemplateinfo') {
+                       if(!empty($this->e) && !t3lib_div::_POST('abort')) {
+                                       // SAVE button
+                               $buttons['save'] = '<input type="image" class="c-inputButton" name="submit" value="Update"' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/savedok.gif','') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '" />';
+                                       // CLOSE button
+                               $buttons['close'] = '<input type="image" class="c-inputButton" name="abort" value="Abort"' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/closedok.gif','') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '" />';
+                       }
+               } elseif($this->extClassConf['name'] == 'tx_tstemplateceditor' && count($this->MOD_MENU["constant_editor_cat"])) {
+                               // SAVE button
+                       $buttons['save'] = '<input type="image" class="c-inputButton" name="submit" value="Update"' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/savedok.gif','') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '" />';
+               } elseif($this->extClassConf['name'] == 'tx_tstemplateobjbrowser') {
+                       if(!empty($this->sObj)) {
+                                       // BACK
+                               $buttons['back'] = '<a href="index.php?id=' . $this->id . '" class="typo3-goBack">' .
+                                                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/goback.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.goBack', 1) . '" alt="" />' .
+                                                               '</a>';
+                       }
+               }
+               return $buttons;
+       }
 
        // ***************************
        // OTHER FUNCTIONS:
diff --git a/typo3/sysext/tstemplate/ts/locallang.xml b/typo3/sysext/tstemplate/ts/locallang.xml
new file mode 100644 (file)
index 0000000..86619e0
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+       <meta type="array">
+               <description>Labels for the Web&gt;Template module</description>
+               <type>module</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">\r
+                       <label index="moduleTitle">Template tools</label>
+                       <label index="viewTemplates">Viewing templates of</label>moduleTitle
+               </languageKey>
+       </data>
+</T3locallang>
\ No newline at end of file
index ddd661f..8bc3e35 100644 (file)
@@ -32,7 +32,7 @@
  * localconf-variables:
  * $TYPO3_CONF_VARS["MODS"]["web_ts"]["onlineResourceDir"] = "fileadmin/fonts/";               // This is the path (must be in "fileadmin/" !!) where the web_ts/constant-editor submodule fetches online resources. Put fonts (ttf) and standard images here!
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author     Kasper Sk�rh�j <kasperYYYY@typo3.com>
  */
 
 require_once(PATH_t3lib."class.t3lib_extobjbase.php");
@@ -182,19 +182,12 @@ class tx_tstemplateceditor extends t3lib_extobjbase {
                        $printFields = trim($tmpl->ext_printFields($theConstants,$category));
                        if ($printFields)       {
                                $theOutput.=$this->pObj->doc->spacer(20);
-                               $theOutput.=$this->pObj->doc->section("",'<input type="Submit" name="submit" value="Update">');
-                               $theOutput.=$this->pObj->doc->spacer(15);
                                $theOutput.=$this->pObj->doc->section("",$printFields);
-                               $theOutput.=$this->pObj->doc->spacer(10);
-                               $theOutput.=$this->pObj->doc->section("",'<input type="Submit" name="submit" value="Update">');
                        }
 
                        if ($BE_USER_modOptions["properties"]["constantEditor."]["example"]!="top")     {
                                $theOutput=$this->displayExample($theOutput);
                        }
-
-                       $theOutput.=$this->pObj->doc->spacer(10);
-                       $theOutput.=$this->pObj->doc->section("Cache",'Click here to <a href="index.php?id='.$this->pObj->id.'&clear_all_cache=1"><strong>clear all cache</strong></a>',0,1);
                } else {
                        $theOutput.=$this->pObj->noTemplate(1);
                }
index 640c41a..65f3495 100644 (file)
@@ -25,7 +25,7 @@
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
 /**
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author     Kasper Sk�rh�j <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
@@ -348,9 +348,6 @@ class tx_tstemplateinfo extends t3lib_extobjbase {
                                unset($e);
                        }
 
-                       if (is_array($e))       {
-                               $theOutput.= $this->pObj->doc->section('', '<BR><input type="Submit" name="submit" value="Update"> <input type="Submit" name="abort" value="Cancel">');
-                       }
                        if ($e['title'])        {
                                $outCode = '<input type="Text" name="data[title]" value="'.htmlspecialchars($tplRow['title']).'"'.$this->pObj->doc->formWidth().'>';
                                $outCode.= '<input type="Hidden" name="e[title]" value="1">';
@@ -475,9 +472,6 @@ class tx_tstemplateinfo extends t3lib_extobjbase {
                                $theOutput.= $this->pObj->doc->section('Setup:', '');
                                $theOutput.= $this->pObj->doc->sectionEnd().$outCode;
                        }
-                       if (is_array($e))       {
-                               $theOutput.=$this->pObj->doc->section('', '<BR><input type="Submit" name="submit" value="Update"> <input type="Submit" name="abort" value="Cancel">');
-                       }
 
                                // Processing:
                        $outCode = '';
@@ -498,13 +492,6 @@ class tx_tstemplateinfo extends t3lib_extobjbase {
 
                        $theOutput.= $this->pObj->doc->spacer(25);
                        $theOutput.= $this->pObj->doc->section('', $outCode);
-
-                       $theOutput.= $this->pObj->doc->spacer(10);
-                       $theOutput.= $this->pObj->doc->section(
-                               'Cache',
-                               'Click here to <a href="index.php?id='.$this->pObj->id.'&clear_all_cache=1"><strong>clear all cache</strong></a>.<BR><br>Status: '.$this->pObj->getCountCacheTables(1),
-                               0, 1
-                       );
                } else {
                        $theOutput.= $this->pObj->noTemplate(1);
                }
index 92177f9..6ad6d29 100644 (file)
@@ -522,9 +522,6 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase {
                        }
                        $theOutput.=$this->pObj->doc->section("",'<NOBR>'.$menu.'</NOBR>');
 
-                       $theOutput.=$this->pObj->doc->spacer(10);
-                       $theOutput.=$this->pObj->doc->section("Cache",'Click here to <a href="index.php?id='.$this->pObj->id.'&clear_all_cache=1"><strong>clear all cache</strong></a>',0,1);
-
                                // Ending section:
                        $theOutput.=$this->pObj->doc->sectionEnd();
                }
index 7dae1bc..f5b6bf6 100755 (executable)
@@ -83,6 +83,7 @@ require ($BACK_PATH.'init.php');
 require ($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:version/locallang.xml');
 require_once (PATH_t3lib.'class.t3lib_scbase.php');
+require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
        // DEFAULT initialization of a module [END]
 
 require_once(PATH_t3lib.'class.t3lib_diff.php');
@@ -188,8 +189,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                $this->REQUEST_URI = str_replace('&sendToReview=1','',t3lib_div::getIndpEnv('REQUEST_URI'));
 
                        // Draw the header.
-               $this->doc = t3lib_div::makeInstance('mediumDoc');
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
+               $this->doc->setModuleTemplate('templates/version.html');
+               $this->doc->docType = 'xhtml_trans';
                $this->doc->form='<form action="" method="post">';
 
                // Add styles
@@ -268,33 +271,36 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        // Setting publish access permission for workspace:
                                $this->publishAccess = $BE_USER->workspacePublishAccess($BE_USER->workspace);
 
-
-                               $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br/>'.$LANG->sL('LLL:EXT:lang/locallang_core.php: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->section('',$headerSection);
-                               $this->content.=$this->doc->divider(5);
-
                                        // Render content:
                                if ($this->id)  {
                                        $this->workspaceMgm();
                                } else {
                                        $this->versioningMgm();
                                }
-
-                                       // 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);
+                       
+                                                       // Setting up the buttons and markers for docheader
+                       $docHeaderButtons = $this->getButtons();
+                       $markers = array(
+                               'CSH' => $docHeaderButtons['csh'],
+                               'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                               'WS_MENU' => $this->workspaceMenu(),
+                               '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);
                } else {
                                // If no access or id value, create empty document:
                        $this->content.=$this->doc->startPage($LANG->getLL('title'));
                        $this->content.=$this->doc->section($LANG->getLL('clickAPage_header'),$LANG->getLL('clickAPage_content'),0,1);
+                       $this->content.=$this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                }
        }
 
@@ -304,12 +310,45 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @return      void
         */
        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()   {
+               global $TCA, $LANG, $BACK_PATH, $BE_USER;
+               
+               $buttons = array(
+                       'csh' => '',
+                       'view' => '',
+                       'record_list' => '',
+                       'shortcut' => '',
+               );
+                       // CSH
+               //$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txversionM1', '', $GLOBALS['BACK_PATH']);
+               
+                       // View page
+               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
+                               '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
+                               '</a>';
 
+                       // Shortcut
+               if ($BE_USER->mayMakeShortcut())        {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
+               }
+               
+                       // If access to Web>List for user, then link to that module.
+               if ($BE_USER->check('modules','web_list'))      {
+                       $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
+                       $buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
+                                       '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
+                                       '</a>';
+               }
+               return $buttons;
+       }
 
 
 
@@ -637,19 +676,6 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        function workspaceMgm() {
 
-               $menu = '';
-               if ($GLOBALS['BE_USER']->workspace===0) {
-                       $menu.= t3lib_BEfunc::getFuncMenu($this->id,'SET[filter]',$this->MOD_SETTINGS['filter'],$this->MOD_MENU['filter']);
-                       $menu.= t3lib_BEfunc::getFuncMenu($this->id,'SET[display]',$this->MOD_SETTINGS['display'],$this->MOD_MENU['display']);
-               }
-               if (!$this->details && $GLOBALS['BE_USER']->workspace && !$this->diffOnly)      {
-                       $menu.= t3lib_BEfunc::getFuncCheck($this->id,'SET[diff]',$this->MOD_SETTINGS['diff'],'','','id="checkDiff"').' <label for="checkDiff">Show difference view</label>';
-               }
-
-               if ($menu)      {
-                       $this->content.=$this->doc->section('',$menu,0,1);
-               }
-
                        // Perform workspace publishing action if buttons are pressed:
                $errors = $this->publishAction();
 
@@ -691,6 +717,23 @@ class tx_version_cm1 extends t3lib_SCbase {
                $this->content.= $this->doc->section($this->details ? 'Details for version' : 'Workspace management', $WSoverview,0,1);
 
        }
+       
+       function workspaceMenu() {
+               if($this->id) {
+                       $menu = '';
+                       if ($GLOBALS['BE_USER']->workspace===0) {
+                               $menu.= t3lib_BEfunc::getFuncMenu($this->id,'SET[filter]',$this->MOD_SETTINGS['filter'],$this->MOD_MENU['filter']);
+                               $menu.= t3lib_BEfunc::getFuncMenu($this->id,'SET[display]',$this->MOD_SETTINGS['display'],$this->MOD_MENU['display']);
+                       }
+                       if (!$this->details && $GLOBALS['BE_USER']->workspace && !$this->diffOnly)      {
+                               $menu.= t3lib_BEfunc::getFuncCheck($this->id,'SET[diff]',$this->MOD_SETTINGS['diff'],'','','id="checkDiff"').' <label for="checkDiff">Show difference view</label>';
+                       }
+       
+                       if ($menu)      {
+                               return $menu;
+                       }
+               }
+       }
 
        /**
         * Rendering the overview of versions in the current workspace
index a8d3556..1e3918f 100755 (executable)
@@ -176,6 +176,7 @@ class template {
        var $JScodeArray = array();             // Similar to $JScode but for use as array with associative keys to prevent double inclusion of JS code. a <script> tag is automatically wrapped around.
        var $postCode='';                               // Additional 'page-end' code could be accommulated in this var. It will be outputted at the end of page before </body> and some other internal page-end code.
        var $docType = '';                              // Doc-type used in the header. Default is HTML 4. You can also set it to 'strict', 'xhtml_trans', or 'xhtml_frames'.
+       var $moduleTemplate = '';               // HTML template with markers for module
 
                // Other vars you can change, but less frequently used:
        var $scriptID='';                               // Script ID.
@@ -1806,9 +1807,150 @@ $str.=$this->docBodyTagBegin().
                        }
                }
        }
-}
 
 
+       /**
+        * Function to load a HTML template file with markers. 
+        * 
+        * @param       string          tmpl name, usually in the typo3/template/ directory
+        * @return      string          HTML of template
+        */
+       function getHtmlTemplate($filename)     {
+               if ($GLOBALS['TBE_STYLES']['htmlTemplates'][$filename]) {
+                       $filename = $GLOBALS['TBE_STYLES']['htmlTemplates'][$filename];
+               }
+               return ($filename ? t3lib_div::getURL($this->backPath . $filename) : '');
+       }
+       
+       /**
+        * Define the template for the module
+        *
+        * @param       string          filename
+        */
+       function setModuleTemplate($filename) {
+               $this->moduleTemplate = $this->getHtmlTemplate($filename);
+       }
+       
+       /**
+        * Put together the various elements for the module <body> using a static HTML
+        * template
+        *
+        * @param       array           Record of the current page, used for page path and info
+        * @param       array           HTML for all buttons
+        * @param       array           HTML for all other markers
+        * @return      string          Composite HTML
+        */
+       public function moduleBody($pageRecord = array(), $buttons = array(), $markerArray = array()) {
+                       // Get the HTML template for the module
+               $moduleBody = t3lib_parsehtml::getSubpart($this->moduleTemplate, '###FULLDOC###');
+                       // Add CSS
+               $this->inDocStylesArray[] = 'html { overflow: hidden; }';
+                       // Add JS code to the <head> for IE
+               $this->JScode.= $this->wrapScriptTags('
+                               // workaround since IE6 cannot deal with relative height for scrolling elements
+                       function resizeDocBody()        {
+                               $("typo3-docbody").style.height = (document.body.offsetHeight - parseInt($("typo3-docheader").getStyle("height")));
+                       }
+                       if (/MSIE 6/.test(navigator.userAgent)) {
+                               Event.observe(window, "resize", resizeDocBody, false);
+                               Event.observe(window, "load", resizeDocBody, false);
+                       }
+               ');
+                       // Get the page path for the docheader
+               $markerArray['PAGEPATH'] = $this->getPagePath($pageRecord);
+                       // Get the page info for the docheader
+               $markerArray['PAGEINFO'] = $this->getPageInfo($pageRecord);
+                       // Get all the buttons for the docheader
+               $docHeaderButtons = $this->getDocHeaderButtons($buttons);
+                       // Merge docheader buttons with the marker array
+               $markerArray = array_merge($markerArray, $docHeaderButtons);
+                       // replacing all markers with the finished markers and return the HTML content
+               return t3lib_parsehtml::substituteMarkerArray($moduleBody, $markerArray, '###|###');
+       }
+       
+       /**
+        * Fill the button lists with the defined HTML
+        *
+        * @param       array           HTML for all buttons
+        * @return      array           Containing HTML for both buttonlists
+        */
+       private function getDocHeaderButtons($buttons) {
+               $markers = array();
+                       // Fill buttons for left and right float
+               $floats = array('left', 'right');
+               foreach($floats as $key) {
+                               // Get the template for each float
+                       $buttonTemplate = t3lib_parsehtml::getSubpart($this->moduleTemplate, '###BUTTON_GROUPS_' . strtoupper($key) . '###');
+                               // Fill the button markers in this float
+                       $buttonTemplate = t3lib_parsehtml::substituteMarkerArray($buttonTemplate, $buttons, '###|###', true);
+                               // getting the wrap for each group
+                       $buttonWrap = t3lib_parsehtml::getSubpart($this->moduleTemplate, '###BUTTON_GROUP_WRAP###');
+                               // looping through the groups (max 6) and remove the empty groups
+                       for ($groupNumber = 1; $groupNumber < 6; $groupNumber++) {
+                               $buttonMarker = '###BUTTON_GROUP' . $groupNumber . '###';
+                               $buttonGroup = t3lib_parsehtml::getSubpart($buttonTemplate, $buttonMarker);
+                               if (trim($buttonGroup)) {
+                                       if ($buttonWrap) {
+                                               $buttonGroup = t3lib_parsehtml::substituteMarker($buttonWrap, '###BUTTONS###', $buttonGroup);
+                                       }
+                                       $buttonTemplate = t3lib_parsehtml::substituteSubpart($buttonTemplate, $buttonMarker, trim($buttonGroup));
+                               }
+                       }       
+                               // replace the marker with the template and remove all line breaks (for IE compat)
+                       $markers['BUTTONLIST_' . strtoupper($key)] = str_replace("\n", '', $buttonTemplate);
+               }
+               return $markers;
+       }
+       
+       /**
+        * Generate the page path for docheader
+        *
+        * @param       array   Current page
+        * @return      string  Page path
+        */
+       private function getPagePath($pageRecord) {
+               global $LANG;
+                       // Is this a real page
+               if ($pageRecord['uid']) {
+                       $title = $pageRecord['_thePath'];
+               } else {
+                       $title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
+               }
+                       // Setting the path of the page
+               $pagePath = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path', 1) . ': <span class="typo3-docheader-pagePath">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($title, -50)) . '</span>';             
+               return $pagePath;
+       }
+       
+       /**
+        * Setting page icon with clickmenu + uid for docheader
+        *
+        * @param       array   Current page
+        * @return      string  Page info
+        */
+       private function getPageInfo($pageRecord) {
+               global $BE_USER;                
+                               // Add icon with clickmenu, etc:
+               if ($pageRecord['uid']) {       // If there IS a real page
+                       $alttext = t3lib_BEfunc::getRecordIconAltText($pageRecord, 'pages');
+                       $iconImg = t3lib_iconWorks::getIconImage('pages', $pageRecord, $this->backPath, 'class="absmiddle" title="'. htmlspecialchars($alttext) . '"');                         
+                               // Make Icon:
+                       $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);                                                                           
+               } else {        // On root-level of page tree
+                               // Make Icon
+                       $iconImg = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/_icon_website.gif') . ' alt="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '" />';                  
+                       if($BE_USER->user['admin']) {
+                               $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
+                       } else {
+                               $theIcon = $iconImg;
+                       }
+               }
+               
+                       // Setting icon with clickmenu + uid
+               $pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';    
+               return $pageInfo;
+       }
+}
+
 
 // ******************************
 // Extension classes of the template class.
diff --git a/typo3/templates/alt_doc.html b/typo3/templates/alt_doc.html
new file mode 100644 (file)
index 0000000..4f1a972
--- /dev/null
@@ -0,0 +1,40 @@
+<!-- ###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######PAGEPATH###</div>\r
+                       <div class="infooptions">###LANGSELECTOR######PAGEINFO###</div>\r
+               </div>\r
+               ###EXTRAHEADER###\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
+<!-- ###DOCHEADER_EXTRAHEADER### -->\r
+               <div id="typo3-docheader-rowextra">###EXTRAHEADER###</div>\r
+<!-- ###DOCHEADER_EXTRAHEADER### -->\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### -->###CLOSE###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUP2### -->###SAVE######SAVE_VIEW######SAVE_CLOSE######SAVE_NEW###<!-- ###BUTTON_GROUP2### -->\r
+<!-- ###BUTTON_GROUP3### -->###DELETE######UNDO######HISTORY###<!-- ###BUTTON_GROUP3### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###SHORTCUT######COLUMNS_ONLY######OPEN_IN_NEW_WINDOW###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/db_layout.html b/typo3/templates/db_layout.html
new file mode 100644 (file)
index 0000000..dd66126
--- /dev/null
@@ -0,0 +1,34 @@
+<!-- ###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######TOP_FUNCTION_MENU###</div>\r
+               </div>\r
+               <div id="typo3-docheader-row2">\r
+                       <div class="pagepath">###CSH######PAGEPATH###</div>\r
+                       <div class="infooptions">###LANGSELECTOR######PAGEINFO###</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### -->###NEW_PAGE######NEW_CONTENT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUP2### -->###VIEW######EDIT_PAGE######MOVE_PAGE######HISTORY_PAGE###<!-- ###BUTTON_GROUP2### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######CACHE######SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/db_layout_quickedit.html b/typo3/templates/db_layout_quickedit.html
new file mode 100644 (file)
index 0000000..5213b21
--- /dev/null
@@ -0,0 +1,38 @@
+<!-- ###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######TOP_FUNCTION_MENU###</div>\r
+               </div>\r
+               <div id="typo3-docheader-row2">\r
+                       <div class="pagepath">###CSH######PAGEPATH###</div>\r
+                       <div class="infooptions">###LANGSELECTOR######PAGEINFO###</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### -->###CLOSEDOK###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUP2### -->###SAVEDOK######SAVEDOKSHOW###<!-- ###BUTTON_GROUP2### -->\r
+<!-- ###BUTTON_GROUP3### -->###DELETEDOK######UNDO###<!-- ###BUTTON_GROUP3### -->\r
+<!-- ###BUTTON_GROUP4### -->###MOVE_RECORD###<!-- ###BUTTON_GROUP4### -->\r
+<!-- ###BUTTON_GROUP5### -->###NEW_CONTENT######NEW_PAGE###<!-- ###BUTTON_GROUP5### -->\r
+<!-- ###BUTTON_GROUP6### -->###VIEW######EDIT_PAGE######HISTORY_RECORD###<!-- ###BUTTON_GROUP6### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/db_list.html b/typo3/templates/db_list.html
new file mode 100644 (file)
index 0000000..957ecea
--- /dev/null
@@ -0,0 +1,35 @@
+<!-- ###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######PAGEPATH###</div>\r
+                       <div class="infooptions">###PAGEINFO###</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
+       <!-- Wrapper for button group -->\r
+       <div class="buttongroup">###BUTTONS###</div>\r
+<!-- ###BUTTON_GROUP_WRAP### -->\r
+\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+<!-- ###BUTTON_GROUP1### -->###LEVEL_UP######BACK###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUP2### -->###NEW_RECORD######PASTE###<!-- ###BUTTON_GROUP2### -->\r
+<!-- ###BUTTON_GROUP3### -->###VIEW######EDIT######HIDE_UNHIDE######MOVE###<!-- ###BUTTON_GROUP3### -->\r
+<!-- ###BUTTON_GROUP4### -->###CSV######EXPORT###<!-- ###BUTTON_GROUP4### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###CACHE######RELOAD######SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/func.html b/typo3/templates/func.html
new file mode 100644 (file)
index 0000000..0ccc05b
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###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">###CSH######PAGEPATH###</div>\r
+                       <div class="infooptions">###PAGEINFO###</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_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/info.html b/typo3/templates/info.html
new file mode 100644 (file)
index 0000000..0ccc05b
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###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">###CSH######PAGEPATH###</div>\r
+                       <div class="infooptions">###PAGEINFO###</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_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/perm.html b/typo3/templates/perm.html
new file mode 100644 (file)
index 0000000..0ccc05b
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###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">###CSH######PAGEPATH###</div>\r
+                       <div class="infooptions">###PAGEINFO###</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_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/tstemplate.html b/typo3/templates/tstemplate.html
new file mode 100644 (file)
index 0000000..3311dee
--- /dev/null
@@ -0,0 +1,36 @@
+<!-- ###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">###CSH######PAGEPATH###</div>\r
+                       <div class="infooptions">###PAGEINFO###</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### -->###BACK###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUP2### -->###CLOSE###<!-- ###BUTTON_GROUP2### -->\r
+<!-- ###BUTTON_GROUP3### -->###SAVE###<!-- ###BUTTON_GROUP3### -->\r
+<!-- ###BUTTON_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/version.html b/typo3/templates/version.html
new file mode 100644 (file)
index 0000000..39482f9
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###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######WS_MENU######FUNC_MENU###</div>\r
+               </div>\r
+               <div id="typo3-docheader-row2">\r
+                       <div class="pagepath">###CSH######PAGEPATH###</div>\r
+                       <div class="infooptions">###PAGEINFO###</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_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->\r
+<!-- ###BUTTON_GROUPS_LEFT### -->\r
+\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->\r
+<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######SHORTCUT###<!-- ###BUTTON_GROUP1### -->\r
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file