public function actionRunDiagnostic()
 {
     $breadCrumbLinks = array(Zurmo::t('ZurmoModule', 'Developer Tools') => array('/zurmo/development'), Zurmo::t('InstallModule', 'System Diagnostics'));
     $serviceCheckResultsDataForDisplay = CheckServicesUtil::checkServicesAfterInstallationAndGetResultsDataForDisplay();
     $checkServicesView = new DiagnosticCheckServicesView($this->getId(), $this->getModule()->getId(), $serviceCheckResultsDataForDisplay);
     $view = new ConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $checkServicesView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
 }
Пример #2
0
 public function actionConfigurationList()
 {
     $redirectUrlParams = array('/zurmo/' . $this->getId() . '/ConfigurationList');
     $messageBoxContent = Zurmo::t('ZurmoModule', 'Don\'t see a language that you want to load? Help us make Zurmo better by contributing on a translation. Click <a href="{l10nServerDomain}" class="simple-link normal-size" target="_blank">here</a>.', array('{l10nServerDomain}' => ZurmoTranslationServerUtil::getServerDomain()));
     $view = new LanguageTitleBarConfigurationListView($this->getId(), $this->getModule()->getId(), $messageBoxContent);
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $view));
     echo $view->render();
 }
 public function actionConfigurationList()
 {
     $breadCrumbLinks = array(Zurmo::t('Core', 'Languages'));
     $messageBoxContent = Zurmo::t('ZurmoModule', 'Don\'t see a language that you want to load? ' . 'Help us make Zurmo better by contributing on a translation. ' . 'Click <a href="{l10nServerDomain}" class="simple-link normal-size" target="_blank">here</a>.', array('{l10nServerDomain}' => ZurmoTranslationServerUtil::getServerDomain()));
     $view = new LanguageTitleBarConfigurationListView($this->getId(), $this->getModule()->getId(), $messageBoxContent);
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $view, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
 }
Пример #4
0
 public function actionUserInterface($type = null)
 {
     if (!Group::isUserASuperAdministrator(Yii::app()->user->userModel)) {
         throw new NotSupportedException();
     }
     if ($type == null) {
         $demoView = new MenuUserInterfaceDemoView();
         $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $demoView));
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::STANDARD_VIEW) {
         $demoView = new StandardUserInterfaceDemoView();
         $demoView->message = 'Standard View';
         $view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $demoView));
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::STANDARD_BREADCRUMBS_VIEW) {
         $breadCrumbLinks = array('Breadcrumb 1' => array('/zurmo/demo/userInterface'), 'Breadcrumb 2');
         $demoView = new StandardUserInterfaceDemoView();
         $demoView->message = 'Standard View with BreadCrumbs';
         $view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $demoView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::GRACEFUL_ERROR_VIEW) {
         $demoView = new StandardUserInterfaceDemoView();
         $demoView->message = 'Graceful Error View';
         $view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeErrorViewForCurrentUser($this, $demoView));
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::UNEXPECTED_ERROR_VIEW) {
         $view = new ErrorPageView('Unexpected error view');
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::AUTHORIZATION_VIEW) {
         $demoView = new StandardUserInterfaceDemoView();
         $demoView->message = 'Authorization View';
         $view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeAuthorizationViewForCurrentUser($this, $demoView));
         $view->setCssClasses(array_merge($view->getCssClasses(), array('ZurmoAuthorizationPageView')));
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::CONTACT_FORM_EXTERNAL_VIEW) {
         $containedView = new ContactExternalEditAndDetailsView('Edit', $this->getId(), $this->getModule()->getId(), new ContactWebFormsModelForm(new Contact()), ContactExternalEditAndDetailsView::getMetadata());
         $view = new ContactWebFormsExternalPageView(ZurmoExternalViewUtil::makeExternalViewForCurrentUser($containedView));
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::MARKETING_LISTS_EXTERNAL_PREVIEW_VIEW) {
         $splashView = new MarketingListsExternalActionsPreviewView();
         $view = new MarketingListsExternalActionsPageView($this, $splashView);
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::MARKETING_LISTS_MANAGE_SUBSCRIPTIONS_VIEW) {
         $marketingListMember = MarketingListMember::getSubset(null, 0, 1);
         $marketingLists = MarketingList::getByUnsubscribedAndAnyoneCanSubscribe($marketingListMember[0]->contact->id);
         $listView = new MarketingListsManageSubscriptionsListView($this->getId(), $this->getModule()->getId(), $marketingLists, -100, -100, -100, 'notUsed');
         $view = new MarketingListsManageSubscriptionsPageView($this, $listView);
         echo $view->render();
     } elseif ($type == MenuUserInterfaceDemoView::MOBILE_HEADER_VIEW) {
         Yii::app()->userInterface->setSelectedUserInterfaceType(UserInterface::MOBILE);
         $demoView = new StandardUserInterfaceDemoView();
         $demoView->message = 'Standard View';
         $view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $demoView));
         echo $view->render();
     } else {
         throw new NotSupportedException();
     }
 }
