/** * Returns the rendered record actions * * @param string $table * @param integer $uid * @return string */ protected function getRecordActions($table, $uid) { if ($table === '' || $uid < 0) { return ''; } $editOnClick = BackendUtility::editOnClick('&edit[' . $table . '][' . $uid . ']=edit', $GLOBALS['BACK_PATH']); $icon = IconUtility::getSpriteIcon('actions-document-open'); $pageActionIcons = '<a href="#" onclick="' . htmlspecialchars($editOnClick) . '">' . $icon . '</a>'; $historyOnClick = 'window.location.href=' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('record_history', array('element' => $table . ':' . $uid, 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')))) . '; return false;'; $icon = IconUtility::getSpriteIcon('actions-document-history-open'); $pageActionIcons .= '<a href="#" onclick="' . htmlspecialchars($historyOnClick) . '">' . $icon . '</a>'; if ($table === 'pages') { $pageActionIcons .= $this->doc->viewPageIcon($uid, ''); } return $pageActionIcons; }
/** * Returns the rendered record actions * * @param string $table * @param integer $uid * @return string */ protected function getRecordActions($table, $uid) { if ($table === '' || $uid < 0) { return ''; } $editOnClick = \TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick('&edit[' . $table . '][' . $uid . ']=edit', $GLOBALS['BACK_PATH']); $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open'); $pageActionIcons = '<a href="#" onclick="' . htmlspecialchars($editOnClick) . '">' . $icon . '</a>'; $historyOnClick = 'window.location.href=\'show_rechis.php?element=' . $table . '%3A' . $uid . '&returnUrl=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI')) . '\'; return false;'; $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-history-open'); $pageActionIcons .= '<a href="#" onclick="' . $historyOnClick . '">' . $icon . '</a>'; if ($table === 'pages') { $pageActionIcons .= $this->doc->viewPageIcon($uid, ''); } return $pageActionIcons; }