5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
7 * Copyright 2012, 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 use_javascript('/js/sortable.js');
43 if (!$at_arr || count($at_arr) < 1) {
44 echo '<p class="information">'._('No trackers have been set up, or you cannot view them.').'</p>';
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>');
50 plugin_hook ("blocks", "tracker index");
52 echo '<p>'._('Choose a tracker and you can browse/edit/add items to it.').'</p>';
55 Put the result set (list of trackers for this group) into a column with folders
57 $tablearr = array(_('Tracker'),_('Description'),_('Open'),_('Total'));
59 echo $HTML->listTableTop($tablearr, false, 'full sortable_table_tracker', 'sortable_table_tracker');
61 for ($j = 0; $j < count($at_arr); $j++) {
62 if (!is_object($at_arr[$j])) {
64 } elseif ($at_arr[$j]->isError()) {
65 echo $at_arr[$j]->getErrorMessage();
68 <tr '. $HTML->boxGetAltRowStyle($j) . '>
69 <td><a href="'.util_make_uri('/tracker/?atid='.$at_arr[$j]->getID().'&group_id='.$group_id.'&func=browse').'">'.
70 html_image("ic/tracker20w.png","20","20").' '.
71 $at_arr[$j]->getName() .'</a>
73 <td>' . $at_arr[$j]->getDescription() .'
75 <td class="align-center">'. (int) $at_arr[$j]->getOpenCount() . '
77 <td class="align-center">'. (int) $at_arr[$j]->getTotalCount() .'
82 echo $HTML->listTableBottom();
89 // c-file-style: "bsd"