예제 #1
0
 public function displayHeader(Tracker_IDisplayTrackerLayout $layout, $title, $breadcrumbs, $toolbar = null)
 {
     if ($project = ProjectManager::instance()->getProject($this->group_id)) {
         $hp = Codendi_HTMLPurifier::instance();
         $breadcrumbs = array_merge(array(array('title' => $hp->purify($this->name, CODENDI_PURIFIER_CONVERT_HTML), 'url' => TRACKER_BASE_URL . '/?tracker=' . $this->id)), $breadcrumbs);
         if (!$toolbar) {
             $toolbar = array();
             $toolbar[] = array('title' => $GLOBALS['Language']->getText('plugin_tracker', 'submit_new_artifact'), 'url' => $this->getSubmitUrl(), 'class' => 'tracker-submit-new');
             if (UserManager::instance()->getCurrentUser()->isLoggedIn()) {
                 $toolbar[] = array('title' => $GLOBALS['Language']->getText('plugin_tracker', 'notifications'), 'url' => TRACKER_BASE_URL . '/?tracker=' . $this->id . '&func=notifications');
             }
             if ($this->userIsAdmin()) {
                 $toolbar[] = array('title' => $GLOBALS['Language']->getText('plugin_tracker', 'administration'), 'url' => TRACKER_BASE_URL . '/?tracker=' . $this->id . '&func=admin');
             }
             $toolbar[] = array('title' => $GLOBALS['Language']->getText('plugin_tracker', 'help'), 'url' => 'javascript:help_window(\'' . get_server_url() . '/documentation/user_guide/html/' . UserManager::instance()->getCurrentUser()->getLocale() . '/TrackerV5Service.html\');');
         }
         $title = ($title ? $title . ' - ' : '') . $hp->purify($this->name, CODENDI_PURIFIER_CONVERT_HTML);
         $layout->displayHeader($project, $title, $breadcrumbs, $toolbar);
     }
 }
예제 #2
0
 public function displayHeader(Tracker_IDisplayTrackerLayout $layout, $title, $breadcrumbs, $toolbar = null, array $params = array())
 {
     if ($project = ProjectManager::instance()->getProject($this->group_id)) {
         $hp = Codendi_HTMLPurifier::instance();
         $breadcrumbs = array_merge(array(array('title' => $hp->purify($this->name, CODENDI_PURIFIER_CONVERT_HTML), 'url' => TRACKER_BASE_URL . '/?tracker=' . $this->id)), $breadcrumbs);
         if (!$toolbar) {
             $toolbar = $this->getDefaultToolbar();
         }
         $title = ($title ? $title . ' - ' : '') . $hp->purify($this->name, CODENDI_PURIFIER_CONVERT_HTML);
         $layout->displayHeader($project, $title, $breadcrumbs, $toolbar, $params);
     }
 }