Project

General

Profile

Feature #21928 » 13183_v1.diff

Administrator Admin, 2010-01-08 14:16

View differences:

typo3/class.db_list.inc (working copy)
var $modSharedTSconfig = array(); // Shared module configuration, used by localization features
var $pageRecord = array(); // Loaded with page record with version overlay if any.
var $hideTables = ''; // Tables which should not get listed
var $tableControls = array(); // Options for the controls (edit, info, undo/redo etc.)
var $tableTSconfigOverTCA = array(); //TSconfig which overwrites TCA-Settings
var $tablesCollapsed = array(); // Array of collapsed / uncollapsed tables in multi table view
typo3/class.db_list_extra.inc (working copy)
$permsEdit = ($table=='pages' && ($localCalcPerms&2)) || ($table!='pages' && ($this->calcPerms&16));
// "Show" link (only pages and tt_content elements)
if ($table=='pages' || $table=='tt_content') {
if (($table=='pages' || $table=='tt_content') && !$this->tableControls[$table . '.']['show.']['disabled']) {
$params='&edit['.$table.']['.$row['uid'].']=edit';
$cells['view']='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($table=='tt_content'?$this->id.'#'.$row['uid']:$row['uid'], $this->backPath)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'" alt="" />'.
......
}
// "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
if ($permsEdit) {
if ($permsEdit && !$this->tableControls[$table . '.']['edit.']['disabled']) {
$params='&edit['.$table.']['.$row['uid'].']=edit';
$cells['edit']='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,-1)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2'.(!$TCA[$table]['ctrl']['readOnly']?'':'_d').'.gif','width="11" height="12"').' title="'.$LANG->getLL('edit',1).'" alt="" />'.
......
}
// "Move" wizard link for pages/tt_content elements:
if (($table=="tt_content" && $permsEdit) || ($table=='pages')) {
if ((($table=="tt_content" && $permsEdit) || ($table=='pages')) && !$this->tableControls[$table . '.']['move.']['disabled']) {
$cells['move']='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$this->backPath.'move_el.php?table='.$table.'&uid='.$row['uid'].'\');').'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/move_'.($table=='tt_content'?'record':'page').'.gif','width="11" height="12"').' title="'.$LANG->getLL('move_'.($table=='tt_content'?'record':'page'),1).'" alt="" />'.
'</a>';
......
// If the extended control panel is enabled OR if we are seeing a single table:
if ($SOBE->MOD_SETTINGS['bigControlPanel'] || $this->table) {
if(!$this->tableControls[$table . '.']['info.']['disabled']) {
// "Info": (All records)
$cells['viewBig']='<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.$row['uid'].'\'); return false;').'">'.
$cells['viewBig']='<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.$row['uid'].'\'); return false;').'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' title="'.$LANG->getLL('showInfo',1).'" alt="" />'.
'</a>';
}
// If the table is NOT a read-only table, then show these links:
if (!$TCA[$table]['ctrl']['readOnly']) {
// "Revert" link (history/undo)
$cells['history']='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$this->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$row['uid']).'\',\'#latest\');').'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/history2.gif','width="13" height="12"').' title="'.$LANG->getLL('history',1).'" alt="" />'.
'</a>';
if(!$this->tableControls[$table . '.']['history.']['disabled']) {
// "Revert" link (history/undo)
$cells['history']='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$this->backPath.'show_rechis.php?element='.rawurlencode($table.':'.$row['uid']).'\',\'#latest\');').'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/history2.gif','width="13" height="12"').' title="'.$LANG->getLL('history',1).'" alt="" />'.
'</a>';
}
// Versioning:
if (t3lib_extMgm::isLoaded('version')) {
if (t3lib_extMgm::isLoaded('version') && !$this->tableControls[$table . '.']['versions.']['disabled']) {
$vers = t3lib_BEfunc::selectVersionsOfRecord($table, $row['uid'], 'uid', $GLOBALS['BE_USER']->workspace, FALSE, $row);
if (is_array($vers)) { // If table can be versionized.
if (count($vers)>1) {
......
}
// "Edit Perms" link:
if ($table=='pages' && $GLOBALS['BE_USER']->check('modules','web_perm')) {
if ($table=='pages' && $GLOBALS['BE_USER']->check('modules','web_perm') && !$this->tableControls[$table . '.']['permissions.']['disabled']) {
$cells['perms']='<a href="'.htmlspecialchars('mod/web/perm/index.php?id='.$row['uid'].'&return_id='.$row['uid'].'&edit=1').'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/perm.gif','width="7" height="12"').' title="'.$LANG->getLL('permissions',1).'" alt="" />'.
'</a>';
......
}
// "New record after" link (ONLY if the records in the table are sorted by a "sortby"-row or if default values can depend on previous record):
if ($TCA[$table]['ctrl']['sortby'] || $TCA[$table]['ctrl']['useColumnsForDefaultValues']) {
if (($TCA[$table]['ctrl']['sortby'] || $TCA[$table]['ctrl']['useColumnsForDefaultValues']) && !$this->tableControls[$table . '.']['newRecordAfter.']['disabled']) {
if (
($table!='pages' && ($this->calcPerms&16)) || // For NON-pages, must have permission to edit content on this parent page
($table=='pages' && ($this->calcPerms&8)) // For pages, must have permission to create new pages here.
......
}
// "Up/Down" links
if ($permsEdit && $TCA[$table]['ctrl']['sortby'] && !$this->sortField && !$this->searchLevels) {
if ($permsEdit && $TCA[$table]['ctrl']['sortby'] && !$this->sortField && !$this->searchLevels && !$this->tableControls[$table . '.']['upDown.']['disabled']) {
if (isset($this->currentTable['prev'][$row['uid']])) { // Up
$params='&cmd['.$table.']['.$row['uid'].'][move]='.$this->currentTable['prev'][$row['uid']];
$cells['moveUp']='<a href="#" onclick="'.htmlspecialchars('return jumpToUrl(\''.$SOBE->doc->issueCommand($params,-1).'\');').'">'.
......
// "Hide/Unhide" links:
$hiddenField = $TCA[$table]['ctrl']['enablecolumns']['disabled'];
if ($permsEdit && $hiddenField && $TCA[$table]['columns'][$hiddenField] && (!$TCA[$table]['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields',$table.':'.$hiddenField))) {
if (
$permsEdit && $hiddenField && $TCA[$table]['columns'][$hiddenField] &&
(!$TCA[$table]['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields',$table.':'.$hiddenField)) &&
!$this->tableControls[$table . '.']['hideUnhide.']['disabled']
) {
if ($row[$hiddenField]) {
$params='&data['.$table.']['.$row['uid'].']['.$hiddenField.']=0';
$cells['hide']='<a href="#" onclick="'.htmlspecialchars('return jumpToUrl(\''.$SOBE->doc->issueCommand($params,-1).'\');').'">'.
......
}
// "Delete" link:
if (($table=='pages' && ($localCalcPerms&4)) || ($table!='pages' && ($this->calcPerms&16))) {
if (
(($table=='pages' && ($localCalcPerms&4)) || ($table!='pages' && ($this->calcPerms&16))) &&
!$this->tableControls[$table . '.']['delete.']['disabled']
) {
$titleOrig = t3lib_BEfunc::getRecordTitle($table,$row,FALSE,TRUE);
$title = t3lib_div::slashJS(t3lib_div::fixed_lgd_cs($titleOrig, $this->fixedL), 1);
$params = '&cmd['.$table.']['.$row['uid'].'][delete]=1';
......
}
// "Levels" links: Moving pages into new levels...
if ($permsEdit && $table=='pages' && !$this->searchLevels) {
if ($permsEdit && $table=='pages' && !$this->searchLevels && !$this->tableControls[$table . '.']['moveLevels.']['disabled']) {
// Up (Paste as the page right after the current parent page)
if ($this->calcPerms&8) {
typo3/db_list.php (working copy)
$dblist->disableSingleTableView = $this->modTSconfig['properties']['disableSingleTableView'];
$dblist->listOnlyInSingleTableMode = $this->modTSconfig['properties']['listOnlyInSingleTableView'];
$dblist->hideTables = $this->modTSconfig['properties']['hideTables'];
$dblist->tableControls = $this->modTSconfig['properties']['tableControls.'];
$dblist->tableTSconfigOverTCA = $this->modTSconfig['properties']['table.'];
$dblist->clickTitleMode = $this->modTSconfig['properties']['clickTitleMode'];
$dblist->alternateBgColors=$this->modTSconfig['properties']['alternateBgColors']?1:0;
(2-2/2)