Bug #18156 ยป 20080207_RFC_7435.diff
typo3/mod/user/ws/index.php (working copy) | ||
---|---|---|
$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
|
||
... | ... | |
$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);
|
||
... | ... | |
// 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 <body> 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);
|
||
|
||
}
|
||
/**
|
||
... | ... | |
* @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'] = '<a href="' . $newWkspUrl . '">' .
|
||
'<img ' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/new_el.gif') . ' alt="' . $LANG->getLL('img_title_create_new_workspace') . '" id="ver-wl-new-workspace-icon" />' .
|
||
'</a>';
|
||
}
|
||
return $buttons;
|
||
}
|
||
... | ... | |
/*********************************
|
||
*
|
||
* Module content: Publish
|
||
... | ... | |
}
|
||
$content .= '</table>';
|
||
$newWkspUrl = 'workspaceforms.php?action=new';
|
||
// workspace creation link
|
||
if ($GLOBALS['BE_USER']->isAdmin() || 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4)) {
|
||
$content .= '<br /><a href="' . $newWkspUrl . '">' .
|
||
'<img ' .
|
||
t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/new_el.gif', 'width="11" height="12"') .
|
||
' alt="' . $LANG->getLL('img_title_create_new_workspace'). '" id="ver-wl-new-workspace-icon" />' .
|
||
$LANG->getLL('link_text_create_new_workspace') . '</a>';
|
||
}
|
||
return $content;
|
||
}
|
||
typo3/mod/user/ws/workspaceforms.php (working copy) | ||
---|---|---|
$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 = '<form action="' . t3lib_div::getIndpEnv('SCRIPT_NAME').'" method="post" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">';
|
||
... | ... | |
//
|
||
// 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);
|
||
//
|
||
... | ... | |
$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 <body> 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.
|
||
*
|
||
... | ... | |
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'] = '<a href="index.php?n=' . uniqid('wksp') . '"><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/closedok.gif') . ' class="c-inputButton" title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '" alt="" /></a>';
|
||
// Save
|
||
$buttons['save'] = '<input type="image" class="c-inputButton" name="_savedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/savedok.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '" value="_savedok" />';
|
||
// Save & Close
|
||
$buttons['save_close'] = '<input type="image" class="c-inputButton" name="_saveandclosedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/saveandclosedok.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', 1) . '" value="_saveandclosedok" />';
|
||
|
||
return $buttons;
|
||
}
|
||
... | ... | |
/*************************
|
||
*
|
||
* PRIVATE FUNCTIONS
|
||
... | ... | |
$form .= '<input type="hidden" name="wkspId" value="' . htmlspecialchars($this->workspaceId) . '" />';
|
||
$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;
|
||
}
|
||
... | ... | |
// 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);
|
||
... | ... | |
$form .= '<input type="hidden" name="_disableRTE" value="'.$this->tceforms->disableRTE.'" />';
|
||
$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 <code>alt_doc.php</code>.
|
||
*
|
||
* @return string Generated buttons code
|
||
*/
|
||
function createButtons() {
|
||
global $LANG;
|
||
$content = '';
|
||
$content .= '<input type="image" class="c-inputButton" name="_savedok"' . t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedok.gif','').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc',1).'" value="_savedok" />';
|
||
$content .= '<input type="image" class="c-inputButton" name="_saveandclosedok"'.t3lib_iconWorks::skinImg($this->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 .= '<a href="index.php?n=' . uniqid('wksp') . '"><img'.t3lib_iconWorks::skinImg($this->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="" /></a>';
|
||
return $content;
|
||
}
|
||
typo3/stylesheet.css (working copy) | ||
---|---|---|
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%; }
|
||
/****************************************
|
typo3/templates/ws.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###</div>
|
||
</div>
|
||
<div id="typo3-docheader-row2">
|
||
<div class="pagepath"></div>
|
||
<div class="infooptions"></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_GROUP1### -->###NEW_RECORD###<!-- ###BUTTON_GROUP1### -->
|
||
<!-- ###BUTTON_GROUPS_LEFT### -->
|
||
|
||
<!-- ###BUTTON_GROUPS_RIGHT### -->
|
||
<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->
|
||
<!-- ###BUTTON_GROUPS_RIGHT### -->
|
typo3/templates/ws_forms.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###</div>
|
||
</div>
|
||
<div id="typo3-docheader-row2">
|
||
<div class="pagepath">###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_GROUP1### -->###CLOSE###<!-- ###BUTTON_GROUP1### -->
|
||
<!-- ###BUTTON_GROUP2### -->###SAVE######SAVE_CLOSE###<!-- ###BUTTON_GROUP2### -->
|
||
<!-- ###BUTTON_GROUPS_LEFT### -->
|
||
|
||
<!-- ###BUTTON_GROUPS_RIGHT### -->
|
||
<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->
|
||
<!-- ###BUTTON_GROUPS_RIGHT### -->
|