2 namespace TYPO3\CMS\Version\View;
37 public function getVersionSelector($id, $noAction =
false)
42 if (
$GLOBALS[
'BE_USER']->workspace == 0) {
46 $onlineId = $curPage[
'pid'] == -1 ? $curPage[
't3ver_oid'] : $id;
50 if (count($versions) > 1) {
53 foreach ($versions as $vRow) {
54 if ($vRow[
'uid'] == $onlineId) {
56 $label =
'[' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:version/Resources/Private/Language/locallang.xlf:versionSelect.live',
true) .
']';
58 $label = $vRow[
't3ver_label'] .
' (' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:version/Resources/Private/Language/locallang.xlf:versionId',
true) .
' ' . $vRow[
't3ver_id'] . ($vRow[
't3ver_wsid'] != 0 ?
' ' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:version/Resources/Private/Language/locallang.xlf:workspaceId',
true) .
' ' . $vRow[
't3ver_wsid'] :
'') .
')';
60 $opt[] =
'<option value="' . htmlspecialchars(
GeneralUtility::linkThisScript(array(
'id' => $vRow[
'uid']))) .
'"' . ($id == $vRow[
'uid'] ?
' selected="selected"' :
'') .
'>' . htmlspecialchars($label) .
'</option>';
66 <a class="btn btn-default" href="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl(
'web_txversionM1', array(
'table' =>
'pages',
'uid' => $onlineId))) .
'">
67 ' . $iconFactory->getIcon(
'actions-version-page-open',
Icon::SIZE_SMALL)->render() .
'
68 ' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:ver.mgm',
true) .
'
71 $onChange =
'window.location.href=this.options[this.selectedIndex].value;';
73 if ($id == $onlineId) {
74 $controls =
'<strong class="text-success">' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:ver.online',
true) .
'</strong>';
77 '&cmd[pages][' . $onlineId .
'][version][swapWith]=' . $id .
'&cmd[pages][' . $onlineId .
'][version][action]=swap',
81 <a href="' . htmlspecialchars($href) .
'" class="btn btn-default" title="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:ver.swapPage',
true) .
'">
82 ' . $iconFactory->getIcon(
'actions-version-swap-version',
Icon::SIZE_SMALL)->render() .
'
83 ' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:ver.swap',
true) .
'
91 <div id="typo3-version-selector" class="form-inline form-inline-spaced">
92 <div class="form-group">
93 <label for="version-selector">' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:version/Resources/Private/Language/locallang.xlf:versionSelect.label',
true) .
'</label>
94 <select id="version-selector" class="form-control" onchange="' . htmlspecialchars($onChange) .
'">
95 ' . implode(
'', $opt) .
'
98 <div class="form-group">
101 <div class="form-group">