Пример #5
0
 public function actionEdit($id)
 {
     $role = Role::getById(intval($id));
     $title = Zurmo::t('ZurmoModule', 'Edit');
     $breadcrumbLinks = array(strval($role) => array('role/edit', 'id' => $id), $title);
     $editView = new RoleEditAndDetailsView('Edit', $this->getId(), $this->getModule()->getId(), $this->attemptToSaveModelFromPost($role));
     $editView->setCssClasses(array('AdministrativeArea'));
     $view = new RolesPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $editView, $breadcrumbLinks, 'RoleBreadCrumbView'));
     echo $view->render();
 }
Пример #6
0
 public function actionConfigurationList()
 {
     $redirectUrlParams = array('/zurmo/' . $this->getId() . '/ConfigurationList');
     $currency = new Currency();
     $currency = $this->attemptToSaveModelFromPost($currency, $redirectUrlParams);
     $messageBoxContent = $this->attemptToUpdateActiveCurrenciesFromPostAndGetMessageBoxContent();
     $view = new CurrencyTitleBarConfigurationListAndCreateView($this->getId(), $this->getModule()->getId(), $currency, Currency::getAll(), $messageBoxContent);
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $view));
     echo $view->render();
 }
 protected function resolveAndRenderView(View $messageView)
 {
     $gridViewId = 'notUsed';
     $pageVar = 'notUsed';
     $listModel = new ContactWebForm(false);
     $actionBarView = new SecuredActionBarForContactWebFormsSearchAndListView('default', 'contactWebForms', $listModel, $gridViewId, $pageVar, false, $this->activeActionElementType);
     $mixedView = new ActionBarAndZeroModelsYetView($actionBarView, $messageView);
     $view = new ContactWebFormsPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this->controller, $mixedView, $this->breadCrumbLinks, 'ContactWebFormsBreadCrumbView'));
     echo $view->render();
 }
 public function actionConfigurationList()
 {
     $breadCrumbLinks = array(Zurmo::t('ZurmoModule', 'Currencies'));
     $redirectUrlParams = array('/zurmo/' . $this->getId() . '/ConfigurationList');
     $currency = new Currency();
     $currency = $this->attemptToSaveModelFromPost($currency, $redirectUrlParams);
     $messageBoxContent = $this->attemptToUpdateActiveCurrenciesFromPostAndGetMessageBoxContent();
     $view = new CurrencyTitleBarConfigurationListAndCreateView($this->getId(), $this->getModule()->getId(), $currency, Currency::getAll(), $messageBoxContent);
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $view, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
 }
Пример #9
0
 public function actionIndex()
 {
     if (isset($_GET['clearCache']) && $_GET['clearCache'] == 1) {
         Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'Cache has been successfully cleaned.'));
     }
     if (isset($_GET['resolveCustomData']) && $_GET['resolveCustomData'] == 1) {
         Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'Custom data updated successfully.'));
     }
     $view = new ConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, new DevelopmentListView()));
     echo $view->render();
 }
 protected function preFilter($filterChain)
 {
     if (!RightsUtil::canUserAccessModule('MarketingListsModule', Yii::app()->user->userModel)) {
         $messageView = new UserIsMissingMarketingListAccessSplashView();
         $pageViewClassName = $this->controller->getModule()->getPluralCamelCasedName() . 'PageView';
         $view = new $pageViewClassName(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this->controller, $messageView));
         echo $view->render();
         return false;
     }
     return true;
 }
