Project

General

Profile

Bug #18047 » 20080205_rfc7262_info.diff

Administrator Admin, 2008-02-05 10:00

View differences:

typo3/mod/web/info/index.php (working copy)
require($BACK_PATH.'template.php');
$LANG->includeLLFile('EXT:lang/locallang_mod_web_info.xml');
require_once (PATH_t3lib.'class.t3lib_scbase.php');
require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
$BE_USER->modAccess($MCONF,1);
......
$this->pageinfo=array('title' => '[root-level]','uid'=>0,'pid'=>0);
}
$this->doc = t3lib_div::makeInstance('mediumDoc');
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('templates/info.html');
$this->doc->docType = 'xhtml_trans';
$this->doc->tableLayout = Array (
'0' => Array (
......
window.location.href = URL;
}
');
$this->doc->postCode=$this->doc->wrapScriptTags('
$this->doc->postCode = $this->doc->wrapScriptTags('
script_ended = 1;
if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
');
// Setting up the context sensitive menu:
$this->doc->getContextMenuCode();
$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.
$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '.
'<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>';
// Draw the header.
$this->doc->form = '<form action="index.php" method="post" name="webinfoForm">';
$this->content.=$this->doc->startPage($LANG->getLL('title'));
$this->content.=$this->doc->header($LANG->getLL('title'));
$this->content.=$this->doc->spacer(5);
$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));
$this->content.=$this->doc->divider(5);
$vContent = $this->doc->getVersionSelector($this->id,1);
if ($vContent) {
$this->content.=$this->doc->section('',$vContent);
......
$this->extObjContent();
// Info Module CSH:
$this->content.= t3lib_BEfunc::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH'], '<br/>|', FALSE, 'margin-top: 30px;');
// ShortCut
if ($BE_USER->mayMakeShortcut()) {
$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));
}
$this->content.=$this->doc->spacer(10);
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markerArray = array(
'CSH' => $docHeaderButtons['csh'],
'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
'CONTENT' => $this->content
);
// Build the <body> for the module
$this->content = $this->doc->startPage($LANG->getLL('title'));
$this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markerArray);
$this->content.= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
} else {
// If no access or if ID == zero
$this->doc = t3lib_div::makeInstance('mediumDoc');
......
$this->content.=$this->doc->header($LANG->getLL('title'));
$this->content.=$this->doc->spacer(5);
$this->content.=$this->doc->spacer(10);
$this->content.= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
}
......
*
* @return void
*/
function printContent() {
$this->content.= $this->doc->endPage();
function printContent() {
$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
*/
function getButtons() {
global $TCA, $LANG, $BACK_PATH, $BE_USER;
$buttons = array(
'csh' => '',
'view' => '',
'record_list' => '',
'shortcut' => '',
);
// CSH
$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH']);
// View page
$buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '">' .
'<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/zoom.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" hspace="3" alt="" />' .
'</a>';
// Shortcut
if ($BE_USER->mayMakeShortcut()) {
$buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
}
// If access to Web>List for user, then link to that module.
if ($BE_USER->check('modules','web_list')) {
$href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
$buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '">' .
'<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/list.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '" alt="" />' .
'</a>';
}
return $buttons;
}
}
// Include extension?
typo3/templates/info.html (revision 0)
<!-- ###FULLDOC### begin -->
<div class="typo3-fullDoc">
<!-- Page header with buttons, path details and csh -->
<div id="typo3-docheader">
<div id="typo3-docheader-row1">
<div class="buttonsleft">###BUTTONLIST_LEFT###</div>
<div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
</div>
<div id="typo3-docheader-row2">
<div class="pagepath">###CSH######PAGEPATH###</div>
<div class="infooptions">###PAGEINFO###</div>
</div>
</div>
<!-- Content of module, for instance listing, info or editing -->
<div id="typo3-docbody">
###CONTENT###
</div>
</div>
<!-- ###FULLDOC### end -->
<!-- Grouping the icons on top -->
<!-- ###BUTTON_GROUP_WRAP### -->
<div class="buttongroup">###BUTTONS###</div>
<!-- ###BUTTON_GROUP_WRAP### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUPS_RIGHT### -->
<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######SHORTCUT###<!-- ###BUTTON_GROUP1### -->
<!-- ###BUTTON_GROUPS_RIGHT### -->
typo3/templates/info.html (revision 0)
<!-- ###FULLDOC### begin -->
<div class="typo3-fullDoc">
<!-- Page header with buttons, path details and csh -->
<div id="typo3-docheader">
<div id="typo3-docheader-row1">
<div class="buttonsleft">###BUTTONLIST_LEFT###</div>
<div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
</div>
<div id="typo3-docheader-row2">
<div class="pagepath">###CSH######PAGEPATH###</div>
<div class="infooptions">###PAGEINFO###</div>
</div>
</div>
<!-- Content of module, for instance listing, info or editing -->
<div id="typo3-docbody">
###CONTENT###
</div>
</div>
<!-- ###FULLDOC### end -->
<!-- Grouping the icons on top -->
<!-- ###BUTTON_GROUP_WRAP### -->
<div class="buttongroup">###BUTTONS###</div>
<!-- ###BUTTON_GROUP_WRAP### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->
<!-- ###BUTTON_GROUPS_LEFT### -->
<!-- ###BUTTON_GROUPS_RIGHT### -->
<!-- ###BUTTON_GROUP1### -->###RECORD_LIST######SHORTCUT###<!-- ###BUTTON_GROUP1### -->
<!-- ###BUTTON_GROUPS_RIGHT### -->
(14-14/19)