Index: typo3/mod/tools/em/class.em_index.php
===================================================================
--- typo3/mod/tools/em/class.em_index.php (revision 3151)
+++ typo3/mod/tools/em/class.em_index.php (working copy)
@@ -402,9 +402,10 @@
$this->xmlhandler->useObsolete = $this->MOD_SETTINGS['display_obsolete'];
// Initialize Document Template object:
- $this->doc = t3lib_div::makeInstance('noDoc');
+ $this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
- $this->doc->docType = 'xhtml_trans';
+ $this->doc->setModuleTemplate('templates/em_index.html');
+ $this->doc->docType='xhtml_trans';
// JavaScript
$this->doc->JScode = $this->doc->wrapScriptTags('
@@ -555,7 +556,6 @@
if (empty($this->MOD_SETTINGS['mirrorListURL'])) $this->MOD_SETTINGS['mirrorListURL'] = $TYPO3_CONF_VARS['EXT']['em_mirrorListURL'];
// Starting page:
- $this->content.=$this->doc->startPage('Extension Manager');
$this->content.=$this->doc->header('Extension Manager');
$this->content.=$this->doc->spacer(5);
@@ -575,10 +575,6 @@
} elseif ($this->CMD['importExtInfo']) { // Gets detailed information of an extension from online rep.
$this->importExtInfo($this->CMD['importExtInfo'],$this->CMD['extVersion']);
} else { // No command - we show what the menu setting tells us:
-
- $menu = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.menu').' '.
- t3lib_BEfunc::getFuncMenu(0,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']);
-
if (t3lib_div::inList('0,1,2',$this->MOD_SETTINGS['function'])) {
$menu.=' Group by: '.t3lib_BEfunc::getFuncMenu(0,'SET[listOrder]',$this->MOD_SETTINGS['listOrder'],$this->MOD_MENU['listOrder']).
' Show: '.t3lib_BEfunc::getFuncMenu(0,'SET[display_details]',$this->MOD_SETTINGS['display_details'],$this->MOD_MENU['display_details']).'
';
@@ -626,11 +622,20 @@
break;
}
}
+
+ // Setting up the buttons and markers for docheader
+ $docHeaderButtons = $this->getButtons();
+ $markers = array(
+ 'CSH' => $docHeaderButtons['csh'],
+ 'FUNC_MENU' => $this->getFuncMenu(),
+ 'CONTENT' => $this->content
+ );
- // Shortcuts:
- if ($BE_USER->mayMakeShortcut()) {
- $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('CMD','function',$this->MCONF['name']));
- }
+ // Build the
for the module
+ $this->content = $this->doc->startPage('Extension Manager');
+ $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+ $this->content.= $this->doc->endPage();
+ $this->content = $this->doc->insertStylesAndJS($this->content);
}
/**
@@ -640,11 +645,51 @@
*/
function printContent() {
if ($this->doPrintContent) {
- $this->content.= $this->doc->endPage();
echo $this->content;
}
}
+
+ /**
+ * Create the function menu
+ *
+ * @return string HTML of the function menu
+ */
+ private function getFuncMenu() {
+ $funcMenu = '';
+ if(!$this->CMD['showExt'] && !$this->CMD['requestInstallExtensions'] && !$this->CMD['importExt'] && !$this->CMD['uploadExt'] && !$this->CMD['importExtInfo']) {
+ $funcMenu = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
+ } elseif($this->CMD['showExt'] && (!$this->CMD['standAlone'] && !t3lib_div::_GP('standAlone'))) {
+ $funcMenu = t3lib_BEfunc::getFuncMenu(0, 'SET[singleDetails]', $this->MOD_SETTINGS['singleDetails'], $this->MOD_MENU['singleDetails'], '', '&CMD[showExt]=' . $this->CMD['showExt']);
+ }
+ return $funcMenu;
+ }
+ /**
+ * Create the panel of buttons for submitting the form or otherwise perform operations.
+ *
+ * @return array all available buttons as an assoc. array
+ */
+ private function getButtons() {
+
+ $buttons = array(
+ 'csh' => '',
+ 'back' => '',
+ 'shortcut' => ''
+ );
+ // CSH
+ //$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);
+
+ // Shortcut
+ if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
+ $buttons['shortcut'] = $this->doc->makeShortcutIcon('CMD','function',$this->MCONF['name']);
+ }
+ // Back
+ if(($this->CMD['showExt'] && (!$this->CMD['standAlone'] && !t3lib_div::_GP('standAlone'))) || ($this->CMD['importExt'] || $this->CMD['uploadExt'] && (!$this->CMD['standAlone'])) || $this->CMD['importExtInfo']) {
+ $buttons['back'] = 'doc->backPath, 'gfx/goback.gif') . ' title="Go back" class="absmiddle" alt="" />';
+ }
+
+ return $buttons;
+ }
@@ -653,7 +698,6 @@
-
/*********************************
*
* Function Menu Applications
@@ -1408,9 +1452,6 @@
*/
function importExtInfo($extKey, $version='') {
- // "Go back" link
- $content = ' Go back';
- $this->content.= $this->doc->section('',$content);
$content = '';
// Fetch remote data:
@@ -1840,7 +1881,6 @@
// Install / Uninstall:
if(!$this->CMD['standAlone']) {
- $content = ' Go back
'.$content;
$content.='Install / Uninstall Extension:
';
$content.= $new_list[$extKey] ?
''.$this->removeButton().' Uninstall extension' :
@@ -1897,16 +1937,8 @@
// Function menu here:
if(!$this->CMD['standAlone'] && !t3lib_div::_GP('standAlone')) {
- $content = '
- ';
- $this->content.=$this->doc->section('',$content);
+ $content = 'Extension: ' . $this->extensionTitleIconHeader($extKey, $list[$extKey]) . ' (' . $extKey . ')';
+ $this->content.= $this->doc->section('', $content);
}
// Show extension details:
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-tools-em-index-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
/****************************************
Index: typo3/templates/em_index.html
===================================================================
--- typo3/templates/em_index.html (revision 0)
+++ typo3/templates/em_index.html (revision 0)
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ ###CONTENT###
+
+
+
+
+
+
+
+ ###BUTTONS###
+
+
+
+###BACK###
+
+
+
+###SHORTCUT###
+
\ No newline at end of file