Index: typo3/stylesheet.css =================================================================== --- typo3/stylesheet.css (revision 3159) +++ typo3/stylesheet.css (working copy) @@ -126,7 +126,7 @@ background-color: #9BA1A8; } -body#typo3-alt-doc-php, body#typo3-db-list-php, body#ext-cms-layout-db-layout-php, body#ext-tstemplate-ts-index-php, body#typo3-mod-web-perm-index-php, body#typo3-mod-web-info-index-php, body#typo3-mod-web-func-index-php, body#ext-version-cm1-index-php { padding: 0; margin: 0; overflow: hidden; height: 100%; } +body#typo3-alt-doc-php, body#typo3-db-list-php, body#ext-cms-layout-db-layout-php, body#ext-tstemplate-ts-index-php, body#typo3-mod-web-perm-index-php, body#typo3-mod-web-info-index-php, body#typo3-mod-web-func-index-php, body#ext-version-cm1-index-php, body#ext-cms-layout-db-new-content-el-php { padding: 0; margin: 0; overflow: hidden; height: 100%; } /**************************************** Index: typo3/sysext/cms/layout/db_new_content_el.php =================================================================== --- typo3/sysext/cms/layout/db_new_content_el.php (revision 3159) +++ typo3/sysext/cms/layout/db_new_content_el.php (working copy) @@ -198,16 +198,20 @@ $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id,'mod.'.$this->MCONF['name']); // Starting the document template object: - $this->doc = t3lib_div::makeInstance('mediumDoc'); + $this->doc = t3lib_div::makeInstance('template'); $this->doc->docType= 'xhtml_trans'; $this->doc->backPath = $BACK_PATH; + $this->doc->setModuleTemplate('templates/db_new_content_el.html'); $this->doc->JScode=''; $this->doc->form='
'; + // Setting up the context sensitive menu: + $this->doc->getContextMenuCode(); + // Getting the current page and receiving access information (used in main()) $perms_clause = $BE_USER->getPagePermsClause(1); - $pageinfo = t3lib_BEfunc::readPageAccess($this->id,$perms_clause); - $this->access = is_array($pageinfo) ? 1 : 0; + $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$perms_clause); + $this->access = is_array($this->pageinfo) ? 1 : 0; } /** @@ -248,17 +252,9 @@ // Creating content // *************************** $this->content=''; - $this->content.=$this->doc->startPage($LANG->getLL('newContentElement')); $this->content.=$this->doc->header($LANG->getLL('newContentElement')); $this->content.=$this->doc->spacer(5); - $elRow = t3lib_BEfunc::getRecordWSOL('pages',$this->id); - $hline = t3lib_iconWorks::getIconImage('pages',$elRow,$BACK_PATH,' title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($elRow,'pages')).'" align="top"'); - $hline.= t3lib_BEfunc::getRecordTitle('pages',$elRow,TRUE); - $this->content.=$this->doc->section('',$hline,0,1); - $this->content.=$this->doc->spacer(10); - - // Wizard $code=''; $lines=array(); @@ -336,25 +332,22 @@ $code.= $posMap->printContentElementColumns($this->id,0,$colPosList,1,$this->R_URI); $this->content.= $this->doc->section($LANG->getLL('2_selectPosition'),$code,0,1); } - - // IF there is a return-url set, then print a go-back link: - if ($this->R_URI) { - $code='

doc->backPath,'gfx/goback.gif','width="14" height="14"').' alt="" />'.$LANG->getLL('goBack',1).''; - $this->content.= $this->doc->section('',$code,0,1); - } - - // Add CSH: - $this->content.= $this->doc->section('',t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH'],'
'),0,1); - - // Add a very high clear-gif, 700 px (so that the link to the anchor "sel2" shows this part in top for sure...) - $this->content.= $this->doc->section('','',0,1); - } else { // In case of no access: $this->content = ''; - $this->content.= $this->doc->startPage($LANG->getLL('newContentElement')); $this->content.= $this->doc->header($LANG->getLL('newContentElement')); $this->content.= $this->doc->spacer(5); } + + // Setting up the buttons and markers for docheader + $docHeaderButtons = $this->getButtons(); + $markers['CSH'] = $docHeaderButtons['csh']; + $markers['CONTENT'] = $this->content; + + // Build the for the module + $this->content = $this->doc->startPage($LANG->getLL('newContentElement')); + $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + $this->content.= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); } /** @@ -363,14 +356,38 @@ * @return void */ function printContent() { - global $SOBE; - - $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 $LANG, $BACK_PATH; + + $buttons = array( + 'csh' => '', + 'back' => '' + ); + + + if ($this->id && $this->access) { + // CSH + $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH']); + // Back + if ($this->R_URI) { + $buttons['back'] = '' . + 'doc->backPath, 'gfx/goback.gif') . ' alt="" title="' . $LANG->getLL('goBack', 1) . '" />' . + ''; + } + } + + return $buttons; + } @@ -379,6 +396,7 @@ + /*************************** * * OTHER FUNCTIONS: Index: typo3/templates/db_new_content_el.html =================================================================== --- typo3/templates/db_new_content_el.html (revision 0) +++ typo3/templates/db_new_content_el.html (revision 0) @@ -0,0 +1,31 @@ + +
+ +
+
+
###BUTTONLIST_LEFT###
+
###BUTTONLIST_RIGHT###
+
+
+
###CSH######PAGEPATH###
+
###PAGEINFO###
+
+
+ +
+ ###CONTENT### +
+
+ + + + +
###BUTTONS###
+ + + +###BACK### + + + + \ No newline at end of file