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