5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
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 $atf = new ArtifactTypeFactoryHtml($group);
26 if (!$group || !is_object($group) || $group->isError()) {
27 exit_error(_('Could Not Get ArtifactTypeFactory'),'tracker');
30 $at_arr = $atf->getArtifactTypes();
31 if ($at_arr === false) {
32 exit_permission_denied('tracker');
35 use_javascript('/js/sortable.js');
39 if (!$at_arr || count($at_arr) < 1) {
40 echo '<p class="information">'._('No trackers have been set up, or you cannot view them.').'</p>';
42 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>');
46 plugin_hook ("blocks", "tracker index");
48 echo '<p>'._('Choose a tracker and you can browse/edit/add items to it.').'</p>';
51 Put the result set (list of trackers for this group) into a column with folders
53 $tablearr = array(_('Tracker'),_('Description'),_('Open'),_('Total'));
55 echo $HTML->listTableTop($tablearr, false, '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 <tr '. $HTML->boxGetAltRowStyle($j) . '>
65 <td><a href="'.util_make_uri('/tracker/?atid='.$at_arr[$j]->getID().'&group_id='.$group_id.'&func=browse').'">'.
66 html_image("ic/tracker20w.png","20","20").' '.
67 $at_arr[$j]->getName() .'</a>
69 <td>' . $at_arr[$j]->getDescription() .'
71 <td style="text-align:center">'. (int) $at_arr[$j]->getOpenCount() . '
73 <td style="text-align:center">'. (int) $at_arr[$j]->getTotalCount() .'
78 echo $HTML->listTableBottom();
85 // c-file-style: "bsd"