Index: typo3/sysext/t3skin/stylesheets/structure/module_web_list.css
===================================================================
--- typo3/sysext/t3skin/stylesheets/structure/module_web_list.css (revision 7908)
+++ typo3/sysext/t3skin/stylesheets/structure/module_web_list.css (working copy)
@@ -126,6 +126,7 @@
table#typo3-versionSelector {
margin-bottom: 5px;
margin-top: 5px;
+ padding: 5px;
}
table#typo3-versionSelector td {
Index: typo3/sysext/t3skin/stylesheets/visual/element_version.css
===================================================================
--- typo3/sysext/t3skin/stylesheets/visual/element_version.css (revision 7908)
+++ typo3/sysext/t3skin/stylesheets/visual/element_version.css (working copy)
@@ -10,9 +10,7 @@
table#typo3-versionSelector {
background-color: #ffec97;
- /*background-image: url('../../icons/gfx/alt_menu_mainitem_bg.gif');
- background-repeat: repeat-x;
- border: 1px solid #a2aab8;*/
+ border: 1px solid #a2aab8;
}
.ver-element,
Index: typo3/sysext/version/locallang.xml
===================================================================
--- typo3/sysext/version/locallang.xml (revision 7908)
+++ typo3/sysext/version/locallang.xml (working copy)
@@ -118,6 +118,14 @@
Errors:
Refresh
Allow preview of whole workspace
+ ID:
+ Workspace-Id:
+ LIVE
+ Versions of this page:
+ LIVE version
+ Publish page
+ Inside branch, no further versioning possible
+ Versions found on page, no "Page" versioning possible
\ No newline at end of file
Index: typo3/template.php
===================================================================
--- typo3/template.php (revision 7908)
+++ typo3/template.php (working copy)
@@ -1833,29 +1833,42 @@
// If more than one was found...:
if (count($versions)>1) {
+ $selectorLabel = '' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.label', TRUE) . ' ';
// Create selector box entries:
$opt = array();
foreach($versions as $vRow) {
- $opt[] = ''.
- htmlspecialchars($vRow['t3ver_label'].' [v#'.$vRow['t3ver_id'].', WS:'.$vRow['t3ver_wsid'].']'.($vRow['uid']==$onlineId ? ' =>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online').'<=':'')).
- ' ';
+ if ($vRow['uid'] == $onlineId) {
+ //Live version
+ $label = '[' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.live', TRUE) . ']';
+ } else {
+ $label = $vRow['t3ver_label'] . ' (' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionId', TRUE) . ' ' . $vRow['t3ver_id'] .
+ ($vRow['t3ver_wsid'] != 0 ? ' ' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspaceId', TRUE) . ' ' . $vRow['t3ver_wsid'] : '') . ')';
+ }
+
+ $opt[] = '' .
+ htmlspecialchars($label) . ' ';
}
// Add management link:
- $opt[] = '--- ';
- $opt[] = ''.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.mgm',1).' ';
-
+ $management = ' ';
// Create onchange handler:
$onChange = "window.location.href=this.options[this.selectedIndex].value;";
// Controls:
- if ($id==$onlineId) {
- $controls = ' backPath,'gfx/blinkarrow_left.gif','width="5" height="9"').' class="absmiddle" alt="" /> '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online',1).' ';
+ if ($id == $onlineId) {
+ $controls .= ' backPath, 'gfx/blinkarrow_left.gif','width="5" height="9"') .
+ ' class="absmiddle" alt="" /> ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online', TRUE) .
+ ' ';
} elseif (!$noAction) {
- $controls = ''.
- ' backPath,'gfx/insert1.gif','width="14" height="14"').' style="margin-right: 2px;" class="absmiddle" alt="" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swapPage',1).'" />'.
- ''.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swap',1).' ';
+ $controls .= '' . t3lib_iconWorks::getSpriteIcon('actions-version-swap-version', array(
+ 'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swapPage', TRUE),
+ 'style' => 'margin-left:5px;vertical-align:bottom;'
+ )) . '' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swap', TRUE) . ' ';
}
// Write out HTML code:
@@ -1866,32 +1879,33 @@
-->
- '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.selVer',1).'
+ ' . $selectorLabel . '
-
- '.implode('',$opt).'
+
+ ' . implode('', $opt) . '
- '.$controls.'
+ ' . $controls . '
+ ' . $management . '
';
}
- } elseif ($GLOBALS['BE_USER']->workspace!==0) {
+ } elseif ($GLOBALS['BE_USER']->workspace !== 0) {
// Write out HTML code:
- switch($GLOBALS['BE_USER']->workspace) {
+ switch($GLOBALS['BE_USER']->workspace) {
case 0:
- $wsTitle = 'LIVE';
+ $wsTitle = $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:live', TRUE);
break;
case -1:
- $wsTitle = 'Draft';
+ $wsTitle = $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:draft', TRUE);
break;
default:
$wsTitle = $GLOBALS['BE_USER']->workspaceRec['title'];
break;
}
- if (t3lib_BEfunc::isPidInVersionizedBranch($id)=='branchpoint') {
+ if (t3lib_BEfunc::isPidInVersionizedBranch($id) == 'branchpoint') {
return '
- Workspace: "'.htmlspecialchars($wsTitle).'"
- Inside branch, no further versioning possible
+ ' . $selectorLabel . '
+ Workspace: "' . htmlspecialchars($wsTitle) . '"
+ ' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.inBranch', TRUE) . '
';
} else {
// Get Current page record:
- $curPage = t3lib_BEfunc::getRecord('pages',$id);
+ $curPage = t3lib_BEfunc::getRecord('pages', $id);
// If the selected page is not online, find the right ID
$onlineId = ($curPage['pid']==-1 ? $curPage['t3ver_oid'] : $id);
// The version of page:
$verPage = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, 'pages', $onlineId);
- if (!$verPage) {
+ if (!$verPage) {
- if (!count(t3lib_BEfunc::countVersionsOfRecordsOnPage($GLOBALS['BE_USER']->workspace, $onlineId))) {
- if ($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(0)) {
+ if (!count(t3lib_BEfunc::countVersionsOfRecordsOnPage($GLOBALS['BE_USER']->workspace, $onlineId))) {
+ if ($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(0)) {
- $onClick = $this->issueCommand('&cmd[pages]['.$onlineId.'][version][action]=new&cmd[pages]['.$onlineId.'][version][treeLevels]=0',t3lib_div::linkThisScript(array('id'=>$onlineId)));
- $onClick = 'window.location.href=\''.$onClick.'\'; return false;';
+ $onClick = $this->issueCommand('&cmd[pages][' . $onlineId . '][version][action]=new&cmd[pages][' . $onlineId . '][version][treeLevels]=0',
+ t3lib_div::linkThisScript(array(
+ 'id' => $onlineId
+ )));
+ $onClick = 'window.location.href=\'' . $onClick . '\'; return false;';
// Write out HTML code:
return '
@@ -1927,14 +1945,16 @@
-->
';
}
- } elseif ($GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'] == FALSE && $GLOBALS['TYPO3_CONF_VARS']['BE']['newPagesVersioningType'] == 0) { // only add this info if old/deprecated newPagesVersioning is allowed
+ } elseif ($GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'] == FALSE && $GLOBALS['TYPO3_CONF_VARS']['BE']['newPagesVersioningType'] == 0) {
+ // only add this info if old/deprecated newPagesVersioning is allowed
return '
- Workspace: "'.htmlspecialchars($wsTitle).'"
- Versions found on page, no "Page" versioning possible
+ ' . $selectorLabel . '
+ ' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspace', TRUE) . ': "' . htmlspecialchars($wsTitle) . '"
+ ' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.versionsFound', TRUE) . '
';
}
} elseif ($verPage['t3ver_swapmode']==0) {
- $onClick = $this->issueCommand('&cmd[pages]['.$onlineId.'][version][action]=swap&cmd[pages]['.$onlineId.'][version][swapWith]='.$verPage['uid'],t3lib_div::linkThisScript(array('id'=>$onlineId)));
- $onClick = 'window.location.href=\''.$onClick.'\'; return false;';
+ $onClick = $this->issueCommand('&cmd[pages][' . $onlineId . '][version][action]=swap&cmd[pages][' .
+ $onlineId . '][version][swapWith]=' . $verPage['uid'],
+ t3lib_div::linkThisScript(array(
+ 'id' => $onlineId
+ )));
+ $onClick = 'window.location.href=\'' . $onClick . '\'; return false;';
// Write out HTML code:
return '
@@ -1960,9 +1985,11 @@
-->
';