Пример #11
0
 public function actionIndex()
 {
     if (isset($_GET['clearCache']) && $_GET['clearCache'] == 1) {
         Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'Cache has been successfully cleaned.'));
     }
     if (isset($_GET['resolveCustomData']) && $_GET['resolveCustomData'] == 1) {
         Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'Custom data updated successfully.'));
     }
     $breadcrumbLinks = array(Zurmo::t('ZurmoModule', 'Developer Tools'));
     $view = new ConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, new DevelopmentListView(), $breadcrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
 }
 public function actionMassDelete()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('massDeleteProgressPageSize');
     $contactWebFormEntry = new ContactWebFormEntry(false);
     $activeAttributes = $this->resolveActiveAttributesFromMassDeletePost();
     $dataProvider = $this->getDataProviderByResolvingSelectAllFromGet(new ContactWebFormEntrySearchForm($contactWebFormEntry), $pageSize, null, null);
     $selectedRecordCount = static::getSelectedRecordCountByResolvingSelectAllFromGet($dataProvider);
     $contactWebFormEntry = $this->processMassDelete($pageSize, $activeAttributes, $selectedRecordCount, 'ContactWebFormsPageView', $contactWebFormEntry, ContactWebFormEntry::getModelLabelByTypeAndLanguage('Plural'), $dataProvider, array($this->getId() . '/list'));
     $massDeleteView = $this->makeMassDeleteView($contactWebFormEntry, $activeAttributes, $selectedRecordCount, ContactWebFormEntry::getModelLabelByTypeAndLanguage('Plural'));
     $view = new ContactWebFormsPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $massDeleteView));
     echo $view->render();
 }
 public function actionList()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
     $activeActionElementType = 'WorkflowMessageInQueuesMenu';
     $model = new WorkflowMessageInQueue(false);
     $searchForm = new WorkflowMessageInQueuesSearchForm($model);
     $dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, null, 'WorkflowMessageInQueuesSearchView');
     $breadCrumbLinks = static::getListBreadcrumbLinks();
     if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') {
         $mixedView = $this->makeListView($searchForm, $dataProvider, 'WorkflowMessageInQueuesListView');
         $view = new WorkflowsPageView($mixedView);
     } else {
         $mixedView = $this->makeActionBarSearchAndListView($searchForm, $dataProvider, 'SecuredActionBarForWorkflowsSearchAndListView', 'WorkflowMessageInQueues', $activeActionElementType);
         $view = new WorkflowsPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadCrumbLinks, 'WorkflowBreadCrumbView'));
     }
     echo $view->render();
 }
Пример #14
0
 public function actionConfigurationEditLdap()
 {
     $configurationForm = LdapConfigurationFormAdapter::makeFormFromGlobalConfiguration();
     $postVariableName = get_class($configurationForm);
     if (isset($_POST[$postVariableName])) {
         $configurationForm->setAttributes($_POST[$postVariableName]);
         if ($configurationForm->validate()) {
             LdapConfigurationFormAdapter::setConfigurationFromForm($configurationForm);
             Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'LDAP Configuration saved successfully.'));
             $this->redirect(Yii::app()->createUrl('configuration/default/index'));
         }
     }
     $editView = new LdapConfigurationEditAndDetailsView('Edit', $this->getId(), $this->getModule()->getId(), $configurationForm);
     $editView->setCssClasses(array('AdministrativeArea'));
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $editView));
     echo $view->render();
 }
Пример #15
0
 /**
  * Lists export items.
  */
 public function actionList()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
     $exportItem = new ExportItem(false);
     $searchForm = new ExportSearchForm($exportItem);
     $listAttributesSelector = new ListAttributesSelector('ExportListView', get_class($this->getModule()));
     $searchForm->setListAttributesSelector($listAttributesSelector);
     $dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, null, 'ExportSearchView');
     if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') {
         $mixedView = $this->makeListView($searchForm, $dataProvider);
         $view = new ExportPageView($mixedView);
     } else {
         $mixedView = $this->makeSearchAndListView($searchForm, 'Export', $dataProvider);
         $breadCrumbLinks = array(Zurmo::t('ExportModule', 'Export'));
         $view = new ExportPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     }
     echo $view->render();
 }
