Index: typo3/move_el.php
===================================================================
--- typo3/move_el.php (revision 3160)
+++ typo3/move_el.php (working copy)
@@ -269,14 +269,14 @@
$this->perms_clause = $BE_USER->getPagePermsClause(1);
// 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/move_el.html');
$this->doc->JScode='';
// Starting document content (header):
$this->content='';
- $this->content.=$this->doc->startPage($LANG->getLL('movingElement'));
$this->content.=$this->doc->header($LANG->getLL('movingElement'));
$this->content.=$this->doc->spacer(5);
}
@@ -339,9 +339,6 @@
// Create the position tree:
$code.= $posMap->positionTree($this->page_id,$pageinfo,$this->perms_clause,$this->R_URI);
-
- // CSH for move-pages:
- $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'],'
|');
}
}
@@ -397,20 +394,23 @@
// Create the position tree (for pages):
$code.= $posMap->positionTree($this->page_id,$pageinfo,$this->perms_clause,$this->R_URI);
-
- // CSH for move-content-elements:
- $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'],'
|');
}
}
- // IF a return-url is given, print the go-back link:
- if ($this->R_URI) {
- $code.='
doc->backPath,'gfx/goback.gif','width="14" height="14"').' alt="" />'.$LANG->getLL('goBack',1).'';
- }
-
// Add the $code content as a new section to the module:
$this->content.=$this->doc->section($LANG->getLL('selectPositionOfElement').':',$code,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('movingElement'));
+ $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+ $this->content.= $this->doc->endPage();
+ $this->content = $this->doc->insertStylesAndJS($this->content);
}
/**
@@ -419,10 +419,39 @@
* @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 $LANG, $BACK_PATH;
+
+ $buttons = array(
+ 'csh' => '',
+ 'back' => ''
+ );
+
+ if ($this->page_id) {
+ if ((string)$this->table == 'pages') {
+ // CSH
+ $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '');
+ } elseif((string)$this->table == 'tt_content') {
+ // CSH
+ $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'], '');
+ }
+
+ if ($this->R_URI) {
+ // Back
+ $buttons['back'] ='doc->backPath, 'gfx/goback.gif') . ' alt="" title="' . $LANG->getLL('goBack', 1) .'" />';
+ }
+ }
+
+ return $buttons;
+ }
}
// Include extension?
Index: typo3/stylesheet.css
===================================================================
--- typo3/stylesheet.css (revision 3160)
+++ 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-move-el-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
/****************************************
Index: typo3/templates/move_el.html
===================================================================
--- typo3/templates/move_el.html (revision 0)
+++ typo3/templates/move_el.html (revision 0)
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ ###CONTENT###
+
+
+
+
+
+ ###BUTTONS###
+
+
+
+###BACK###
+
+
+
+
\ No newline at end of file