/** * The project dashboard * * @param TBGRequest $request */ public function runDashboard(TBGRequest $request) { $this->forward403unless($this->_checkProjectPageAccess('project_dashboard')); if ($request->isPost() && $request['setup_default_dashboard'] && $this->getUser()->canEditProjectDetails($this->selected_project)) { TBGDashboardViewsTable::getTable()->setDefaultViews($this->selected_project->getID(), TBGDashboardViewsTable::TYPE_PROJECT); $this->forward($this->getRouting()->generate('project_dashboard', array('project_key' => $this->selected_project->getKey()))); } $this->views = TBGDashboardView::getViews($this->selected_project->getID(), TBGDashboardViewsTable::TYPE_PROJECT); }
public function runDashboardView(TBGRequest $request) { $view = new TBGDashboardView($request['view_id']); if ($view->getTargetType() == TBGDashboardView::TYPE_PROJECT) { TBGContext::setCurrentProject(new TBGProject($view->getProjectID())); } return $this->renderJSON(array('content' => $this->returnComponentHTML($view->getTemplate(), array('view' => $view)))); }
public function componentDashboardConfig() { $this->views = TBGDashboardView::getAvailableViews($this->target_type); $this->dashboardViews = TBGDashboardView::getViews($this->tid, $this->target_type); }