/** * * */ function initialize_gui(&$dbHandler, $argsObj) { $tproject_mgr = new testproject($dbHandler); $itemMgr = new requirement_spec_mgr($dbHandler); $commandMgr = new reqSpecCommands($dbHandler); $gui = $commandMgr->initGuiBean(); $gui->itemCfg = config_get('req_spec_cfg'); $gui->tproject_name = $argsObj->tproject_name; $gui->grants = new stdClass(); $gui->grants->req_mgmt = $argsObj->hasRight($dbHandler, "mgt_modify_req", $argsObj->tproject_id); $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id); $gui->glueChar = config_get('testcase_cfg')->glue_character; $gui->pieceSep = config_get('gui_title_separator_1'); $gui->item_id = $argsObj->item_id; $info = $itemMgr->getRevisionByID($gui->item_id, array('decode_user' => true)); $gui->item = $info; $gui->cfields = $itemMgr->html_table_of_custom_field_values(null, $gui->item_id, $argsObj->tproject_id); $gui->show_title = false; $gui->main_descr = lang_get('req_spec') . $gui->pieceSep . $gui->item['name']; $gui->showContextInfo = $argsObj->showContextInfo; if ($gui->showContextInfo) { $gui->parent_descr = lang_get('req_spec_short') . $gui->pieceSep . $gui->item['name']; } $gui->itemSpecStatus = null; $gui->itemTypeDomain = init_labels($gui->itemCfg->type_labels); return $gui; }
/** * * */ function initialize_gui(&$dbHandler, &$argsObj) { $req_spec_mgr = new requirement_spec_mgr($dbHandler); $tproject_mgr = new testproject($dbHandler); $commandMgr = new reqSpecCommands($dbHandler); $gui = $commandMgr->initGuiBean(); $gui->req_spec_cfg = config_get('req_spec_cfg'); $gui->req_cfg = config_get('req_cfg'); // 20100810 - asimon - BUGID 3317: disabled total count of requirements by default $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0; $gui->grants = new stdClass(); $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req"); $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id); $gui->req_spec_id = $argsObj->req_spec_id; $gui->tproject_name = $argsObj->tproject_name; $gui->name = $gui->req_spec['title']; $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title']; $gui->refresh_tree = 'no'; $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($argsObj->req_spec_id, $argsObj->tproject_id); $gui->attachments = getAttachmentInfosFrom($req_spec_mgr, $argsObj->req_spec_id); $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id); $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels); /* contribution BUGID 2999, show direct link */ $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id); $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']); return $gui; }
/** * * */ function initialize_gui(&$dbHandler, &$argsObj) { $req_spec_mgr = new requirement_spec_mgr($dbHandler); $tproject_mgr = new testproject($dbHandler); $commandMgr = new reqSpecCommands($dbHandler); $gui = $commandMgr->initGuiBean(); $gui->refreshTree = $argsObj->refreshTree; $gui->req_spec_cfg = config_get('req_spec_cfg'); $gui->req_cfg = config_get('req_cfg'); $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0; $gui->grants = new stdClass(); $gui->grants->req_mgmt = $argsObj->user->hasRight($dbHandler, "mgt_modify_req", $argsObj->tproject_id); $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id); $gui->revCount = $req_spec_mgr->getRevisionsCount($argsObj->req_spec_id); $gui->req_spec_id = $argsObj->req_spec_id; $gui->parentID = $argsObj->req_spec_id; $gui->req_spec_revision_id = $gui->req_spec['revision_id']; $gui->name = $gui->req_spec['title']; $gui->tproject_id = $argsObj->tproject_id; $gui->tproject_name = $argsObj->tproject_name; $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title']; $gui->refresh_tree = 'no'; $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($argsObj->req_spec_id, $gui->req_spec_revision_id, $argsObj->tproject_id); $gui->attachments = $req_spec_mgr->getAttachmentInfos($argsObj->req_spec_id); $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id); $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels); $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id); $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']); $gui->actions = initializeActions($gui); return $gui; }
/** * * */ function initialize_gui(&$dbHandler, &$argsObj) { $req_spec_mgr = new requirement_spec_mgr($dbHandler); $tproject_mgr = new testproject($dbHandler); $commandMgr = new reqSpecCommands($dbHandler, $argsObj->tproject_id); $gui = $commandMgr->initGuiBean(); $gui->refreshTree = $argsObj->refreshTree; $gui->req_spec_cfg = config_get('req_spec_cfg'); $gui->req_cfg = config_get('req_cfg'); $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0; $gui->grants = new stdClass(); $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req"); $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id); $gui->revCount = $req_spec_mgr->getRevisionsCount($argsObj->req_spec_id); $gui->req_spec_id = intval($argsObj->req_spec_id); $gui->parentID = $argsObj->req_spec_id; $gui->req_spec_revision_id = $gui->req_spec['revision_id']; $gui->name = $gui->req_spec['title']; $gui->tproject_name = $argsObj->tproject_name; $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title']; $gui->refresh_tree = 'no'; $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($gui->req_spec_id, $gui->req_spec_revision_id, $argsObj->tproject_id); $gui->attachments = getAttachmentInfosFrom($req_spec_mgr, $argsObj->req_spec_id); $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id); $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels); $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id); $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']); $gui->fileUploadURL = $_SESSION['basehref'] . $req_spec_mgr->getFileUploadRelativeURL($gui->req_spec_id); $gui->delAttachmentURL = $_SESSION['basehref'] . $req_spec_mgr->getDeleteAttachmentRelativeURL($gui->req_spec_id); $gui->fileUploadMsg = ''; $gui->import_limit = TL_REPOSITORY_MAXFILESIZE; $gui->btn_import_req_spec = ''; $gui->reqMgrSystemEnabled = 0; if (!is_null($reqMgrSystem = $commandMgr->getReqMgrSystem())) { $gui->btn_import_req_spec = sprintf(lang_get('importViaAPI'), $reqMgrSystem['reqmgrsystem_name']); $gui->reqMgrSystemEnabled = 1; } return $gui; }
* @internal revisions * @since 1.9.8 * */ require_once "../../config.inc.php"; require_once "common.php"; require_once 'exttable.class.php'; testlinkInitPage($db); $templateCfg = templateConfiguration(); $tpl = 'reqSpecSearchResults.tpl'; $tproject_mgr = new testproject($db); $req_cfg = config_get('req_cfg'); $charset = config_get('charset'); $args = init_args(); $commandMgr = new reqSpecCommands($db, $args->tprojectID); $gui = $commandMgr->initGuiBean(); $edit_label = lang_get('requirement_spec'); $edit_icon = TL_THEME_IMG_DIR . "edit_icon.png"; $gui->main_descr = lang_get('caption_search_form_req_spec'); $gui->warning_msg = ''; $gui->path_info = null; $gui->resultSet = null; $gui->tableSet = null; $itemSet = null; if ($args->tprojectID) { $tables = tlObjectWithDB::getDBTables(array('cfield_design_values', 'nodes_hierarchy', 'req_specs', 'req_specs_revisions')); $filter = null; $join = null; // we use same approach used on requirements search => search on revisions if ($args->requirement_document_id) { $id = $db->prepare_string($args->requirement_document_id);