3 * FusionForge Generic Tracker facility
5 * Copyright (C) 2011-2012 Alain Peyrat, Alcatel-Lucent
6 * Copyright 2011, Franck Villaume - Capgemini
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 require_once $gfcommon.'tracker/ArtifactType.class.php';
26 require_once $gfcommon.'tracker/ArtifactExtraField.class.php';
27 require_once $gfcommon.'tracker/ArtifactExtraFieldElement.class.php';
28 require_once $gfcommon.'tracker/ArtifactWorkflow.class.php';
29 require_once $gfcommon.'include/utils_crossref.php';
31 class ArtifactTypeFactoryHtml extends ArtifactTypeFactory {
32 function header($params=array()) {
35 if (!forge_get_config('use_tracker')) {
39 $group_id= $this->Group->getID();
41 $params['group']=$group_id;
42 if (!isset($params['title'])) {
43 $params['title']=sprintf(_('Trackers for %1$s'), $this->Group->getPublicName());
45 $params['toptab']='tracker';
47 $labels = array(_('View Trackers'));
48 $links = array('/tracker/?group_id='.$group_id);
49 $attr = array(array('title' => _('Get the list of available trackers'), 'class' => 'tabtitle-nw'));
50 $labels[] = _('Roadmap');
51 $links[] = '/tracker/roadmap.php?group_id='.$group_id;
52 $attr[] = array('title' => _('Display configured roadmaps'), 'class' => 'tabtitle');
53 if (session_loggedin()) {
54 $labels[] = _('Reporting');
55 $links[] = '/tracker/reporting/?group_id='.$group_id;
56 $attr[] = array('title' => _('Various graph of statistics.'), 'class' => 'tabtitle');
57 $perm = $this->Group->getPermission();
58 if ($perm && is_object($perm) && !$perm->isError() && $perm->isPMAdmin()) {
59 $labels[] = _('Administration');
60 $links[] = '/tracker/admin/?group_id='.$group_id;
61 $attr[] = array('title' => _('Global administration for trackers. Create, clone, workflow, fields ...'), 'class' => 'tabtitle');
65 $params['submenu'] = $HTML->subMenu($labels, $links, $attr);
67 site_project_header($params);
70 function footer($params=array()) {
71 site_project_footer($params);
74 // function adminHeader($params=array()) {
75 // return $this->header($params);
78 // function adminFooter($params=array()) {
79 // return $this->footer($params);
85 // c-file-style: "bsd"