1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
<?php
//
// get the Group object
//
$group =& group_get_object($group_id);
if (!$group || !is_object($group) || $group->isError()) {
exit_no_group();
}
$atf = new ArtifactTypeFactory($group);
if (!$group || !is_object($group) || $group->isError()) {
exit_error('Error','Could Not Get ArtifactTypeFactory');
}
$at_arr =& $atf->getArtifactTypes();
//required params for site_project_header();
$params['group']=$group_id;
$params['toptab']='tracker';
echo site_project_header($params);
if (!$at_arr || count($at_arr) < 1) {
echo "<h1>".$Language->getText('tracker','no_trackers')."</h1>";
echo "<p><strong>".$Language->getText('tracker','no_trackers_text',array('<a href="/tracker/admin/?group_id='.$group_id.'">','</a>'))."</strong>";
} else {
echo '<p>'.$Language->getText('tracker', 'choose').'<p>';
/*
Put the result set (list of trackers for this group) into a column with folders
*/
$tablearr=array($Language->getText('group','short_tracker'),$Language->getText('tracker_admin_update_type','description'),$Language->getText('general','open'),$Language->getText('general','total'));
echo $HTML->listTableTop($tablearr);
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 '
<tr '. $HTML->boxGetAltRowStyle($j) . '>
<td><a href="/tracker/?atid='.$at_arr[$j]->getID().'&group_id='.$group_id.'&func=browse">'.
html_image("ic/tracker20w.png","20","20",array("border"=>"0")).' '.
$at_arr[$j]->getName() .'</a>
</td>
<td>' . $at_arr[$j]->getDescription() .'
</td>
<td align="center">'. (int) $at_arr[$j]->getOpenCount() . '
</td>
<td align="center">'. (int) $at_arr[$j]->getTotalCount() .'
</td>
</tr>';
}
}
echo $HTML->listTableBottom();
}
echo site_project_footer(array());
?>
|