コード例 #1
0
ファイル: actions.class.php プロジェクト: oparoz/thebuggenie
 /**
  * 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);
 }
コード例 #2
0
ファイル: actions.class.php プロジェクト: oparoz/thebuggenie
 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))));
 }
コード例 #3
0
 public function componentDashboardConfig()
 {
     $this->views = TBGDashboardView::getAvailableViews($this->target_type);
     $this->dashboardViews = TBGDashboardView::getViews($this->tid, $this->target_type);
 }