private function fetchViewContent($tree_of_artifacts, $artifact_factory, $report = null) { $report = $report ? $report : mock('Tracker_Report'); $criteria = $this->buildCriteria($report); $factory = $this->buildAFormElementFactory(); $user = mock('PFUser'); $view = new Tracker_CrossSearch_SearchContentView($report, $criteria, $tree_of_artifacts, $artifact_factory, $factory, $user); return $view->fetch(); }
public function __construct(Tracker_Report $report, array $criteria, TreeNode $tree_of_artifacts, Tracker_ArtifactFactory $artifact_factory, Tracker_FormElementFactory $factory, User $user, Planning $planning, $planning_redirect_param) { parent::__construct($report, $criteria, $tree_of_artifacts, $artifact_factory, $factory, $user); $this->planning = $planning; $this->planning_redirect_parameter = $planning_redirect_param; $this->renderer = TemplateRendererFactory::build()->getRenderer(dirname(__FILE__) . '/../../templates'); $card_mapper = new TreeNodeMapper(new Planning_ItemCardPresenterCallback($this->planning, new Tracker_CardFields(), 'planning-draggable-toplan')); $this->tree_of_card_presenters = $card_mapper->map($this->tree_of_artifacts); }
public function render(User $user) { $title = $GLOBALS['Language']->getText('plugin_tracker_crosssearch', 'title'); $breadcrumbs = array(array('url' => null, 'title' => $title)); $this->service->displayHeader($title, $breadcrumbs, array()); $html = ''; $html .= $this->fetchTrackerHomeNav(); $html .= '<div class="tracker_homenav_cross_search">'; $html .= '<h1>' . $title . '</h1>'; if ($this->criteria) { $html .= $this->content_view->fetch(); $html .= $this->fetchTrackerList($user); } else { $html .= '<em>' . 'There is no shared field to query across your trackers' . '</em>'; } $html .= '</div>'; echo $html; $this->service->displayFooter(); }
protected function fetchNoMatchingArtifacts() { //we need the empty structure to be able to remove item from the plan return parent::fetchNoMatchingArtifacts() . $this->fetchTable(); }
/** * @return string html */ public function backlogSearchView() { return $this->backlog_search_view->fetch(); }