Пример #16
0
 /**
  * Admin configuration action for entering the google map api key.
  */
 public function actionConfigurationView()
 {
     $configurationForm = new MapsConfigurationForm();
     $configurationForm->apiKey = Yii::app()->mappingHelper->getGeoCodeApiKey();
     $postVariableName = get_class($configurationForm);
     if (isset($_POST[$postVariableName])) {
         $configurationForm->setAttributes($_POST[$postVariableName]);
         if ($configurationForm->validate()) {
             ZurmoConfigurationUtil::setByModuleName('MapsModule', 'googleMapApiKey', $configurationForm->apiKey);
             Yii::app()->user->setFlash('notification', Zurmo::t('MapsModule', 'Maps configuration saved successfully.'));
             $this->redirect(Yii::app()->createUrl('maps/default/configurationView'));
         }
     }
     $editView = new MapConfigurationView('Edit', $this->getId(), $this->getModule()->getId(), $configurationForm);
     $editView->setCssClasses(array('AdministrativeArea'));
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $editView));
     echo $view->render();
 }
 public function actionConfigurationEdit()
 {
     $breadCrumbLinks = array(Zurmo::t('MarketingModule', 'Marketing Configuration'));
     $form = MarketingConfigurationFormAdapter::makeFormFromMarketingConfiguration();
     $postData = PostUtil::getData();
     $postVariableName = get_class($form);
     if (isset($postData[$postVariableName])) {
         $form->setAttributes($postData[$postVariableName]);
         if ($form->validate()) {
             MarketingConfigurationFormAdapter::setConfigurationFromForm($form);
             Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'Marketing configuration saved successfully.'));
             $this->redirect(Yii::app()->createUrl('configuration/default/index'));
         }
     }
     $editView = new MarketingConfigurationEditAndDetailsView('Edit', $this->getId(), $this->getModule()->getId(), $form);
     $editView->setCssClasses(array('AdministrativeArea'));
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $editView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
 }
Пример #18
0
 public function actionDetails($id)
 {
     $contactWebForm = static::getModelAndCatchNotFoundAndDisplayError('ContactWebForm', intval($id));
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($contactWebForm);
     $breadCrumbTitle = $contactWebForm->name;
     $breadcrumbLinks = array($breadCrumbTitle);
     $titleBarAndDetailsView = $this->makeEditAndDetailsView($contactWebForm, 'Details');
     $view = new ContactWebFormsPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $titleBarAndDetailsView, $breadcrumbLinks, 'ContactWebFormsBreadCrumbView'));
     echo $view->render();
 }
Пример #19
0
 public function actionEditPolicies($id)
 {
     $group = Group::getById(intval($id));
     $title = Zurmo::t('ZurmoModule', 'Policies');
     $breadCrumbLinks = array(strval($group) => array('group/' . static::resolveBreadCrumbActionByGroup($group), 'id' => $id), $title);
     $data = PoliciesUtil::getAllModulePoliciesDataByPermitable($group);
     $policiesForm = PoliciesFormUtil::makeFormFromPoliciesData($data);
     $postVariableName = get_class($policiesForm);
     if (isset($_POST[$postVariableName])) {
         $castedPostData = PoliciesFormUtil::typeCastPostData($_POST[$postVariableName]);
         $policiesForm = PoliciesFormUtil::loadFormFromCastedPost($policiesForm, $castedPostData);
         if ($policiesForm->validate()) {
             if (PoliciesFormUtil::setPoliciesFromCastedPost($castedPostData, $group)) {
                 $this->clearCaches();
                 Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'Policies Saved Successfully.'));
                 $action = $this->resolveActionToGoToAfterSave($group);
                 $this->redirect(array($this->getId() . '/' . $action, 'id' => $group->id));
                 Yii::app()->end(0, false);
             }
         }
     }
     $metadata = PoliciesEditViewUtil::resolveMetadataFromData($policiesForm->data, PoliciesEditAndDetailsView::getMetadata());
     $titleBarAndEditView = new GroupActionBarAndSecurityEditView($this->getId(), $this->getModule()->getId(), $policiesForm, $group, $this->getModule()->getPluralCamelCasedName(), $metadata, 'PoliciesEditAndDetailsView', 'GroupPoliciesEditMenu');
     $view = new GroupsPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $titleBarAndEditView, $breadCrumbLinks, 'GroupBreadCrumbView'));
     echo $view->render();
 }
 public function actionConfigurationEdit()
 {
     $view = new ConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, new PluginsConfigurationListView(), array(Zurmo::t('ZurmoModule', 'Plugins')), 'SettingsBreadCrumbView'));
     echo $view->render();
 }
