protected function resolveAndRenderView(View $messageView) { $gridViewId = 'notUsed'; $pageVar = 'notUsed'; $listModel = new SavedWorkflow(); $actionBarView = new SecuredActionBarForWorkflowsSearchAndListView('default', 'workflows', $listModel, $gridViewId, $pageVar, false, $this->activeActionElementType); $mixedView = new ActionBarAndZeroModelsYetView($actionBarView, $messageView); $view = new WorkflowsPageView(WorkflowDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this->controller, $mixedView, $this->breadCrumbLinks, 'WorkflowBreadCrumbView')); echo $view->render(); }
public function actionList() { $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule())); $activeActionElementType = 'WorkflowMessageInQueuesLink'; $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(); }
/** * Action for displaying a mass delete form and also action when that form is first submitted. * When the form is submitted, in the event that the quantity of models to delete is greater * than the pageSize, then once the pageSize quantity has been reached, the user will be * redirected to the makeMassDeleteProgressView. * In the mass delete progress view, a javascript refresh will take place that will call a refresh * action, usually makeMassDeleteProgressView. * If there is no need for a progress view, then a flash message will be added and the user will * be redirected to the list view for the model. A flash message will appear providing information * on the delete records. * @see Controller->makeMassDeleteProgressView * @see Controller->processMassDelete * @see */ public function actionMassDelete() { $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('massDeleteProgressPageSize'); $queueItem = new WorkflowMessageInQueue(false); $activeAttributes = $this->resolveActiveAttributesFromMassDeletePost(); $dataProvider = $this->getDataProviderByResolvingSelectAllFromGet(new WorkflowMessageInQueuesSearchForm($queueItem), $pageSize, Yii::app()->user->userModel->id, null, 'WorkflowMessageInQueuesSearchView'); $selectedRecordCount = static::getSelectedRecordCountByResolvingSelectAllFromGet($dataProvider); $queueItem = $this->processMassDelete($pageSize, $activeAttributes, $selectedRecordCount, 'WorkflowsPageView', $queueItem, Zurmo::t('WorkflowsModule', 'Message Queue'), $dataProvider, array($this->getId() . '/list')); $massDeleteView = $this->makeMassDeleteView($queueItem, $activeAttributes, $selectedRecordCount, Zurmo::t('WorkflowsModule', 'Message Queue'), 'MassDeleteView', false); $view = new WorkflowsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $massDeleteView)); echo $view->render(); }
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(); }