예제 #1
0
function initialize_gui(&$dbHandler, &$argsObj)
{
    $manager = new milestone_mgr($dbHandler);
    $gui = new stdClass();
    $gui->user_feedback = null;
    $gui->main_descr = lang_get('title_milestones') . $argsObj->tplan_name;
    $gui->action_descr = null;
    $gui->tplan_name = $argsObj->tplan_name;
    $gui->tplan_id = $argsObj->tplan_id;
    $gui->items = $manager->get_all_by_testplan($argsObj->tplan_id);
    $gui->grants = new stdClass();
    $gui->grants->milestone_mgmt = has_rights($dbHandler, "testplan_planning");
    $gui->grants->mgt_view_events = has_rights($dbHandler, "mgt_view_events");
    return $gui;
}
예제 #2
0
function initialize_gui(&$dbHandler, &$userObj, &$argsObj)
{
    $manager = new milestone_mgr($dbHandler);
    $gui = new stdClass();
    $gui->user_feedback = null;
    $gui->main_descr = lang_get('title_milestones') . " " . $argsObj->tplan_name;
    $gui->action_descr = null;
    $gui->tproject_options = $argsObj->tproject_options;
    $gui->tplan_name = $argsObj->tplan_name;
    $gui->tplan_id = $argsObj->tplan_id;
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->tproject_id = $argsObj->tproject_id;
    $gui->items = $manager->get_all_by_testplan($argsObj->tplan_id);
    $gui->grants = new stdClass();
    $gui->grants->milestone_mgmt = $userObj->hasRight($dbHandler, "testplan_planning", $gui->tproject_id, $gui->tplan_id);
    $gui->grants->mgt_view_events = $userObj->hasRight($dbHandler, "mgt_view_events", $gui->tproject_id, $gui->tplan_id);
    $manager = "lib/plan/planMilestonesEdit.php?tproject_id={$gui->tproject_id}" . "&tplan_id={$gui->tplan_id}&doAction=";
    $gui->actions = new stdClass();
    $gui->actions->edit = $manager . 'edit';
    $gui->actions->delete = $manager . 'doDelete&id=';
    $gui->actions->create = $manager . "create";
    return $gui;
}