5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
7 * Copyright 2012,2014, Franck Villaume - TrivialDev
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.
29 $atf = new ArtifactTypeFactoryHtml($group);
30 if (!$atf || !is_object($atf) || $atf->isError()) {
31 exit_error(_('Could Not Get ArtifactTypeFactory'),'tracker');
34 $at_arr = $atf->getArtifactTypes();
35 if ($at_arr === false) {
36 exit_permission_denied('tracker');
39 html_use_tablesorter();
43 if (!$at_arr || count($at_arr) < 1) {
44 echo $HTML->information(_('No trackers have been set up, or you cannot view them.'));
46 echo sprintf(_('The Admin for this project will have to set up data types using the %1$s admin page %2$s'), '<a href="'.util_make_url ('/tracker/admin/?group_id='.$group_id).'">', '</a>');
49 plugin_hook ("blocks", "tracker index");
50 echo '<p>'._('Choose a tracker and you can browse/edit/add items to it.').'</p>';
52 Put the result set (list of trackers for this group) into a column with folders
54 $tablearr = array(_('Tracker'),_('Description'),_('Open'),_('Total'));
55 echo $HTML->listTableTop($tablearr, false, 'full sortable sortable_table_tracker', 'sortable_table_tracker');
57 for ($j = 0; $j < count($at_arr); $j++) {
58 if (!is_object($at_arr[$j])) {
60 } elseif ($at_arr[$j]->isError()) {
61 echo $at_arr[$j]->getErrorMessage();
64 $cells[][] = util_make_link('/tracker/?atid='.$at_arr[$j]->getID().'&group_id='.$group_id.'&func=browse',
65 html_image("ic/tracker20w.png","20","20").' '.$at_arr[$j]->getName());
66 $cells[][] = $at_arr[$j]->getDescription();
67 $cells[] = array((int) $at_arr[$j]->getOpenCount(), 'class' => 'align-center');
68 $cells[] = array((int) $at_arr[$j]->getTotalCount(), 'class' => 'align-center');
69 echo $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($j, true)), $cells);
72 echo $HTML->listTableBottom();
78 // c-file-style: "bsd"