public function displayHeader(Tracker_IFetchTrackerSwitcher $layout, Codendi_Request $request, PFUser $current_user, Tracker_Report $report, $report_can_be_modified)
 {
     $link_artifact_id = (int) $request->get('link-artifact-id');
     if ($report_can_be_modified) {
         $title = '';
         $breadcrumbs = array();
         $params = array('body_class' => array('in_tracker_report'));
         $toolbar = null;
         $report->getTracker()->displayHeader($layout, $title, $breadcrumbs, $toolbar, $params);
     }
     if ($request->get('pv')) {
         return;
     }
     $reports = $this->report_factory->getReportsByTrackerId($report->tracker_id, $current_user->getId());
     if ($link_artifact_id) {
         $this->displayHeaderInArtifactLinkModal($layout, $request, $current_user, $report, $reports, $link_artifact_id);
     } else {
         $this->displayHeaderInReport($request, $current_user, $report, $reports, $report_can_be_modified);
     }
 }
Ejemplo n.º 2
0
 public function itHasTwoReports()
 {
     $this->assertCount($this->report_factory->getReportsByTrackerId(self::$task_tracker_id, null), 2);
 }