Index: typo3/alt_doc.php
===================================================================
--- typo3/alt_doc.php (revision 3047)
+++ typo3/alt_doc.php (working copy)
@@ -139,6 +139,7 @@
* @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 @@
$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 @@
// 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='
';
-
- // List Module CSH:
- if ($this->id) {
- $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $GLOBALS['BACK_PATH'],' |');
- }
-
-
// 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.='
';
}
-
- // Adding content to internal accumulation variable:
- $this->content.=$content;
+ return $content;
}
/**
@@ -1034,130 +1031,43 @@
// 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).' '.
- $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.
- ''.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'';
-
- if (!$this->modTSconfig['properties']['disableIconToolbar']) {
- // Create icon "toolbar" for common operations like creating/moving elements/pages etc.
- $toolBar='';
- // History:
- $toolBar.=''.
- ''.
- '';
- // New content element
- $toolBar.=''.
- ''.
- '';
- // Move page:
- $toolBar.=''.
- ''.
- '';
- // Create new page (wizard):
- $toolBar.=''.
- ''.
- '';
- // Edit page properties:
- $params='&edit[pages]['.$this->id.']=edit';
- $toolBar.=''.
- ''.
- '';
-
- // 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.='
-
-
-
'.$toolBar.'
-
-
';
- }
-
- // Create menu of table-icons for jumping to table-listing anchor points:
- if ($this->MOD_SETTINGS['function']!=3 && count($tableOutput)>1) {
- $goToTable_menu = '
'.$h_menu.'
';
- } else {
- $goToTable_menu = '';
- }
-
- // Compile the whole header section into a table: Toolbar, Table selector, Function menu(s), Page-edit icon:
- $hS2='
-
-
-
'.$headerSection.'
- '.$goToTable_menu.'
-
'.$this->topFuncMenu.'
-
'.$this->editIcon.'
-
-
';
-
- // 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(''.$dblist->activeTables[$table],$output,TRUE,TRUE,0,TRUE);
- $this->content.=$this->doc->spacer(15);
- $this->content.=$this->doc->sectionEnd();
+ $content.=$this->doc->section(''.$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);
+ $content.=$this->doc->spacer(10);
+ $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.='
-
-
-