Added a checkbox with the previewlink button in Web>Version module so that whole...
authorKasper Skårhøj <kasper@typo3.org>
Sat, 31 Jan 2009 13:25:02 +0000 (13:25 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Sat, 31 Jan 2009 13:25:02 +0000 (13:25 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4903 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/version/cm1/index.php

index 5128186..45e168d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-01-31     Kasper Sk\8crh¿j  <kasper@typo3.org>
 
+       * Added a checkbox with the previewlink button in Web>Version module so that whole workspace can be browser (but starting out with a specific page).
+
+2009-01-31     Kasper Sk\8crh¿j  <kasper@typo3.org>
+
        * Added a hook for processing external links made through typolink and makelinks.
 
 2009-01-31     Kasper Sk\8crh¿j  <kasper@typo3.org>
index 4c1da8d..f488304 100755 (executable)
@@ -704,9 +704,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                                $actionLinks.= $this->doc->icons(1).'You are not permitted to publish from this workspace';
                        }
                }
-               $actionLinks.= '<input type="submit" name="_" value="Refresh" />';
-               $actionLinks.= '<input type="submit" name="_previewLink" value="Preview Link" />';
-               $actionLinks.= $this->displayWorkspaceOverview_allStageCmd();
+               $actionLinks.= '<input type="submit" name="_" value="Refresh" /><br/>';
+               $actionLinks.= '<input type="submit" name="_previewLink" value="Preview Link" />  <input type="checkbox" name="_previewLink_wholeWorkspace" value="1" /> Allow preview of whole workspace';
+               $actionLinks.= '<br/>'.$this->displayWorkspaceOverview_allStageCmd();
 
                if ($actionLinks || count($errors))     {
                        $this->content.= $this->doc->section('',$actionLinks.(count($errors) ? '<h3>Errors:</h3><br/>'.implode('<br/>',$errors).'<hr/>' : ''),0,1);
@@ -716,9 +716,12 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
                        $ttlHours = ($ttlHours ? $ttlHours : 24*2);
 
-                       $params = 'id='.$this->id.'&ADMCMD_previewWS='.$GLOBALS['BE_USER']->workspace;
-                       $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours);
-
+                       if (t3lib_div::_POST('_previewLink_wholeWorkspace'))    {
+                               $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours,$GLOBALS['BE_USER']->workspace).'&id='.intval($this->id);
+                       } else {
+                               $params = 'id='.$this->id.'&ADMCMD_previewWS='.$GLOBALS['BE_USER']->workspace;
+                               $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours);
+                       }
                        $this->content.= $this->doc->section('Preview Url:','You can preview this page from the workspace using this link for the next '.$ttlHours.' hours (does not require backend login):<br/><br/><a target="_blank" href="'.htmlspecialchars($previewUrl).'">'.$previewUrl.'</a>',0,1);
                }