isError()) { exit_error(_('Could Not Get ArtifactTypeFactory'),'tracker'); } $at_arr = $atf->getArtifactTypes(); if ($at_arr === false) { exit_permission_denied('tracker'); } use_javascript('/js/sortable.js'); //required params for site_project_header(); $params['group']=$group_id; $params['title']=sprintf(_('Trackers for %1$s'), $group->getPublicName()); $params['toptab']='tracker'; if (forge_check_perm('tracker_admin', $group_id)) { $menu_text = array(); $menu_links = array(); $menu_text[] = _('Administration'); $menu_links[] = '/tracker/admin/?group_id='.$group_id; $menu_attr[] = array('title' => _('Global administration for trackers. Create, clone, workflow, fields ...'), 'class' => 'tabtitle-nw'); echo $HTML->subMenu($menu_text, $menu_links, $menu_attr); } $atf->header(); if (!$at_arr || count($at_arr) < 1) { echo '
'._('No Accessible Trackers Found').'
'; printf(_('

No trackers have been set up, or you cannot view them.

The Admin for this project will have to set up data types using the %1$s admin page %2$s

'), '', ''); } else { plugin_hook ("blocks", "tracker index"); echo '

'._('Choose a tracker and you can browse/edit/add items to it.').'

'; /* Put the result set (list of trackers for this group) into a column with folders */ $tablearr = array(_('Tracker'),_('Description'),_('Open'),_('Total')); echo $HTML->listTableTop($tablearr, false, 'sortable_table_tracker', 'sortable_table_tracker'); for ($j = 0; $j < count($at_arr); $j++) { if (!is_object($at_arr[$j])) { //just skip it } elseif ($at_arr[$j]->isError()) { echo $at_arr[$j]->getErrorMessage(); } else { echo ' '. html_image("ic/tracker20w.png","20","20").'  '. $at_arr[$j]->getName() .' ' . $at_arr[$j]->getDescription() .' '. (int) $at_arr[$j]->getOpenCount() . ' '. (int) $at_arr[$j]->getTotalCount() .' '; } } echo $HTML->listTableBottom(); } $atf->footer(); // Local Variables: // mode: php // c-file-style: "bsd" // End: ?>