public function show()
 {
     $planning = $this->milestone->getPlanning();
     if ($this->milestone->hasAncestors()) {
         $available_milestones = $this->milestone_factory->getSiblingMilestones($this->getCurrentUser(), $this->milestone);
     } else {
         $available_milestones = $this->getAllMilestonesOfCurrentPlanning();
     }
     $presenter = $this->getMilestonePresenter($planning, $this->content_view, $available_milestones);
     $this->render('show', $presenter);
 }
Example #2
0
 public function show(Planning_ViewBuilder $view_builder)
 {
     $project = $this->milestone->getProject();
     $planning = $this->milestone->getPlanning();
     if ($this->milestone->hasAncestors()) {
         $available_milestones = $this->milestone_factory->getSiblingMilestones($this->getCurrentUser(), $this->milestone);
     } else {
         $available_milestones = $this->getAllMilestonesOfCurrentPlanning();
     }
     $content_view = $this->buildContentView($view_builder, $planning, $project);
     $presenter = $this->getMilestonePresenter($planning, $content_view, $available_milestones);
     $this->render('show', $presenter);
 }
 protected function getAvailableMilestones(Planning_Milestone $milestone)
 {
     if ($milestone->hasAncestors()) {
         return $this->milestone_factory->getSiblingMilestones($this->request->getCurrentUser(), $milestone);
     } else {
         return $this->getAllMilestonesOfCurrentPlanning($milestone);
     }
 }