Index: typo3/mod/user/ws/index.php =================================================================== --- typo3/mod/user/ws/index.php (revision 3151) +++ typo3/mod/user/ws/index.php (working copy) @@ -250,8 +250,9 @@ $this->MCONF = $GLOBALS['MCONF']; // Initialize Document Template object: - $this->doc = t3lib_div::makeInstance('noDoc'); + $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $BACK_PATH; + $this->doc->setModuleTemplate('templates/ws.html'); $this->doc->docType = 'xhtml_trans'; // JavaScript @@ -305,12 +306,9 @@ $changeWorkspace = t3lib_div::_GET('changeWorkspace'); if ($changeWorkspace != '') { $BE_USER->setWorkspace($changeWorkspace); - $this->content = $this->doc->startPage($LANG->getLL('title')); $this->content .= $this->doc->wrapScriptTags('top.location.href="' . $BACK_PATH . t3lib_BEfunc::getBackendScript() . '";'); - } - else { + } else { // Starting page: - $this->content.=$this->doc->startPage($LANG->getLL('title')); $this->content.=$this->doc->header($LANG->getLL('title')); $this->content.=$this->doc->spacer(5); @@ -337,7 +335,20 @@ // Add hidden fields and create tabs: $content = $this->doc->getDynTabMenu($menuItems,'user_ws'); $this->content.=$this->doc->section('',$content,0,1); + + // 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('title')); + $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + $this->content.= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); + } /** @@ -346,14 +357,31 @@ * @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( + 'new_record' => '', + ); + $newWkspUrl = 'workspaceforms.php?action=new'; + // workspace creation link + if ($GLOBALS['BE_USER']->isAdmin() || 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4)) { + $buttons['new_record'] = '' . + '' . $LANG->getLL('img_title_create_new_workspace') . '' . + ''; + } + return $buttons; + } @@ -364,6 +392,7 @@ + /********************************* * * Module content: Publish @@ -607,16 +636,6 @@ } $content .= ''; - $newWkspUrl = 'workspaceforms.php?action=new'; - - // workspace creation link - if ($GLOBALS['BE_USER']->isAdmin() || 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4)) { - $content .= '
' . - '' . $LANG->getLL('img_title_create_new_workspace'). '' . - $LANG->getLL('link_text_create_new_workspace') . ''; - } return $content; } Index: typo3/mod/user/ws/workspaceforms.php =================================================================== --- typo3/mod/user/ws/workspaceforms.php (revision 3151) +++ typo3/mod/user/ws/workspaceforms.php (working copy) @@ -137,8 +137,9 @@ $this->MCONF = $GLOBALS['MCONF']; // Initialize Document Template object: - $this->doc = t3lib_div::makeInstance('mediumDoc'); + $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $GLOBALS['BACK_PATH']; + $this->doc->setModuleTemplate('templates/ws_forms.html'); $this->doc->docType = 'xhtml_trans'; $this->doc->form = '
'; @@ -208,9 +209,7 @@ // // start page // - $title = $this->getTitle(); - $this->content .= $this->doc->startPage($title); - $this->content .= $this->doc->header($title); + $this->content .= $this->doc->header($this->getTitle()); $this->content .= $this->doc->spacer(5); // @@ -219,21 +218,19 @@ $this->content .= $this->tceforms->printNeededJSFunctions_top(); $this->content .= $this->buildForm(); $this->content .= $this->tceforms->printNeededJSFunctions(); - - // - // end page - // - $this->content .= $this->doc->endPage(); + + // 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($this->getTitle()); + $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + $this->content.= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); } - - - - - - - - /** * Outputs module content to the browser. * @@ -243,6 +240,29 @@ 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; + + $buttons = array( + 'close' => '', + 'save' => '', + 'save_close' => '' + ); + + // Close, `n` below is simply to prevent caching + $buttons['close'] = 'doc->backPath, 'gfx/closedok.gif') . ' class="c-inputButton" title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '" alt="" />'; + // Save + $buttons['save'] = 'doc->backPath, 'gfx/savedok.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '" value="_savedok" />'; + // Save & Close + $buttons['save_close'] = 'doc->backPath, 'gfx/saveandclosedok.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', 1) . '" value="_saveandclosedok" />'; + + return $buttons; + } @@ -251,7 +271,6 @@ - /************************* * * PRIVATE FUNCTIONS @@ -377,10 +396,8 @@ $form .= ''; $form = $this->tceforms->wrapTotal($form, $rec, $table); - $buttons = $this->createButtons() . $this->doc->spacer(5); - // Combine it all: - $content .= $buttons . $form . $buttons; + $content .= $form; return $content; } @@ -433,7 +450,6 @@ // Create form for the record (either specific list of fields or the whole record): $form = ''; - $form .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.path', 1) . ': ' . $this->tceforms->getRecordPath($table,$rec); $form .= $this->doc->spacer(5); $form .= $this->tceforms->getMainFields($table,$rec); @@ -447,28 +463,12 @@ $form .= ''; $form = $this->tceforms->wrapTotal($form, $rec, $table); - $buttons = $this->createButtons() . $this->doc->spacer(5); - // Combine it all: - $content .= $buttons . $form . $buttons; + $content .= $form; return $content; } - /** - * Creates standard buttons for form. Adopted from alt_doc.php. - * - * @return string Generated buttons code - */ - function createButtons() { - global $LANG; - $content = ''; - $content .= 'doc->backPath,'gfx/savedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc',1).'" value="_savedok" />'; - $content .= 'doc->backPath,'gfx/saveandclosedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc',1).'" value="_saveandclosedok" />'; - // `n` below is simply to prevent caching - $content .= 'doc->backPath,'gfx/closedok.gif','width="21" height="16"').' class="c-inputButton" title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc',1).'" alt="" />'; - return $content; - } Index: typo3/stylesheet.css =================================================================== --- typo3/stylesheet.css (revision 3151) +++ 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#typo3-mod-user-ws-index-php, body#typo3-mod-user-ws-workspaceforms-php { padding: 0; margin: 0; overflow: hidden; height: 100%; } /**************************************** Index: typo3/templates/ws.html =================================================================== --- typo3/templates/ws.html (revision 0) +++ typo3/templates/ws.html (revision 0) @@ -0,0 +1,33 @@ + +
+ +
+
+
###BUTTONLIST_LEFT###
+
###BUTTONLIST_RIGHT###
+
+
+
+
+
+
+ +
+ ###CONTENT### +
+
+ + + + + +
###BUTTONS###
+ + + +###NEW_RECORD### + + + + + \ No newline at end of file Index: typo3/templates/ws_forms.html =================================================================== --- typo3/templates/ws_forms.html (revision 0) +++ typo3/templates/ws_forms.html (revision 0) @@ -0,0 +1,34 @@ + +
+ +
+
+
###BUTTONLIST_LEFT###
+
###BUTTONLIST_RIGHT###
+
+
+
###PAGEPATH###
+
###PAGEINFO###
+
+
+ +
+ ###CONTENT### +
+
+ + + + + +
###BUTTONS###
+ + + +###CLOSE### +###SAVE######SAVE_CLOSE### + + + + + \ No newline at end of file