Esempio n. 1
0
 public function boot()
 {
     Workspaces::registerWorkspace('user', 'User workspace', 'cantiga_home_page', 'ROLE_USER', 'green');
     Workspaces::registerWorkspace('area', 'Area workspace', 'area_dashboard', 'ROLE_AREA_AWARE', 'purple', Workspaces::HIDDEN);
     Workspaces::registerWorkspace('group', 'Group workspace', 'group_dashboard', 'ROLE_GROUP_AWARE', 'black', Workspaces::HIDDEN);
     Workspaces::registerWorkspace('project', 'Project workspace', 'project_dashboard', 'ROLE_PROJECT_AWARE', 'blue', Workspaces::HIDDEN);
     Workspaces::registerWorkspace('admin', 'Admin workspace', 'admin_dashboard', 'ROLE_ADMIN', 'red');
     AppTexts::registerName(CoreTexts::AREA_REQUEST_CREATION_STEP1_TEXT);
     AppTexts::registerName(CoreTexts::AREA_REQUEST_NEW_INFO_TEXT);
     AppTexts::registerName(CoreTexts::AREA_REQUEST_VERIFICATION_INFO_TEXT);
     AppTexts::registerName(CoreTexts::AREA_REQUEST_APPROVED_INFO_TEXT);
     AppTexts::registerName(CoreTexts::AREA_REQUEST_REVOKED_INFO_TEXT);
     AppTexts::registerName(CoreTexts::AREA_REQUEST_CREATION_STEP2_TEXT);
     AppTexts::registerName(CoreTexts::TERMS_OF_USE_TEXT);
     AppTexts::registerName(CoreTexts::LOGIN_TEXT);
     AppTexts::registerName(CoreTexts::DASHBOARD_ADMIN_TEXT);
     AppTexts::registerName(CoreTexts::DASHBOARD_USER_TEXT);
     AppTexts::registerName(CoreTexts::DASHBOARD_PROJECT_TEXT);
     AppTexts::registerName(CoreTexts::DASHBOARD_GROUP_TEXT);
     AppTexts::registerName(CoreTexts::DASHBOARD_AREA_TEXT);
     AppTexts::registerName(CoreTexts::AREA_PROFILE_EDITOR_TEXT);
     AppTexts::registerName(CoreTexts::HELP_INTRODUCTION);
     AppTexts::registerName(CoreTexts::HELP_PROFILE);
     AppTexts::registerName(CoreTexts::HELP_REQUEST_AREAS);
     AppTexts::registerName(CoreTexts::HELP_INVITATIONS);
     AppTexts::registerName(CoreTexts::HELP_ADMIN_MANAGING);
     AppTexts::registerName(CoreTexts::HELP_PROJECT_INTRODUCTION);
     AppTexts::registerName(CoreTexts::HELP_PROJECT_MEMBERS);
     AppTexts::registerName(CoreTexts::HELP_GROUP_INTRODUCTION);
     AppTexts::registerName(CoreTexts::HELP_GROUP_MEMBERS);
     AppTexts::registerName(CoreTexts::HELP_AREA_INTRODUCTION);
     AppTexts::registerName(CoreTexts::HELP_AREA_MEMBERS);
     AppMails::registerName(CoreTexts::CREDENTIAL_CHANGE_MAIL);
     AppMails::registerName(CoreTexts::PASSWORD_RECOVERY_COMPLETED_MAIL);
     AppMails::registerName(CoreTexts::PASSWORD_RECOVERY_MAIL);
     AppMails::registerName(CoreTexts::USER_REGISTRATION_MAIL);
     AppMails::registerName(CoreTexts::INVITATION_MEMBER_MAIL);
     AppMails::registerName(CoreTexts::INVITATION_ANONYMOUS_MAIL);
     AppMails::registerName(CoreTexts::AREA_REQUEST_CREATED_MAIL);
     AppMails::registerName(CoreTexts::AREA_REQUEST_VERIFICATION_MAIL);
     AppMails::registerName(CoreTexts::AREA_REQUEST_APPROVED_MAIL);
     AppMails::registerName(CoreTexts::AREA_REQUEST_REVOKED_MAIL);
 }
Esempio n. 2
0
 public function showWorkspaces(ShowWorkspacesEvent $event)
 {
     $event->setWorkspaces(Workspaces::fetchByRole($this->authChecker));
     $event->setActive(Workspaces::get($this->workspaceSource->getWorkspace()->getKey()));
 }
Esempio n. 3
0
 public function showMenuAction()
 {
     $workspace = $this->workspaceSource->getWorkspace();
     if (null === $workspace) {
         return '';
     }
     $event = new WorkspaceEvent($workspace);
     $this->dispatcher->dispatch($workspace->getWorkspaceEvent(), $event);
     $this->dispatcher->dispatch(CantigaEvents::WORKSPACE_GENERAL, $event);
     return $this->tpl->render('CantigaCoreBundle:Components:workspace-menu.html.twig', array('workspace' => $workspace, 'workspaceInfo' => Workspaces::get($workspace->getKey()), 'currentWorkgroup' => $event->getCurrentWorkgroup(), 'currentPage' => $event->getCurrentPage()));
 }
Esempio n. 4
0
 public function workspaceSkin()
 {
     $workspace = $this->workspaceSource->getWorkspace();
     if (null !== $workspace) {
         $workspaceInfo = Workspaces::get($workspace->getKey());
         return !empty($workspaceInfo['skin']) ? $workspaceInfo['skin'] : 'blue';
     }
     return 'blue';
 }