本文整理汇总了PHP中t3lib_BEfunc::isRecordLocked方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_BEfunc::isRecordLocked方法的具体用法?PHP t3lib_BEfunc::isRecordLocked怎么用?PHP t3lib_BEfunc::isRecordLocked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_BEfunc
的用法示例。
在下文中一共展示了t3lib_BEfunc::isRecordLocked方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeEditForm
//.........这里部分代码省略.........
$CALC_PERMS = $BE_USER->calcPerms($calcPRec);
$hasAccess = $CALC_PERMS & 2 ? 1 : 0;
$deleteAccess = $CALC_PERMS & 4 ? 1 : 0;
$this->viewId = $calcPRec['uid'];
} else {
$CALC_PERMS = $BE_USER->calcPerms(t3lib_BEfunc::getRecord('pages', $calcPRec['pid']));
// Fetching pid-record first.
$hasAccess = $CALC_PERMS & 16 ? 1 : 0;
$deleteAccess = $CALC_PERMS & 16 ? 1 : 0;
$this->viewId = $calcPRec['pid'];
// Adding "&L=xx" if the record being edited has a languageField with a value larger than zero!
if ($TCA[$table]['ctrl']['languageField'] && $calcPRec[$TCA[$table]['ctrl']['languageField']] > 0) {
$this->viewId_addParams = '&L=' . $calcPRec[$TCA[$table]['ctrl']['languageField']];
}
}
// Check internals regarding access:
if ($hasAccess) {
$hasAccess = $BE_USER->recordEditAccessInternals($table, $calcPRec);
$deniedAccessReason = $BE_USER->errorMsg;
}
} else {
$hasAccess = 0;
}
}
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'] as $_funcRef) {
$_params = array('table' => $table, 'uid' => $theUid, 'cmd' => $cmd, 'hasAccess' => $hasAccess);
$hasAccess = t3lib_div::callUserFunction($_funcRef, $_params, $this);
}
}
// AT THIS POINT we have checked the access status of the editing/creation of records and we can now proceed with creating the form elements:
if ($hasAccess) {
$prevPageID = is_object($trData) ? $trData->prevPageID : '';
$trData = t3lib_div::makeInstance('t3lib_transferData');
$trData->addRawData = TRUE;
$trData->defVals = $this->defVals;
$trData->lockRecords = 1;
$trData->disableRTE = !$BE_USER->isRTE();
$trData->prevPageID = $prevPageID;
$trData->fetchRecord($table, $theUid, $cmd == 'new' ? 'new' : '');
// 'new'
reset($trData->regTableItems_data);
$rec = current($trData->regTableItems_data);
$rec['uid'] = $cmd == 'new' ? uniqid('NEW') : $theUid;
if ($cmd == 'new') {
$rec['pid'] = $theUid == 'prev' ? $thePrevUid : $theUid;
}
$this->elementsData[] = array('table' => $table, 'uid' => $rec['uid'], 'pid' => $rec['pid'], 'cmd' => $cmd, 'deleteAccess' => $deleteAccess);
// Now, render the form:
if (is_array($rec)) {
// Setting visual path / title of form:
$this->generalPathOfForm = $this->tceforms->getRecordPath($table, $rec);
if (!$this->storeTitle) {
$this->storeTitle = $this->recTitle ? htmlspecialchars($this->recTitle) : t3lib_BEfunc::getRecordTitle($table, $rec, TRUE);
}
// Setting variables in TCEforms object:
$this->tceforms->hiddenFieldList = '';
$this->tceforms->globalShowHelp = $this->disHelp ? 0 : 1;
if (is_array($this->overrideVals[$table])) {
$this->tceforms->hiddenFieldListArr = array_keys($this->overrideVals[$table]);
}
// Register default language labels, if any:
$this->tceforms->registerDefaultLanguageData($table, $rec);
// Create form for the record (either specific list of fields or the whole record):
$panel = '';
if ($this->columnsOnly) {
if (is_array($this->columnsOnly)) {
$panel .= $this->tceforms->getListedFields($table, $rec, $this->columnsOnly[$table]);
} else {
$panel .= $this->tceforms->getListedFields($table, $rec, $this->columnsOnly);
}
} else {
$panel .= $this->tceforms->getMainFields($table, $rec);
}
$panel = $this->tceforms->wrapTotal($panel, $rec, $table);
// Setting the pid value for new records:
if ($cmd == 'new') {
$panel .= '<input type="hidden" name="data[' . $table . '][' . $rec['uid'] . '][pid]" value="' . $rec['pid'] . '" />';
$this->newC++;
}
// Display "is-locked" message:
if ($lockInfo = t3lib_BEfunc::isRecordLocked($table, $rec['uid'])) {
$lockedMessage = t3lib_div::makeInstance('t3lib_FlashMessage', htmlspecialchars($lockInfo['msg']), '', t3lib_FlashMessage::WARNING);
t3lib_FlashMessageQueue::addMessage($lockedMessage);
}
// Combine it all:
$editForm .= $panel;
}
$thePrevUid = $rec['uid'];
} else {
$this->errorC++;
$editForm .= $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.noEditPermission', 1) . '<br /><br />' . ($deniedAccessReason ? 'Reason: ' . htmlspecialchars($deniedAccessReason) . '<br /><br />' : '');
}
}
}
}
}
}
return $editForm;
}
示例2: makeControl
//.........这里部分代码省略.........
// "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
if ($permsEdit && in_array('editRec', $shEl)) {
$params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
$icon = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/edit2' . (!$TCA[$table]['ctrl']['readOnly'] ? '' : '_d') . '.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('edit', 1) . '" alt="" />';
$cells[] = $this->wrapEditLink($icon, $params);
}
// If the extended control panel is enabled OR if we are seeing a single table:
if ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] || $this->table) {
// "Info": (All records)
if (in_array('infoRec', $shEl)) {
$cells[] = '<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)
if (in_array('revertRec', $shEl)) {
$cells[] = '<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')) {
$vers = t3lib_BEfunc::selectVersionsOfRecord($table, $row['uid'], $fields = 'uid');
if (is_array($vers)) {
// If table can be versionized.
if (count($vers) > 1) {
$st = 'background-color: #FFFF00; font-weight: bold;';
$lab = count($vers) - 1;
} else {
$st = 'background-color: #9999cc; font-weight: bold;';
$lab = 'V';
}
$cells[] = '<a href="' . htmlspecialchars($this->backPath . t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?table=' . rawurlencode($table) . '&uid=' . rawurlencode($row['uid']) . '" class="typo3-ctrl-versioning" style="' . htmlspecialchars($st) . '">' . $lab . '</a>';
}
}
// "Edit Perms" link:
if ($table == 'pages' && in_array('permsRec', $shEl) && $GLOBALS['BE_USER']->check('modules', 'web_perm')) {
$cells[] = '<a href="' . htmlspecialchars($this->backPath . '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>';
}
// "Up/Down" links
if ($permsEdit && $TCA[$table]['ctrl']['sortby'] && !$this->sortField && in_array('sortRec', $shEl)) {
//
if (isset($this->currentTable['prev'][$row['uid']])) {
// Up
$params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['prev'][$row['uid']];
$cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_up.gif', 'width="11" height="10"') . ' title="' . $LANG->getLL('moveUp', 1) . '" alt="" />' . '</a>';
} else {
$cells[] = '<img src="clear.gif" ' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_up.gif', 'width="11" height="10"', 2) . ' alt="" />';
}
if ($this->currentTable['next'][$row['uid']]) {
// Down
$params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['next'][$row['uid']];
$cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_down.gif', 'width="11" height="10"') . ' title="' . $LANG->getLL('moveDown', 1) . '" alt="" />' . '</a>';
} else {
$cells[] = '<img src="clear.gif" ' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_down.gif', 'width="11" height="10"', 2) . ' alt="" />';
}
}
// "Hide/Unhide" links:
$hiddenField = $TCA[$table]['ctrl']['enablecolumns']['disabled'];
if ($permsEdit && $hiddenField && $TCA[$table]['columns'][$hiddenField] && in_array('unHideRec', $shEl) && (!$TCA[$table]['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $table . ':' . $hiddenField))) {
if ($row[$hiddenField]) {
$params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=0';
$cells[] = '<a title="' . $LANG->getLL('unHide' . ($table == 'pages' ? 'Page' : ''), 1) . '" href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-unhide') . '</a>';
} else {
$params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=1';
$cells[] = '<a title="' . $LANG->getLL('hide' . ($table == 'pages' ? 'Page' : ''), 1) . '" href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-hide') . '</a>';
}
}
// "Delete" link:
// if ( ($table=='pages' && ($localCalcPerms&4)) || ($table!='pages' && ($this->calcPerms&16)) && in_array('delRec',$shEl) ) {
// $params='&cmd['.$table.']['.$row['uid'].'][delete]=1';
// $title = $row['title'].' ('.$row['file_name'].')';
//
// $cells[]='<a href="#" onclick="if (confirm('.$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.delete'),$title)).')) {jumpToUrl(\''.$GLOBALS['SOBE']->doc->issueCommand($params,-1).'\');} return false;"><img src="'.$this->backPath.'gfx/delete_record.gif" width="12" height="12" border="0" align="top" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.delete',1).'" /></a>';
// }
// ToDo: weird: quickDelete = true means that there is a confirmation message
// Todo: quickDelete=true is hardcoded
$quickDelete = true;
// "Delete" with confirmation (default)
if ($quickDelete and $table == 'pages' && $localCalcPerms & 4 || $table != 'pages' && $this->calcPerms & 16 && in_array('delRec', $shEl)) {
$params = '&cmd[tx_dam_cat][' . $row['uid'] . '][delete]=1';
$title = $row['title'] . ' (' . $row['file_name'] . ')';
$onClick = 'if (confirm(' . $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.delete'), $title)) . ')) {jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');} return false;';
$cells[] = '<a title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.delete', 1) . '" href="#" onclick="' . $onClick . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-delete') . '</a>';
}
// Todo: Quick delete. Works but without redirect back to the overview.
if (!$quickDelete and $table == 'pages' && $localCalcPerms & 4 || $table != 'pages' && $this->calcPerms & 16 && in_array('delRec', $shEl)) {
$cmd = 'tx_dam_cmd_filedelete';
$script = $BACK_PATH . PATH_txdam_rel . 'mod_cmd/index.php?CMD=' . $cmd . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&id=' . rawurlencode($row['uid']) . '&returnUrl=' . t3lib_div::getIndpEnv('TYPO3_REQUEST_URL');
$cells[] = '<a href="' . htmlspecialchars($script) . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/delete_record.gif', 'width="12" height="12"') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.delete', 1) . '" alt="" />' . '</a>';
}
}
}
// If the record is edit-locked by another user, we will show a little warning sign:
if ($lockInfo = t3lib_BEfunc::isRecordLocked($table, $row['uid'])) {
$cells[] = '<a href="#" onclick="' . htmlspecialchars('alert(' . $LANG->JScharCode($lockInfo['msg']) . ');return false;') . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/recordlock_warning3.gif', 'width="17" height="12"') . ' title="' . htmlspecialchars($lockInfo['msg']) . '" alt="" />' . '</a>';
}
// Compile items into a DIV-element:
return '
<!-- CONTROL PANEL: ' . $table . ':' . $row['uid'] . ' -->
<div class="typo3-DBctrl">' . implode('', $cells) . '</div>';
}
示例3: tt_content_drawHeader
/**
* Draw the header for a single tt_content element
*
* @param array Record array
* @param integer Amount of pixel space above the header.
* @param boolean If set the buttons for creating new elements and moving up and down are not shown.
* @param boolean If set, we are in language mode and flags will be shown for languages
* @return string HTML table with the record header.
*/
function tt_content_drawHeader($row, $space = 0, $disableMoveAndNewButtons = FALSE, $langMode = FALSE)
{
global $TCA;
// Load full table description:
t3lib_div::loadTCA('tt_content');
// Get record locking status:
if ($lockInfo = t3lib_BEfunc::isRecordLocked('tt_content', $row['uid'])) {
$lockIcon = '<a href="#" onclick="' . htmlspecialchars('alert(' . $GLOBALS['LANG']->JScharCode($lockInfo['msg']) . ');return false;') . '" title="' . htmlspecialchars($lockInfo['msg']) . '">' . t3lib_iconWorks::getSpriteIcon('status-warning-in-use') . '</a>';
} else {
$lockIcon = '';
}
// Call stats information hook
$stat = '';
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {
$_params = array('tt_content', $row['uid'], &$row);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef) {
$stat .= t3lib_div::callUserFunction($_funcRef, $_params, $this);
}
}
// Create line with type of content element and icon/lock-icon/title:
$ceType = $this->getIcon('tt_content', $row) . ' ' . $lockIcon . ' ' . $stat . ' ' . ($langMode ? $this->languageFlag($row['sys_language_uid']) : '') . ' ' . ' <strong>' . htmlspecialchars($this->CType_labels[$row['CType']]) . '</strong>';
// If show info is set...;
if ($this->tt_contentConfig['showInfo']) {
// Get processed values:
$info = array();
$this->getProcessedValue('tt_content', 'hidden,starttime,endtime,fe_group,spaceBefore,spaceAfter', $row, $info);
// Render control panel for the element:
if ($this->tt_contentConfig['showCommands'] && $this->doEdit) {
if (!$disableMoveAndNewButtons) {
// New content element:
if ($this->option_newWizard) {
$onClick = "window.location.href='db_new_content_el.php?id=" . $row['pid'] . '&sys_language_uid=' . $row['sys_language_uid'] . '&colPos=' . $row['colPos'] . '&uid_pid=' . -$row['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . "';";
} else {
$params = '&edit[tt_content][' . -$row['uid'] . ']=new';
$onClick = t3lib_BEfunc::editOnClick($params, $this->backPath);
}
$out .= '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $GLOBALS['LANG']->getLL('newAfter', 1) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-new') . '</a>';
}
// 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)) . '" title="' . htmlspecialchars($this->nextThree > 1 ? sprintf($GLOBALS['LANG']->getLL('nextThree'), $this->nextThree) : $GLOBALS['LANG']->getLL('edit')) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
// Hide element:
$hiddenField = $TCA['tt_content']['ctrl']['enablecolumns']['disabled'];
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)) . '" title="' . $GLOBALS['LANG']->getLL('unHide', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-unhide') . '</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)) . '" title="' . $GLOBALS['LANG']->getLL('hide', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-hide') . '</a>';
}
}
// 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 . ');') . '" title="' . $GLOBALS['LANG']->getLL('deleteItem', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-delete') . '</a>';
if (!$disableMoveAndNewButtons) {
$out .= '<span class="t3-page-ce-icons-move">';
// 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)) . '" title="' . $GLOBALS['LANG']->getLL('moveUp', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-move-up') . '</a>';
} else {
$out .= t3lib_iconWorks::getSpriteIcon('empty-empty');
}
// 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)) . '" title="' . $GLOBALS['LANG']->getLL('moveDown', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-move-down') . '</a>';
} else {
$out .= t3lib_iconWorks::getSpriteIcon('empty-empty');
}
$out .= '</span>';
}
}
// Display info from records fields:
$infoOutput = '';
if (count($info)) {
$infoOutput = '<div class="t3-page-ce-info">
' . implode('<br />', $info) . '
</div>';
}
}
// Wrap the whole header
// NOTE: end-tag for <div class="t3-page-ce-body"> is in getTable_tt_content()
return '<h4 class="t3-page-ce-header">
<div class="t3-row-header">
' . $out . '
</div>
</h4>
<div class="t3-page-ce-body">
//.........这里部分代码省略.........
示例4: getIcon
/**
* Returns the icon image tag.
* Additional attributes to the image tagcan be added.
*
* @param string $addAttribute Additional attributes
* @return string
*/
function getIcon($addAttribute = '')
{
global $TCA;
$uid = $this->itemInfo['_LOCALIZED_UID'] ? $this->itemInfo['_LOCALIZED_UID'] : $this->itemInfo['uid'];
if ($this->_lockInfo = t3lib_BEfunc::isRecordLocked($this->itemInfo['__table'], $uid)) {
$icon = '<img' . t3lib_iconWorks::skinImg($this->env['backPath'], 'gfx/recordlock_warning3.gif', 'width="17" height="12"') . ' title="' . htmlspecialchars($this->getDescription()) . '" alt="" />';
}
return $icon;
}
示例5: wrapIcon
/**
* Wrapping icon in browse tree
*
* @param string Icon IMG code
* @param array Data row for element.
* @return string Page icon
*/
function wrapIcon($thePageIcon, &$row)
{
// If the record is locked, present a warning sign.
if ($lockInfo = t3lib_BEfunc::isRecordLocked('pages', $row['uid'])) {
$aOnClick = 'alert(' . $GLOBALS['LANG']->JScharCode($lockInfo['msg']) . ');return false;';
$lockIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . t3lib_iconWorks::getSpriteIcon('status-warning-in-use', array('title' => htmlspecialchars($lockInfo['msg']))) . '</a>';
} else {
$lockIcon = '';
}
// Wrap icon in click-menu link.
if (!$this->ext_IconMode) {
$thePageIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($thePageIcon, 'pages', $row['uid'], 0, '&bank=' . $this->bank);
} elseif (!strcmp($this->ext_IconMode, 'titlelink')) {
$aOnClick = 'return jumpTo(\'' . $this->getJumpToParam($row) . '\',this,\'' . $this->treeName . '\');';
$thePageIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $thePageIcon . '</a>';
}
// Wrap icon in a drag/drop span.
$dragDropIcon = '<span class="dragIcon" id="dragIconID_' . $row['uid'] . '">' . $thePageIcon . '</span>';
// Add Page ID:
$pageIdStr = '';
if ($this->ext_showPageId) {
$pageIdStr = '<span class="dragId">[' . $row['uid'] . ']</span> ';
}
// Call stats information hook
$stat = '';
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {
$_params = array('pages', $row['uid']);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef) {
$stat .= t3lib_div::callUserFunction($_funcRef, $_params, $this);
}
}
return $dragDropIcon . $lockIcon . $pageIdStr . $stat;
}
示例6: renderQuickEdit
//.........这里部分代码省略.........
// 'new'
// Getting/Making the record:
reset($trData->regTableItems_data);
$rec = current($trData->regTableItems_data);
if ($uidVal == 'new') {
$new_unique_uid = uniqid('NEW');
$rec['uid'] = $new_unique_uid;
$rec['pid'] = intval($ex_pid) ? intval($ex_pid) : $this->id;
$recordAccess = TRUE;
} else {
$rec['uid'] = $uidVal;
// Checking internals access:
$recordAccess = $BE_USER->recordEditAccessInternals($this->eRParts[0], $uidVal);
}
if (!$recordAccess) {
// If no edit access, print error message:
$content .= $this->doc->section($LANG->getLL('noAccess'), $LANG->getLL('noAccess_msg') . '<br /><br />' . ($BE_USER->errorMsg ? 'Reason: ' . $BE_USER->errorMsg . '<br /><br />' : ''), 0, 1);
} elseif (is_array($rec)) {
// If the record is an array (which it will always be... :-)
// Create instance of TCEforms, setting defaults:
$tceforms = t3lib_div::makeInstance('t3lib_TCEforms');
$tceforms->backPath = $BACK_PATH;
$tceforms->initDefaultBEMode();
$tceforms->fieldOrder = $this->modTSconfig['properties']['tt_content.']['fieldOrder'];
$tceforms->palettesCollapsed = !$this->MOD_SETTINGS['showPalettes'];
$tceforms->disableRTE = $this->MOD_SETTINGS['disableRTE'];
$tceforms->enableClickMenu = TRUE;
// Clipboard is initialized:
$tceforms->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
// Start clipboard
$tceforms->clipObj->initializeClipboard();
// Initialize - reads the clipboard content from the user session
if ($BE_USER->uc['edit_showFieldHelp'] != 'text' && $this->MOD_SETTINGS['showDescriptions']) {
$tceforms->edit_showFieldHelp = 'text';
}
// Render form, wrap it:
$panel = '';
$panel .= $tceforms->getMainFields($this->eRParts[0], $rec);
$panel = $tceforms->wrapTotal($panel, $rec, $this->eRParts[0]);
// Add hidden fields:
$theCode = $panel;
if ($uidVal == 'new') {
$theCode .= '<input type="hidden" name="data[' . $this->eRParts[0] . '][' . $rec['uid'] . '][pid]" value="' . $rec['pid'] . '" />';
}
$theCode .= '
<input type="hidden" name="_serialNumber" value="' . md5(microtime()) . '" />
<input type="hidden" name="_disableRTE" value="' . $tceforms->disableRTE . '" />
<input type="hidden" name="edit_record" value="' . $edit_record . '" />
<input type="hidden" name="redirect" value="' . htmlspecialchars($uidVal == 'new' ? t3lib_extMgm::extRelPath('cms') . 'layout/db_layout.php?id=' . $this->id . '&new_unique_uid=' . $new_unique_uid . '&returnUrl=' . rawurlencode($this->returnUrl) : $this->R_URI) . '" />
' . t3lib_TCEforms::getHiddenTokenField('tceAction');
// Add JavaScript as needed around the form:
$theCode = $tceforms->printNeededJSFunctions_top() . $theCode . $tceforms->printNeededJSFunctions();
// Add warning sign if record was "locked":
if ($lockInfo = t3lib_BEfunc::isRecordLocked($this->eRParts[0], $rec['uid'])) {
$lockedMessage = t3lib_div::makeInstance('t3lib_FlashMessage', htmlspecialchars($lockInfo['msg']), '', t3lib_FlashMessage::WARNING);
t3lib_FlashMessageQueue::addMessage($lockedMessage);
}
// Add whole form as a document section:
$content .= $this->doc->section('', $theCode);
}
} else {
// If no edit access, print error message:
$content .= $this->doc->section($LANG->getLL('noAccess'), $LANG->getLL('noAccess_msg') . '<br /><br />', 0, 1);
}
// Bottom controls (function menus):
$q_count = $this->getNumberOfHiddenElements();
$h_func_b = t3lib_BEfunc::getFuncCheck($this->id, 'SET[tt_content_showHidden]', $this->MOD_SETTINGS['tt_content_showHidden'], 'db_layout.php', '', 'id="checkTt_content_showHidden"') . '<label for="checkTt_content_showHidden">' . (!$q_count ? $GLOBALS['TBE_TEMPLATE']->dfw($LANG->getLL('hiddenCE', 1)) : $LANG->getLL('hiddenCE', 1) . ' (' . $q_count . ')') . '</label>';
$h_func_b .= '<br />' . t3lib_BEfunc::getFuncCheck($this->id, 'SET[showPalettes]', $this->MOD_SETTINGS['showPalettes'], 'db_layout.php', '', 'id="checkShowPalettes"') . '<label for="checkShowPalettes">' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPalettes', 1) . '</label>';
if (t3lib_extMgm::isLoaded('context_help') && $BE_USER->uc['edit_showFieldHelp'] != 'text') {
$h_func_b .= '<br />' . t3lib_BEfunc::getFuncCheck($this->id, 'SET[showDescriptions]', $this->MOD_SETTINGS['showDescriptions'], 'db_layout.php', '', 'id="checkShowDescriptions"') . '<label for="checkShowDescriptions">' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showDescriptions', 1) . '</label>';
}
if ($BE_USER->isRTE()) {
$h_func_b .= '<br />' . t3lib_BEfunc::getFuncCheck($this->id, 'SET[disableRTE]', $this->MOD_SETTINGS['disableRTE'], 'db_layout.php', '', 'id="checkDisableRTE"') . '<label for="checkDisableRTE">' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.disableRTE', 1) . '</label>';
}
// Add the function menus to bottom:
$content .= $this->doc->section('', $h_func_b, 0, 0);
$content .= $this->doc->spacer(10);
// Select element matrix:
if ($this->eRParts[0] == 'tt_content' && t3lib_div::testInt($this->eRParts[1])) {
$posMap = t3lib_div::makeInstance('ext_posMap');
$posMap->backPath = $BACK_PATH;
$posMap->cur_sys_language = $this->current_sys_language;
$HTMLcode = '';
// CSH:
$HTMLcode .= t3lib_BEfunc::cshItem($this->descrTable, 'quickEdit_selElement', $BACK_PATH, '|<br />');
$HTMLcode .= $posMap->printContentElementColumns($this->id, $this->eRParts[1], $this->colPosList, $this->MOD_SETTINGS['tt_content_showHidden'], $this->R_URI);
$content .= $this->doc->spacer(20);
$content .= $this->doc->section($LANG->getLL('CEonThisPage'), $HTMLcode, 0, 1);
$content .= $this->doc->spacer(20);
}
// Finally, if comments were generated in TCEforms object, print these as a HTML comment:
if (count($tceforms->commentMessages)) {
$content .= '
<!-- TCEFORM messages
' . htmlspecialchars(implode(LF, $tceforms->commentMessages)) . '
-->
';
}
return $content;
}
示例7: makeEditForm
//.........这里部分代码省略.........
$hasAccess = $BE_USER->recordEditAccessInternals($table, $calcPRec);
$deniedAccessReason = $BE_USER->errorMsg;
}
} else {
$hasAccess = 0;
}
}
// AT THIS POINT we have checked the access status of the editing/creation of records and we can now proceed with creating the form elements:
//danielp: additional permission check:
// if user wants to edit/create page record but has no access to default language!
if ($table == 'pages' && !$BE_USER->checkLanguageAccess(0)) {
if (t3lib_extMgm::isLoaded('languagevisibility')) {
require_once t3lib_extMgm::extPath("languagevisibility") . 'class.tx_languagevisibility_beservices.php';
$visibilityservice = t3lib_div::makeInstance('tx_languagevisibility_beservices');
if (!$visibilityservice->hasUserAccessToPageRecord($theUid, $cmd)) {
$hasAccess = FALSE;
}
}
}
if ($hasAccess) {
$prevPageID = is_object($trData) ? $trData->prevPageID : '';
$trData = t3lib_div::makeInstance('t3lib_transferData');
$trData->addRawData = TRUE;
$trData->defVals = $this->defVals;
$trData->lockRecords = 1;
$trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
$trData->prevPageID = $prevPageID;
$trData->fetchRecord($table, $theUid, $cmd == 'new' ? 'new' : '');
// 'new'
reset($trData->regTableItems_data);
$rec = current($trData->regTableItems_data);
$rec['uid'] = $cmd == 'new' ? uniqid('NEW') : $theUid;
if ($cmd == 'new') {
$rec['pid'] = $theUid == 'prev' ? $thePrevUid : $theUid;
}
$this->elementsData[] = array('table' => $table, 'uid' => $rec['uid'], 'pid' => $rec['pid'], 'cmd' => $cmd, 'deleteAccess' => $deleteAccess);
// Now, render the form:
if (is_array($rec)) {
// Setting visual path / title of form:
$this->generalPathOfForm = $this->tceforms->getRecordPath($table, $rec);
if (!$this->storeTitle) {
$this->storeTitle = $this->recTitle ? htmlspecialchars($this->recTitle) : t3lib_BEfunc::getRecordTitle($table, $rec, TRUE);
}
// Setting variables in TCEforms object:
$this->tceforms->hiddenFieldList = '';
$this->tceforms->globalShowHelp = $this->disHelp ? 0 : 1;
if (is_array($this->overrideVals[$table])) {
$this->tceforms->hiddenFieldListArr = array_keys($this->overrideVals[$table]);
}
// Register default language labels, if any:
$this->tceforms->registerDefaultLanguageData($table, $rec);
// Create form for the record (either specific list of fields or the whole record):
$panel = '';
if ($this->columnsOnly) {
if (is_array($this->columnsOnly)) {
$panel .= $this->tceforms->getListedFields($table, $rec, $this->columnsOnly[$table]);
} else {
$panel .= $this->tceforms->getListedFields($table, $rec, $this->columnsOnly);
}
} else {
$panel .= $this->tceforms->getMainFields($table, $rec);
}
$panel = $this->tceforms->wrapTotal($panel, $rec, $table);
// Setting the pid value for new records:
if ($cmd == 'new') {
$panel .= '<input type="hidden" name="data[' . $table . '][' . $rec['uid'] . '][pid]" value="' . $rec['pid'] . '" />';
$this->newC++;
}
// Display "is-locked" message:
if ($lockInfo = t3lib_BEfunc::isRecordLocked($table, $rec['uid'])) {
$lockIcon = '
<!--
Warning box:
-->
<table border="0" cellpadding="0" cellspacing="0" class="warningbox">
<tr>
<td><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/recordlock_warning3.gif', 'width="17" height="12"') . ' alt="" /></td>
<td>' . htmlspecialchars($lockInfo['msg']) . '</td>
</tr>
</table>
';
} else {
$lockIcon = '';
}
// Combine it all:
$editForm .= $lockIcon . $panel;
}
$thePrevUid = $rec['uid'];
} else {
$this->errorC++;
$editForm .= $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.noEditPermission', 1) . '<br /><br />' . ($deniedAccessReason ? 'Reason: ' . htmlspecialchars($deniedAccessReason) . '<br/><br/>' : '');
}
}
}
}
}
}
return $editForm;
}
示例8: getNewNode
/**
* Creates a node with the given record information's
*
* @param array $record
* @return t3lib_tree_pagetree_Node
*/
public static function getNewNode($record, $mountPoint = 0)
{
$useNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
$addIdAsPrefix = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPageIdWithTitle');
$addDomainName = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showDomainNameWithTitle');
$titleLength = intval($GLOBALS['BE_USER']->uc['titleLen']);
/** @var $subNode t3lib_tree_pagetree_Node */
$subNode = t3lib_div::makeInstance('t3lib_tree_pagetree_Node');
$subNode->setRecord($record);
$subNode->setCls($record['_CSSCLASS']);
$subNode->setType('pages');
$subNode->setId($record['uid']);
$subNode->setMountPoint($mountPoint);
$subNode->setWorkspaceId($record['_ORIG_uid'] ? $record['_ORIG_uid'] : $record['uid']);
$field = 'title';
$text = $record['title'];
if ($useNavTitle && trim($record['nav_title']) !== '') {
$field = 'nav_title';
$text = $record['nav_title'];
}
if (trim($text) === '') {
$visibleText = '[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.no_title', TRUE) . ']';
} else {
$visibleText = $text;
}
$visibleText = t3lib_div::fixed_lgd_cs($visibleText, $titleLength);
$suffix = '';
if ($addDomainName) {
$domain = self::getDomainName($record['uid']);
$suffix = $domain !== '' ? ' [' . $domain . ']' : '';
}
$qtip = str_replace(' - ', '<br />', htmlspecialchars(t3lib_BEfunc::titleAttribForPages($record, '', FALSE)));
$prefix = '';
$lockInfo = t3lib_BEfunc::isRecordLocked('pages', $record['uid']);
if (is_array($lockInfo)) {
$qtip .= '<br />' . htmlspecialchars($lockInfo['msg']);
$prefix .= t3lib_iconWorks::getSpriteIcon('status-warning-in-use', array('class' => 'typo3-pagetree-status'));
}
$prefix .= htmlspecialchars($addIdAsPrefix ? '[' . $record['uid'] . '] ' : '');
$subNode->setEditableText($text);
$subNode->setText(htmlspecialchars($visibleText), $field, $prefix, htmlspecialchars($suffix));
$subNode->setQTip($qtip);
if ($record['uid'] !== 0) {
$spriteIconCode = t3lib_iconWorks::getSpriteIconForRecord('pages', $record);
} else {
$spriteIconCode = t3lib_iconWorks::getSpriteIcon('apps-pagetree-root');
}
$subNode->setSpriteIconCode($spriteIconCode);
if (!$subNode->canCreateNewPages() || intval($record['t3ver_state']) === 2) {
$subNode->setIsDropTarget(FALSE);
}
if (!$subNode->canBeEdited() || !$subNode->canBeRemoved() || intval($record['t3ver_state']) === 2) {
$subNode->setDraggable(FALSE);
}
return $subNode;
}
示例9: renderForeignRecordHeaderControl
/**
* Render the control-icons for a record header (create new, sorting, delete, disable/enable).
* Most of the parts are copy&paste from class.db_list_extra.inc and modified for the JavaScript calls here
*
* @param string $parentUid: The uid of the parent (embedding) record (uid or NEW...)
* @param string $foreign_table: The table (foreign_table) we create control-icons for
* @param array $rec: The current record of that foreign_table
* @param array $config: (modified) TCA configuration of the field
* @return string The HTML code with the control-icons
*/
function renderForeignRecordHeaderControl($parentUid, $foreign_table, $rec, $config = array(), $isVirtualRecord = false)
{
// Initialize:
$cells = array();
$isNewItem = substr($rec['uid'], 0, 3) == 'NEW';
$tcaTableCtrl =& $GLOBALS['TCA'][$foreign_table]['ctrl'];
$tcaTableCols =& $GLOBALS['TCA'][$foreign_table]['columns'];
$isPagesTable = $foreign_table == 'pages' ? true : false;
$isOnSymmetricSide = t3lib_loadDBGroup::isOnSymmetricSide($parentUid, $config, $rec);
$enableManualSorting = $tcaTableCtrl['sortby'] || $config['MM'] || !$isOnSymmetricSide && $config['foreign_sortby'] || $isOnSymmetricSide && $config['symmetric_sortby'] ? true : false;
$nameObject = $this->inlineNames['object'];
$nameObjectFt = $nameObject . self::Structure_Separator . $foreign_table;
$nameObjectFtId = $nameObjectFt . self::Structure_Separator . $rec['uid'];
$calcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::readPageAccess($rec['pid'], $GLOBALS['BE_USER']->getPagePermsClause(1)));
// If the listed table is 'pages' we have to request the permission settings for each page:
if ($isPagesTable) {
$localCalcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages', $rec['uid']));
}
// This expresses the edit permissions for this particular element:
$permsEdit = $isPagesTable && $localCalcPerms & 2 || !$isPagesTable && $calcPerms & 16;
// Controls: Defines which controls should be shown
$enabledControls = $config['appearance']['enabledControls'];
// Hook: Can disable/enable single controls for specific child records:
foreach ($this->hookObjects as $hookObj) {
$hookObj->renderForeignRecordHeaderControl_preProcess($parentUid, $foreign_table, $rec, $config, $isVirtual, $enabledControls);
}
// Icon to visualize that a required field is nested in this inline level:
$cells['required'] = '<img name="' . $nameObjectFtId . '_req" src="clear.gif" width="10" height="10" hspace="4" vspace="3" alt="" />';
if (isset($rec['__create'])) {
$cells['localize.isLocalizable'] = t3lib_iconWorks::getSpriteIcon('actions-edit-localize-status-low', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:localize.isLocalizable', TRUE)));
} elseif (isset($rec['__remove'])) {
$cells['localize.wasRemovedInOriginal'] = t3lib_iconWorks::getSpriteIcon('actions-edit-localize-status-high', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:localize.wasRemovedInOriginal', 1)));
}
// "Info": (All records)
if ($enabledControls['info'] && !$isNewItem) {
$cells['info'] = '<a href="#" onclick="' . htmlspecialchars('top.launchView(\'' . $foreign_table . '\', \'' . $rec['uid'] . '\'); return false;') . '">' . t3lib_iconWorks::getSpriteIcon('status-dialog-information', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:showInfo', TRUE))) . '</a>';
}
// If the table is NOT a read-only table, then show these links:
if (!$tcaTableCtrl['readOnly'] && !$isVirtualRecord) {
// "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 ($enabledControls['new'] && ($enableManualSorting || $tcaTableCtrl['useColumnsForDefaultValues'])) {
if (!$isPagesTable && $calcPerms & 16 || $isPagesTable && $calcPerms & 8) {
$onClick = "return inline.createNewRecord('" . $nameObjectFt . "','" . $rec['uid'] . "')";
$class = ' class="inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'] . '"';
if ($config['inline']['inlineNewButtonStyle']) {
$style = ' style="' . $config['inline']['inlineNewButtonStyle'] . '"';
}
$cells['new'] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '"' . $class . $style . '>' . t3lib_iconWorks::getSpriteIcon('actions-' . ($isPagesTable ? 'page' : 'document') . '-new', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:new' . ($isPagesTable ? 'Page' : 'Record'), 1))) . '</a>';
}
}
// Drag&Drop Sorting: Sortable handler for script.aculo.us
if ($enabledControls['dragdrop'] && $permsEdit && $enableManualSorting && $config['appearance']['useSortable']) {
$cells['dragdrop'] = t3lib_iconWorks::getSpriteIcon('actions-move-move', array('class' => 'sortableHandle', 'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.move', TRUE)));
}
// "Up/Down" links
if ($enabledControls['sort'] && $permsEdit && $enableManualSorting) {
$onClick = "return inline.changeSorting('" . $nameObjectFtId . "', '1')";
// Up
$style = $config['inline']['first'] == $rec['uid'] ? 'style="visibility: hidden;"' : '';
$cells['sort.up'] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '" class="sortingUp" ' . $style . '>' . t3lib_iconWorks::getSpriteIcon('actions-move-up', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:moveUp', TRUE))) . '</a>';
$onClick = "return inline.changeSorting('" . $nameObjectFtId . "', '-1')";
// Down
$style = $config['inline']['last'] == $rec['uid'] ? 'style="visibility: hidden;"' : '';
$cells['sort.down'] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '" class="sortingDown" ' . $style . '>' . t3lib_iconWorks::getSpriteIcon('actions-move-down', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:moveDown', TRUE))) . '</a>';
}
// "Hide/Unhide" links:
$hiddenField = $tcaTableCtrl['enablecolumns']['disabled'];
if ($enabledControls['hide'] && $permsEdit && $hiddenField && $tcaTableCols[$hiddenField] && (!$tcaTableCols[$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $foreign_table . ':' . $hiddenField))) {
$onClick = "return inline.enableDisableRecord('" . $nameObjectFtId . "')";
if ($rec[$hiddenField]) {
$cells['hide.unhide'] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-unhide', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:unHide' . ($isPagesTable ? 'Page' : ''), 1), 'id' => $nameObjectFtId . '_disabled')) . '</a>';
} else {
$cells['hide.hide'] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-hide', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:hide' . ($isPagesTable ? 'Page' : ''), 1), 'id' => $nameObjectFtId . '_disabled')) . '</a>';
}
}
// "Delete" link:
if ($enabledControls['delete'] && ($isPagesTable && $localCalcPerms & 4 || !$isPagesTable && $calcPerms & 16)) {
$onClick = "inline.deleteRecord('" . $nameObjectFtId . "');";
$cells['delete'] = '<a href="#" onclick="' . htmlspecialchars('if (confirm(' . $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('deleteWarning')) . ')) { ' . $onClick . ' } return false;') . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-delete', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:delete', TRUE))) . '</a>';
}
// If this is a virtual record offer a minimized set of icons for user interaction:
} elseif ($isVirtualRecord) {
if ($enabledControls['localize'] && isset($rec['__create'])) {
$onClick = "inline.synchronizeLocalizeRecords('" . $nameObjectFt . "', " . $rec['uid'] . ");";
$cells['localize'] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-localize', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:localize', TRUE))) . '</a>';
}
}
// If the record is edit-locked by another user, we will show a little warning sign:
if ($lockInfo = t3lib_BEfunc::isRecordLocked($foreign_table, $rec['uid'])) {
$cells['locked'] = '<a href="#" onclick="' . htmlspecialchars('alert(' . $GLOBALS['LANG']->JScharCode($lockInfo['msg']) . ');return false;') . '">' . t3lib_iconWorks::getSpriteIcon('status-warning-in-use', array('title' => htmlspecialchars($lockInfo['msg']))) . '</a>';
//.........这里部分代码省略.........