Bug #10831 » 10831.patch
Classes/Controller/PreviewController.php (working copy) | ||
---|---|---|
// @todo - handle new pages here
|
||
// branchpoints are not handled anymore because this feature is not supposed anymore
|
||
$this->view->assign('liveUrl', $wsBaseUrl . '&ADMCMD_noBeUser=1');
|
||
if (tx_Workspaces_Service_Workspaces::isNewPage($this->pageId)) {
|
||
$wsNewPageUri = $uriBuilder->uriFor('newPage', array(), $this, 'workspaces', 'web_workspacesworkspaces');
|
||
$wsNewPageParams = '&tx_workspaces_web_workspacesworkspaces[controller]=Preview';
|
||
$this->view->assign('liveUrl', $wsSettingsPath . $wsNewPageUri . $wsNewPageParams);
|
||
} else {
|
||
$this->view->assign('liveUrl', $wsBaseUrl . '&ADMCMD_noBeUser=1');
|
||
}
|
||
$this->view->assign('wsUrl', $wsBaseUrl . '&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS=' . $GLOBALS['BE_USER']->workspace);
|
||
$this->view->assign('wsSettingsUrl', $wsSettingsUrl);
|
||
$this->view->assign('wsHelpUrl', $wsHelpUrl);
|
||
... | ... | |
}
|
||
/**
|
||
* @return void
|
||
*/
|
||
public function newPageAction() {
|
||
$message = t3lib_div::makeInstance(
|
||
't3lib_FlashMessage',
|
||
$GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:info.newpage.detail'),
|
||
$GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:info.newpage'),
|
||
t3lib_FlashMessage::INFO
|
||
);
|
||
t3lib_FlashMessageQueue::addMessage($message);
|
||
}
|
||
/**
|
||
* Generates the JavaScript code for the backend,
|
||
* and since we're loading a backend module outside of the actual backend
|
||
* this copies parts of the backend.php
|
Classes/Service/Workspaces.php (working copy) | ||
---|---|---|
}
|
||
return $oldStyleWorkspaceIsUsed;
|
||
}
|
||
/**
|
||
* Determine whether a specific page is new and not yet available in the LIVE workspace
|
||
*
|
||
* @static
|
||
* @param $id
|
||
* @return bool
|
||
*/
|
||
public static function isNewPage($id) {
|
||
$isNewPage = FALSE;
|
||
$rec = t3lib_BEfunc::getRecord('pages', $id, 't3ver_state');
|
||
if (is_array($rec)) {
|
||
$isNewPage = (int) $rec['t3ver_state']===1;
|
||
}
|
||
return $isNewPage;
|
||
}
|
||
}
|
||
ext_tables.php (working copy) | ||
---|---|---|
array(
|
||
// An array holding the controller-action-combinations that are accessible
|
||
'Review' => 'index,fullIndex,singleIndex',
|
||
'Preview' => 'index,help'
|
||
'Preview' => 'index,help,newPage'
|
||
),
|
||
array(
|
||
'access' => 'user,group',
|
Resources/Private/Language/locallang.xml (working copy) | ||
---|---|---|
<label index="window.sendToNextStageWindow.comments">Comments</label>
|
||
<label index="error.getStageTitle.stageNotFound">Stage not found</label>
|
||
<label index="warning.oldStyleWorkspaceInUser">It seems that you're stil using old-style workspace. If you continue using this module without migrating your workspace you might loose data.</label>
|
||
<label index="info.newpage">New Page!</label>
|
||
<label index="info.newpage.detail">The previewed page is created in the workspace and has no counterpart in the live workspace.</label>
|
||
</languageKey>
|
||
</data>
|
||
</T3locallang>
|
Resources/Private/Layouts/nodoc.html (working copy) | ||
---|---|---|
<!-- ###FULLDOC### begin -->
|
||
{namespace this=Tx_Workspaces_ViewHelpers}
|
||
<div class="typo3-noDoc">
|
||
<!-- Content of module, for instance listing, info or editing -->
|
||
<div id="typo3-docbody">
|
||
<div id="typo3-inner-docbody">
|
||
<this:TempFlashMessageQueue />
|
||
<f:render section="main"/>
|
||
</div>
|
||
</div>
|
Resources/Private/Templates/Preview/NewPage.html (revision 0) | ||
---|---|---|
<f:layout name="nodoc" />
|
||
<f:section name="main"></f:section>
|