Project

General

Profile

Bug #22252 ยป hooks_pagemodule.patch

Administrator Admin, 2010-03-08 15:32

View differences:

typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy)
// Edit content element:
$params='&edit[tt_content]['.$this->tt_contentData['nextThree'][$row['uid']].']=edit';
$out.='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath)).'">'.
$out_edit='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.htmlspecialchars($this->nextThree>1?sprintf($GLOBALS['LANG']->getLL('nextThree'),$this->nextThree):$GLOBALS['LANG']->getLL('edit')).'" alt="" />'.
'</a>';
// Hook for hiding the edit icon
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideEditIcon'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideEditIcon'] as $classRef) {
$var_array = array(
'out_edit' => &$out_edit,
'uid' => $row['uid']
);
t3lib_div::callUserFunction($classRef, $var_array, $this);
}
}
$out .= $out_edit;
if (!$disableMoveAndNewButtons) {
// New content element:
if ($this->option_newWizard) {
......
// Move element up:
if ($this->tt_contentData['prev'][$row['uid']]) {
$params='&cmd[tt_content]['.$row['uid'].'][move]='.$this->tt_contentData['prev'][$row['uid']];
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
$out_moveup='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('moveUp',1).'" alt="" />'.
'</a>';
} else {
$out.='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"',2).' alt="" />';
$out_moveup='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"',2).' alt="" />';
}
// Hook for hiding the move up icon
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideMoveUpIcon'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideMoveUpIcon'] as $classRef) {
$var_array = array(
'out_moveup' => &$out_moveup,
'uid' => $row['uid']
);
t3lib_div::callUserFunction($classRef, $var_array, $this);
}
}
$out .= $out_moveup;
// Move element down:
if ($this->tt_contentData['next'][$row['uid']]) {
$params='&cmd[tt_content]['.$row['uid'].'][move]='.$this->tt_contentData['next'][$row['uid']];
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
$out_movedown='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('moveDown',1).'" alt="" />'.
'</a>';
} else {
$out.='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"',2).' alt="" />';
$out_movedown='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"',2).' alt="" />';
}
// Hook for hiding the move down icon
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideMoveDownIcon'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideMoveDownIcon'] as $classRef) {
$var_array = array(
'out_movedown' => &$out_movedown,
'uid' => $row['uid']
);
t3lib_div::callUserFunction($classRef, $var_array, $this);
}
}
$out .= $out_movedown;
}
// Hide element:
......
if ($hiddenField && $TCA['tt_content']['columns'][$hiddenField] && (!$TCA['tt_content']['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields','tt_content:'.$hiddenField))) {
if ($row[$hiddenField]) {
$params='&data[tt_content]['.($row['_ORIG_uid'] ? $row['_ORIG_uid'] : $row['uid']).']['.$hiddenField.']=0';
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
$out_hide='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_unhide.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('unHide',1).'" alt="" />'.
'</a>';
} else {
$params='&data[tt_content]['.($row['_ORIG_uid'] ? $row['_ORIG_uid'] : $row['uid']).']['.$hiddenField.']=1';
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
$out_hide='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_hide.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('hide',1).'" alt="" />'.
'</a>';
}
// Hook for hiding the hide icon
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideHideIcon'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideHideIcon'] as $classRef) {
$var_array = array(
'out_hide' => &$out_hide,
'uid' => $row['uid']
);
t3lib_div::callUserFunction($classRef, $var_array, $this);
}
}
$out .= $out_hide;
}
// Delete
$params='&cmd[tt_content]['.$row['uid'].'][delete]=1';
$confirm = $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('deleteWarning') .
t3lib_BEfunc::translationCount('tt_content', $row['uid'], ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.translationsOfRecord')));
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'" onclick="'.htmlspecialchars('return confirm('. $confirm .');').'">'.
$out_delete='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'" onclick="'.htmlspecialchars('return confirm('. $confirm .');').'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/garbage.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('deleteItem',1).'" alt="" />'.
'</a>';
// Hook for hiding the delete icon
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideDeleteIcon'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/sysext/cms/layout/class.tx_cms_layout.php']['hideDeleteIcon'] as $classRef) {
$var_array = array(
'out_delete' => &$out_delete,
'uid' => $row['uid']
);
t3lib_div::callUserFunction($classRef, $var_array, $this);
}
}
$out .= $out_delete;
// End cell:
$out.= '
    (1-1/1)