34 $this->view->assign(
'showGrid', !(
$GLOBALS[
'BE_USER']->workspace === 0 && !
$GLOBALS[
'BE_USER']->isAdmin()));
35 $this->view->assign(
'showAllWorkspaceTab', TRUE);
37 $this->view->assign(
'showLegend', !(
$GLOBALS[
'BE_USER']->workspace === 0 && !
$GLOBALS[
'BE_USER']->isAdmin()));
38 $wsList = $wsService->getAvailableWorkspaces();
39 $activeWorkspace =
$GLOBALS[
'BE_USER']->workspace;
40 $performWorkspaceSwitch = FALSE;
44 if (!
$GLOBALS[
'BE_USER']->isAdmin()) {
45 $wsCur = array($activeWorkspace => TRUE);
46 $wsList = array_intersect_key($wsList, $wsCur);
50 if (in_array($switchWs, array_keys($wsList)) && $activeWorkspace != $switchWs) {
51 $activeWorkspace = $switchWs;
52 $GLOBALS[
'BE_USER']->setWorkspace($activeWorkspace);
53 $performWorkspaceSwitch = TRUE;
55 } elseif ($switchWs == \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES) {
60 $this->pageRenderer->addInlineSetting(
'Workspaces',
'isLiveWorkspace', (
int)
$GLOBALS[
'BE_USER']->workspace === 0 ? TRUE : FALSE);
61 $this->pageRenderer->addInlineSetting(
'Workspaces',
'workspaceTabs', $this->
prepareWorkspaceTabs($wsList, $activeWorkspace));
62 $this->pageRenderer->addInlineSetting(
'Workspaces',
'activeWorkspaceId', $activeWorkspace);
63 $this->pageRenderer->addInlineSetting(
'Workspaces',
'PATH_typo3',
GeneralUtility::getIndpEnv(
'TYPO3_SITE_PATH') . TYPO3_mainDir);
64 $this->view->assign(
'performWorkspaceSwitch', $performWorkspaceSwitch);
65 $this->view->assign(
'workspaceList', $wsList);
66 $this->view->assign(
'activeWorkspaceUid', $activeWorkspace);
67 $this->view->assign(
'activeWorkspaceTitle', \
TYPO3\CMS\Workspaces\Service\WorkspaceService::getWorkspaceTitle($activeWorkspace));
68 $this->view->assign(
'showPreviewLink', $wsService->canCreatePreviewLink(
GeneralUtility::_GP(
'id'), $activeWorkspace));
69 $GLOBALS[
'BE_USER']->setAndSaveSessionData(
'tx_workspace_activeWorkspace', $activeWorkspace);
80 $wsList = $wsService->getAvailableWorkspaces();
82 if (!
$GLOBALS[
'BE_USER']->isAdmin()) {
83 $activeWorkspace =
$GLOBALS[
'BE_USER']->workspace;
84 $wsCur = array($activeWorkspace => TRUE);
85 $wsList = array_intersect_key($wsList, $wsCur);
88 $this->pageRenderer->addInlineSetting(
'Workspaces',
'workspaceTabs', $this->
prepareWorkspaceTabs($wsList, \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES));
89 $this->pageRenderer->addInlineSetting(
'Workspaces',
'activeWorkspaceId', \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES);
90 $this->pageRenderer->addInlineSetting(
'Workspaces',
'PATH_typo3',
GeneralUtility::getIndpEnv(
'TYPO3_SITE_PATH') . TYPO3_mainDir);
92 $this->view->assign(
'showGrid', TRUE);
93 $this->view->assign(
'showLegend', TRUE);
94 $this->view->assign(
'showAllWorkspaceTab', TRUE);
95 $this->view->assign(
'workspaceList', $wsList);
96 $this->view->assign(
'activeWorkspaceUid', \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES);
97 $this->view->assign(
'showPreviewLink', FALSE);
98 $GLOBALS[
'BE_USER']->setAndSaveSessionData(
'tx_workspace_activeWorkspace', \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES);
100 $this->pageRenderer->addInlineSetting(
'Workspaces',
'allView',
'1');
111 $wsList = $wsService->getAvailableWorkspaces();
112 $activeWorkspace =
$GLOBALS[
'BE_USER']->workspace;
113 $wsCur = array($activeWorkspace => TRUE);
114 $wsList = array_intersect_key($wsList, $wsCur);
117 $this->view->assign(
'showGrid', TRUE);
118 $this->view->assign(
'showAllWorkspaceTab', FALSE);
119 $this->view->assign(
'workspaceList', $wsList);
120 $this->view->assign(
'backendDomain', $backendDomain);
124 $this->pageRenderer->addJsInlineCode(
128 $this->pageRenderer->addInlineSetting(
'Workspaces',
'singleView',
'1');
137 parent::initializeAction();
138 $this->
template->setExtDirectStateProvider();
139 if (\
TYPO3\CMS\Workspaces\Service\WorkspaceService::isOldStyleWorkspaceUsed()) {
140 $flashMessage =
GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
$GLOBALS[
'LANG']->sL(
'LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:warning.oldStyleWorkspaceInUser'),
'', \
TYPO3\CMS\Core\Messaging\FlashMessage::WARNING);
144 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
145 $defaultFlashMessageQueue->enqueue($flashMessage);
147 $this->pageRenderer->loadExtJS();
148 $this->pageRenderer->enableExtJSQuickTips();
149 $states =
$GLOBALS[
'BE_USER']->uc[
'moduleData'][
'Workspaces'][
'States'];
150 $this->pageRenderer->addInlineSetting(
'Workspaces',
'States', $states);
152 $this->pageRenderer->addExtDirectCode(array(
155 $this->pageRenderer->addJsFile($this->backPath .
'sysext/backend/Resources/Public/JavaScript/flashmessages.js');
156 $this->pageRenderer->addJsFile($this->backPath .
'js/extjs/ux/Ext.grid.RowExpander.js');
157 $this->pageRenderer->addJsFile($this->backPath .
'js/extjs/ux/Ext.app.SearchField.js');
158 $this->pageRenderer->addJsFile($this->backPath .
'js/extjs/ux/Ext.ux.FitToParent.js');
162 $this->pageRenderer->addCssFile($resourcePath .
'gridfilters/css/GridFilters.css');
163 $this->pageRenderer->addCssFile($resourcePath .
'gridfilters/css/RangeMenu.css');
166 $resourcePath.
'gridfilters/menu/RangeMenu.js',
167 $resourcePath.
'gridfilters/menu/ListMenu.js',
168 $resourcePath .
'gridfilters/GridFilters.js',
169 $resourcePath .
'gridfilters/filter/Filter.js',
170 $resourcePath .
'gridfilters/filter/StringFilter.js',
171 $resourcePath .
'gridfilters/filter/DateFilter.js',
172 $resourcePath .
'gridfilters/filter/ListFilter.js',
173 $resourcePath .
'gridfilters/filter/NumericFilter.js',
174 $resourcePath .
'gridfilters/filter/BooleanFilter.js',
175 $resourcePath .
'gridfilters/filter/BooleanFilter.js',
181 $resourcePath .
'Component/RowDetailTemplate.js',
182 $resourcePath .
'Component/RowExpander.js',
183 $resourcePath .
'Component/TabPanel.js',
184 $resourcePath .
'Store/mainstore.js',
185 $resourcePath .
'configuration.js',
186 $resourcePath .
'helpers.js',
187 $resourcePath .
'actions.js',
188 $resourcePath .
'component.js',
189 $resourcePath .
'toolbar.js',
190 $resourcePath .
'grid.js',
191 $resourcePath .
'workspaces.js' 194 $javaScriptFiles = array_merge($filters, $custom, $resources);
196 foreach ($javaScriptFiles as $javaScriptFile) {
197 $this->pageRenderer->addJsFile($javaScriptFile);
212 if ($activeWorkspace !== \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES) {
214 'title' => $workspaceList[$activeWorkspace],
215 'itemId' =>
'workspace-' . $activeWorkspace,
216 'workspaceId' => $activeWorkspace,
222 'title' =>
'All workspaces',
223 'itemId' =>
'workspace-' . \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES,
224 'workspaceId' => \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES,
225 'triggerUrl' => $this->
getModuleUri(\
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES),
228 foreach ($workspaceList as $workspaceId => $workspaceTitle) {
229 if ($workspaceId === $activeWorkspace) {
233 'title' => $workspaceTitle,
234 'itemId' =>
'workspace-' . $workspaceId,
235 'workspaceId' => $workspaceId,
251 'id' => (
int)$this->pageId,
252 'workspace' => (
int)$workspaceId,
256 if ($workspaceId === \
TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES) {
257 $this->uriBuilder->reset()->uriFor(
'fullIndex');
260 return \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl(
'web_WorkspacesWorkspaces',
$parameters);
static quoteJSvalue($value)
getModuleUri($workspaceId)
getAdditionalResourceService()
static getIndpEnv($getEnvName)
prepareWorkspaceTabs(array $workspaceList, $activeWorkspace)
static makeInstance($className)
static getModuleUrl($moduleName, $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
redirect($actionName, $controllerName=NULL, $extensionName=NULL, array $arguments=NULL, $pageUid=NULL, $delay=0, $statusCode=303)
static setUpdateSignal($set='', $params='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]