Пример #21
0
 public function actionConfigurationEdit()
 {
     $view = new ConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, new PluginsConfigurationListView()));
     echo $view->render();
 }
Пример #22
0
 public function actionIndex()
 {
     $view = new ConfigurationPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, new ConfigureModulesView()));
     echo $view->render();
 }
Пример #23
0
 /**
  * Utilized by users to redeem rewards for themselves
  */
 public function actionRedeemList()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
     $gameReward = new GameReward(false);
     $searchForm = new GameRewardsSearchForm($gameReward);
     $dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, 'GameRewardsForRedemptionStateMetadataAdapter', 'GameRewardsRedeemSearchView');
     $breadCrumbLinks = array(Zurmo::t('GameRewardsModule', 'Redeem Rewards'));
     if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') {
         $mixedView = $this->makeListView($searchForm, $dataProvider, 'GameRewardsRedeemListView');
         $view = new GameRewardsPageView($mixedView);
     } else {
         $introView = new GameRewardsRedemptionIntroView(get_class($this->getModule()));
         $mixedView = $this->makeActionBarSearchAndListView($searchForm, $dataProvider, 'SecuredActionBarForGameRewardsSearchAndListView', 'GameRewardsRedeem', null, $introView);
         $view = new GameRewardsPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadCrumbLinks, 'GameRewardRedeemBreadCrumbView'));
     }
     echo $view->render();
 }
 /**
  * Action to configure sendgrid outbound settings.
  */
 public function actionConfigurationEditOutbound()
 {
     $breadCrumbLinks = array(Zurmo::t('SendGridModule', 'SendGrid Global Configuration'));
     $configurationForm = SendGridWebApiConfigurationFormAdapter::makeFormFromGlobalConfiguration();
     $postVariableName = get_class($configurationForm);
     if (isset($_POST[$postVariableName])) {
         $configurationForm->setAttributes($_POST[$postVariableName]);
         if ($configurationForm->validate()) {
             SendGridWebApiConfigurationFormAdapter::setConfigurationFromForm($configurationForm);
             if (!Yii::app()->user->hasFlash('notification')) {
                 Yii::app()->user->setFlash('notification', Zurmo::t('SendGridModule', 'Sendgrid configuration saved successfully.'));
             }
             $this->redirect(Yii::app()->createUrl('sendGrid/default/configurationEditOutbound'));
         }
     }
     $editView = new SendGridConfigurationEditAndDetailsView('Edit', $this->getId(), $this->getModule()->getId(), $configurationForm);
     $editView->setCssClasses(array('AdministrativeArea'));
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $editView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
 }
 public function actionQueueJob($type, $delay = 0, $messageLoggerClassName = 'MessageLogger')
 {
     if (!Group::isUserASuperAdministrator(Yii::app()->user->userModel)) {
         echo Zurmo::t('JobsManagerModule', 'Only super administrators can run jobs from the browser');
         Yii::app()->end(0, false);
     }
     if (!Yii::app()->jobQueue->isEnabled()) {
         echo Zurmo::t('JobsManagerModule', 'Job queuing must be enabled in order to queue a job');
         Yii::app()->end(0, false);
     }
     $breadCrumbLinks = array(Zurmo::t('JobsManagerModule', 'JobsManagerModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()) => array('/jobsManager/default'), Yii::app()->jobQueue->getQueueJobLabel());
     $messageLogger = new $messageLoggerClassName();
     $queueJobView = new QueueJobView($this->getId(), $this->getModule()->getId(), $type, (int) $delay, $messageLogger);
     $view = new JobsManagerPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $queueJobView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
     $template = ZurmoHtml::script("\$('#logging-table ol').append('<li>{message}</li>');");
 }
 public function actionConfigurationEdit()
 {
     $breadCrumbLinks = array(Zurmo::t('ZurmoModule', 'Authentication Configuration'));
     $view = new ConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, new AuthenticationConfigurationListView(), $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
 }
Пример #27
0
 /**
  * Depending on the user interface, the user views should utilize the admin or regular view.  This especially
  * important for mobile, since for mobile there are no admin views available yet.
  * @param $containedView
  * @param $breadCrumbLinks
  * @param $breadcrumbViewClassName
  * @return GridView
  */
 protected function resolveZurmoDefaultOrAdminView(View $containedView, $breadCrumbLinks, $breadcrumbViewClassName)
 {
     assert('is_array($breadCrumbLinks)');
     assert('is_string($breadcrumbViewClassName)');
     if (Yii::app()->userInterface->isMobile()) {
         return ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $containedView);
     } else {
         return ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $containedView, $breadCrumbLinks, $breadcrumbViewClassName);
     }
 }
 public function actionManageOrder()
 {
     $activeActionElementType = 'WorkflowManageOrderMenu';
     $actionBarView = new SecuredActionBarForWorkflowsSearchAndListView($this->getId(), $this->getModule()->getId(), new SavedWorkflow(), 'list-view', 'sequence', false, $activeActionElementType);
     $gridView = new GridView(2, 1);
     $gridView->setView($actionBarView, 0, 0);
     $gridView->setView(new WorkflowManageOrderView(), 1, 0);
     $breadCrumbLinks = static::getManageOrderBreadcrumbLinks();
     $view = new WorkflowsPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $gridView, $breadCrumbLinks, 'WorkflowBreadCrumbView'));
     echo $view->render();
 }
 public function actionConfigurationEditImap($type = 1)
 {
     $type = intval($type);
     if ($type < 1 || $type > 2) {
         throw new CHttpException(400);
     }
     $adapterClassName = 'EmailArchivingConfigurationFormAdapter';
     $editViewClassName = 'EmailArchivingConfigurationEditAndDetailsView';
     $successMessage = Zurmo::t('EmailMessagesModule', 'Email archiving configuration saved successfully.');
     $breadCrumbLinks = array(Zurmo::t('EmailMessagesModule', 'Email Configuration') => array('/emailMessages/default/configurationEdit'));
     if ($type == 2) {
         $adapterClassName = 'BounceConfigurationFormAdapter';
         $editViewClassName = 'BounceConfigurationEditAndDetailsView';
         $successMessage = Zurmo::t('EmailMessagesModule', 'Bounce configuration saved successfully.');
         $breadCrumbLinks[] = Zurmo::t('EmailMessagesModule', 'Bounce Configuration (IMAP)');
     } else {
         $breadCrumbLinks[] = Zurmo::t('EmailMessagesModule', 'Email Archiving Configuration (IMAP)');
     }
     $configurationForm = $adapterClassName::makeFormFromGlobalConfiguration();
     $postVariableName = get_class($configurationForm);
     if (isset($_POST[$postVariableName])) {
         $configurationForm->setAttributes($_POST[$postVariableName]);
         if ($configurationForm->validate()) {
             $adapterClassName::setConfigurationFromForm($configurationForm);
             Yii::app()->user->setFlash('notification', $successMessage);
             $this->redirect(Yii::app()->createUrl('configuration/default/index'));
         }
     }
     $editView = new $editViewClassName('Edit', $this->getId(), $this->getModule()->getId(), $configurationForm);
     $editView->setCssClasses(array('AdministrativeArea'));
     $view = new ZurmoConfigurationPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $editView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
 }
Пример #30
0
 public function actionJobLogDetails($id)
 {
     $jobLog = JobLog::getById(intval($id));
     $detailsView = new JobLogDetailsView($this->getId(), $this->getModule()->getId(), $jobLog, strval($jobLog));
     $view = new JobsManagerPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $detailsView));
     echo $view->render();
 }