Index: typo3/alt_clickmenu.php
===================================================================
--- typo3/alt_clickmenu.php (revision 7638)
+++ typo3/alt_clickmenu.php (working copy)
@@ -280,11 +280,14 @@
$lCP = $BE_USER->calcPerms(t3lib_BEfunc::getRecord('pages',($table=='pages'?$this->rec['uid']:$this->rec['pid'])));
// View
- if (!in_array('view',$this->disabledItems)) {
- if ($table=='pages') $menuItems['view']=$this->DB_view($uid);
- if ($table==$GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']) {
+ if (!in_array('view', $this->disabledItems)) {
+ if ($table=='pages') {
+ $workspaceId = (isset($this->rec['_ORIG_uid'])) ? $this->rec['_ORIG_uid'] : $uid;
+ $menuItems['view'] = $this->DB_view($workspaceId);
+ }
+ if ($table == $GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']) {
$ws_rec = t3lib_BEfunc::getRecordWSOL($table, $this->rec['uid']);
- $menuItems['view']=$this->DB_view($ws_rec['pid']);
+ $menuItems['view'] = $this->DB_view($ws_rec['pid']);
}
}
Index: typo3/sysext/cms/layout/db_layout.php
===================================================================
--- typo3/sysext/cms/layout/db_layout.php (revision 7638)
+++ typo3/sysext/cms/layout/db_layout.php (working copy)
@@ -1180,7 +1180,8 @@
);
// View page
- $buttons['view'] = '' .
+ $previewId = (isset($this->pageinfo['_ORIG_uid'])) ? $this->pageinfo['_ORIG_uid'] : $this->pageinfo['uid'];
+ $buttons['view'] = '' .
'' .
'';
Index: typo3/sysext/viewpage/view/index.php
===================================================================
--- typo3/sysext/viewpage/view/index.php (revision 7638)
+++ typo3/sysext/viewpage/view/index.php (working copy)
@@ -105,6 +105,10 @@
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
$addCmd='';
+
+ // Workspace overlay
+ $this->id = (isset($this->pageinfo['_ORIG_uid'])) ? $this->pageinfo['_ORIG_uid'] : $this->id;
+
if ($this->id && $access) {
$addCmd = '&ADMCMD_view=1&ADMCMD_editIcons=1'.t3lib_BEfunc::ADMCMD_previewCmds($this->pageinfo);
}