/** * List view for projects */ public function actionList() { $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule())); $project = new Project(false); $searchForm = new ProjectsSearchForm($project); $listAttributesSelector = new ListAttributesSelector('ProjectsListView', get_class($this->getModule())); $searchForm->setListAttributesSelector($listAttributesSelector); $dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, null, 'ProjectsSearchView'); $breadCrumbLinks = static::getListBreadcrumbLinks(); if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') { $mixedView = $this->makeListView($searchForm, $dataProvider); $view = new ProjectsPageView($mixedView); } else { $mixedView = $this->makeActionBarSearchAndListView($searchForm, $dataProvider, 'SecuredActionBarForProjectsSearchAndListView', null, 'ProjectsListMenu'); $view = new ProjectsPageView(ProjectDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadCrumbLinks, 'ProjectBreadCrumbView')); } echo $view->render(); }
/** * Get latest activity feed list view * @return ListView */ public static function getProjectsLatestActivityFeedView($controller, $pageSize) { $project = new Project(false); $searchForm = new ProjectsSearchForm($project); $dataProvider = RedBeanModelDataProviderUtil::makeDataProvider(array(), 'ProjectAuditEvent', 'RedBeanModelDataProvider', 'dateTime', true, $pageSize); $listView = new ProjectsFeedListView($controller->id, $controller->getModule()->getId(), get_class($searchForm->getModel()), $dataProvider, GetUtil::resolveSelectedIdsFromGet(), null, array(), $searchForm->getListAttributesSelector(), $searchForm->getKanbanBoard()); return $listView; }