Exemple #1
0
';
/*
	Show the options that this project is using
*/
echo '
<HR>
<TABLE width="100%" cellspacing=0 cellpadding=3 border=0>';
$title_arr = array();
$title_arr[] = $Language->getText('project_admin_editservice', 's_label');
if ($project->isTemplate()) {
    $title_arr[] = $Language->getText('project_admin_editservice', 'conf_inherited');
}
if ($group_id == 100) {
    $title_arr[] = $Language->getText('project_admin_servicebar', 'availability');
}
$title_arr[] = $Language->getText('global', 'status');
if ($group_id == 100) {
    $title_arr[] = $Language->getText('project_admin_editservice', 'scope');
}
$title_arr[] = $Language->getText('project_admin_servicebar', 'rank_on_screen');
$title_arr[] = $Language->getText('project_admin_servicebar', 'del?');
echo html_build_list_table_top($title_arr);
$allowed_services = $service_manager->getListOfAllowedServicesForProject($project);
$row_num = 0;
foreach ($allowed_services as $service) {
    display_service_row($group_id, $service->getId(), $service->getLabel(), $service->getShortName(), $service->getDescription(), $service->isActive(), $service->isUsed(), $service->getScope(), $service->getRank(), $row_num, $is_superuser, $project->isTemplate());
}
echo '
</TABLE>
';
project_admin_footer(array());
Exemple #2
0
if ($project->isTemplate()) {
    $title_arr[] = $Language->getText('project_admin_editservice', 'conf_inherited');
}
if ($group_id == 100) {
    $title_arr[] = $Language->getText('project_admin_servicebar', 'availability');
}
$title_arr[] = $Language->getText('global', 'status');
if ($group_id == 100) {
    $title_arr[] = $Language->getText('project_admin_editservice', 'scope');
}
$title_arr[] = $Language->getText('project_admin_servicebar', 'rank_on_screen');
$title_arr[] = $Language->getText('project_admin_servicebar', 'del?');
echo html_build_list_table_top($title_arr);
$result = db_query("SELECT * FROM service WHERE group_id={$group_id} ORDER BY rank");
if (db_numrows($result) < 1) {
    exit_no_group();
}
$row_num = 0;
while ($serv = db_fetch_array($result)) {
    $classname = $project->getServiceClassName($serv['short_name']);
    try {
        $s = new $classname($project, $serv);
        display_service_row($group_id, $serv['service_id'], $serv['label'], $serv['short_name'], $serv['description'], $serv['is_active'], $serv['is_used'], $serv['scope'], $serv['rank'], $row_num, $is_superuser, $project->isTemplate());
    } catch (ServiceNotAllowedForProjectException $e) {
        //don't display the row for this servce
    }
}
echo '
</TABLE>
';
project_admin_footer(array());