• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getItemTemplateContents函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getItemTemplateContents函数的典型用法代码示例。如果您正苦于以下问题:PHP getItemTemplateContents函数的具体用法?PHP getItemTemplateContents怎么用?PHP getItemTemplateContents使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getItemTemplateContents函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: renderGui

/**
 * manage GUI rendering
 *
 */
function renderGui(&$argsObj, $guiObj, $opObj, $templateCfg, $cfgObj, $edit_steps)
{
    $smartyObj = new TLSmarty();
    // need by webeditor loading logic present on inc_head.tpl
    $smartyObj->assign('editorType', $guiObj->editorType);
    $renderType = 'none';
    //
    // key: operation requested (normally received from GUI on doAction)
    // value: operation value to set on doAction HTML INPUT
    // This is useful when you use same template (example xxEdit.tpl), for create and edit.
    // When template is used for create -> operation: doCreate.
    // When template is used for edit -> operation: doUpdate.
    //
    // used to set value of: $guiObj->operation
    //
    $actionOperation = array('create' => 'doCreate', 'doCreate' => 'doCreate', 'edit' => 'doUpdate', 'delete' => 'doDelete', 'doDelete' => '', 'createStep' => 'doCreateStep', 'doCreateStep' => 'doCreateStep', 'doCopyStep' => 'doUpdateStep', 'editStep' => 'doUpdateStep', 'doUpdateStep' => 'doUpdateStep', 'doDeleteStep' => '', 'doReorderSteps' => '', 'doInsertStep' => 'doUpdateStep');
    $key2work = 'initWebEditorFromTemplate';
    $initWebEditorFromTemplate = property_exists($opObj, $key2work) ? $opObj->{$key2work} : false;
    $key2work = 'cleanUpWebEditor';
    $cleanUpWebEditor = property_exists($opObj, $key2work) ? $opObj->{$key2work} : false;
    $oWebEditor = createWebEditors($argsObj->basehref, $cfgObj->webEditorCfg, null, $edit_steps);
    foreach ($oWebEditor->cfg as $key => $value) {
        $of =& $oWebEditor->editor[$key];
        $rows = $oWebEditor->cfg[$key]['rows'];
        $cols = $oWebEditor->cfg[$key]['cols'];
        switch ($argsObj->doAction) {
            case "edit":
            case "delete":
            case "editStep":
                $initWebEditorFromTemplate = false;
                $of->Value = $argsObj->{$key};
                break;
            case "doCreate":
            case "doDelete":
            case "doCopyStep":
            case "doUpdateStep":
                $initWebEditorFromTemplate = false;
                $of->Value = $argsObj->{$key};
                break;
            case "create":
            case "doCreateStep":
            case "doInsertStep":
            default:
                $initWebEditorFromTemplate = true;
                break;
        }
        $guiObj->operation = $actionOperation[$argsObj->doAction];
        if ($initWebEditorFromTemplate) {
            $of->Value = getItemTemplateContents('testcase_template', $of->InstanceName, '');
        } else {
            if ($cleanUpWebEditor) {
                $of->Value = '';
            }
        }
        $smartyObj->assign($key, $of->CreateHTML($rows, $cols));
    }
    // manage tree refresh
    switch ($argsObj->doAction) {
        case "doDelete":
            $guiObj->refreshTree = $argsObj->refreshTree;
            break;
    }
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "delete":
        case "createStep":
        case "editStep":
        case "doCreate":
        case "doDelete":
        case "doCreateStep":
        case "doUpdateStep":
        case "doDeleteStep":
        case "doReorderSteps":
        case "doCopyStep":
        case "doInsertStep":
            $renderType = 'template';
            // Document !!!!
            $key2loop = get_object_vars($opObj);
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            new dBug($opObj);
            $tplDir = !isset($opObj->template_dir) || is_null($opObj->template_dir) ? $templateCfg->template_dir : $opObj->template_dir;
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tpl = $tplDir . $tpl;
            } else {
                $renderType = 'redirect';
            }
            break;
    }
    switch ($renderType) {
        case 'template':
//.........这里部分代码省略.........
开发者ID:moraesmv,项目名称:testlink-code,代码行数:101,代码来源:tcEdit.php


示例2: init_labels

            $labels = init_labels(array('active_integration' => null, 'inactive_integration' => null));
            for ($idx = 0; $idx < $loop2do; $idx++) {
                $gui->tprojects[$idx]['rmsstatusImg'] = '';
                if ($gui->tprojects[$idx]['rmsname'] != '') {
                    $ak = $gui->tprojects[$idx]['reqmgr_integration_enabled'] ? 'active' : 'inactive';
                    $gui->tprojects[$idx]['rmsstatusImg'] = ' <img title="' . $labels[$ak . '_integration'] . '" ' . ' alt="' . $labels[$ak . '_integration'] . '" ' . ' src="' . $imgSet[$ak] . '"/>';
                }
            }
        }
        $smarty->assign('gui', $gui);
        $smarty->display($templateCfg->template_dir . $template);
        break;
    case "ErrorOnAction":
    default:
        if ($args->doAction != "edit" && $args->doAction != "ErrorOnAction") {
            $of->Value = getItemTemplateContents('project_template', $of->InstanceName, $args->notes);
        } else {
            $of->Value = $args->notes;
        }
        foreach ($ui as $prop => $value) {
            $smarty->assign($prop, $value);
        }
        $smarty->assign('gui', $args);
        $smarty->assign('notes', $of->CreateHTML());
        $smarty->assign('user_feedback', $user_feedback);
        $smarty->assign('feedback_type', $feedback_type);
        $smarty->display($templateCfg->template_dir . $template);
        break;
}
/**
 * INITialize page ARGuments, using the $_REQUEST and $_SESSION
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:31,代码来源:projectEdit.php


示例3: templateConfiguration

$templateCfg = templateConfiguration();
$tplan_mgr = new testplan($db);
$tproject_mgr = new testproject($db);
$smarty = new TLSmarty();
$do_display = false;
$template = null;
$args = init_args($_REQUEST);
if (!$args->tproject_id) {
    $smarty->assign('title', lang_get('fatal_page_title'));
    $smarty->assign('content', lang_get('error_no_testprojects_present'));
    $smarty->display('workAreaSimple.tpl');
    exit;
}
$gui = initializeGui($db, $args, $editorCfg, $tproject_mgr);
$of = web_editor('notes', $_SESSION['basehref'], $editorCfg);
$of->Value = getItemTemplateContents('testplan_template', $of->InstanceName, $args->notes);
// Checks on testplan name, and testplan name<=>testplan id
if ($args->do_action == "do_create" || $args->do_action == "do_update") {
    $gui->testplan_name = $args->testplan_name;
    $name_exists = $tproject_mgr->check_tplan_name_existence($args->tproject_id, $args->testplan_name);
    $name_id_rel_ok = isset($gui->tplans[$args->tplan_id]) && $gui->tplans[$args->tplan_id]['name'] == $args->testplan_name;
}
// interface changes to be able to do not loose CF values if some problem arise on User Interface
$gui->cfields = $tplan_mgr->html_table_of_custom_field_inputs($args->tplan_id, $args->tproject_id, 'design', '', $_REQUEST);
switch ($args->do_action) {
    case 'fileUpload':
        fileUploadManagement($db, $args->tplan_id, $args->fileTitle, $tplan_mgr->getAttachmentTableName());
        getItemData($tplan_mgr, $gui, $of, $args->tplan_id, true);
        break;
    case 'deleteFile':
        deleteAttachment($db, $args->file_id);
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:planEdit.php


示例4: _initializeWebEditors

 private function _initializeWebEditors($WebEditors, $itemTemplateCfgKey)
 {
     $wdata = array();
     foreach ($WebEditors as $key => $html_name) {
         $wdata[$html_name] = getItemTemplateContents($itemTemplateCfgKey, $html_name, '');
     }
     return $wdata;
 }
开发者ID:tamtrong,项目名称:testlink,代码行数:8,代码来源:testsuite.class.php


示例5: createExecNotesWebEditor

function createExecNotesWebEditor(&$tcversions, $basehref, $editorCfg)
{
    if (is_null($tcversions) || count($tcversions) == 0) {
        return null;
        // nothing todo >>>------> bye!
    }
    // Important Notice:
    //
    // When using tinymce or none as web editor, we need to set rows and cols
    // to appropriate values, to avoid an ugly ui.
    // null => use default values defined on editor class file
    //
    // Rows and Cols values are useless for FCKeditor.
    //
    $itemTemplateValue = getItemTemplateContents('execution_template', 'notes', null);
    foreach ($tcversions as $key => $tcv) {
        $tcversion_id = $tcv['id'];
        $tcase_id = $tcv['testcase_id'];
        $of = web_editor("notes[{$tcversion_id}]", $basehref, $editorCfg);
        $of->Value = $itemTemplateValue;
        // Magic numbers that can be determined by trial and error
        $editors[$tcase_id] = $of->CreateHTML(10, 60);
        unset($of);
    }
    return $editors;
}
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:26,代码来源:execSetResults.php


示例6: renderGui

/**
 * renderGui
 *
 */
function renderGui(&$argsObj, $guiObj, $opObj, $templateCfg, $editorCfg)
{
    $smartyObj = new TLSmarty();
    $renderType = 'none';
    $tpl = $tpd = null;
    $actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doDelete' => '', 'doReorder' => '', 'reorder' => '', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate', 'createChild' => 'doCreate', 'copy' => 'doCopy', 'doCopy' => 'doCopy', 'copyRequirements' => 'doCopyRequirements', 'doCopyRequirements' => 'doCopyRequirements');
    $owebEditor = web_editor('scope', $argsObj->basehref, $editorCfg);
    switch ($argsObj->doAction) {
        case "edit":
        case "doCreate":
            $owebEditor->Value = $argsObj->scope;
            break;
        default:
            $owebEditor->Value = getItemTemplateContents('req_spec_template', $owebEditor->InstanceName, $argsObj->scope);
            break;
    }
    $guiObj->scope = $owebEditor->CreateHTML();
    $guiObj->editorType = $editorCfg['type'];
    // 20100808 - aismon - added logic to refresh filtered tree on action
    switch ($argsObj->doAction) {
        case "doCreate":
        case "doUpdate":
        case "doCopyRequirements":
        case "doCopy":
        case "doDelete":
            $guiObj->refreshTree = $argsObj->refreshTree;
            break;
    }
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "createChild":
        case "reorder":
        case "doDelete":
        case "doReorder":
        case "doCreate":
        case "doUpdate":
        case "copyRequirements":
        case "doCopyRequirements":
        case "copy":
        case "doCopy":
            $renderType = 'template';
            $key2loop = get_object_vars($opObj);
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $tpd = isset($key2loop['template_dir']) ? $opObj->template_dir : $templateCfg->template_dir;
            break;
    }
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "createChild":
        case "reorder":
        case "doDelete":
        case "doReorder":
        case "copyRequirements":
        case "copy":
            $tpl = $tpd . $tpl;
            break;
        case "doCreate":
        case "doUpdate":
        case "doCopyRequirements":
        case "doCopy":
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tpl = $templateCfg->template_dir . $tpl;
            } else {
                $renderType = 'redirect';
            }
            break;
    }
    switch ($renderType) {
        case 'template':
            $smartyObj->assign('mgt_view_events', has_rights($db, "mgt_view_events"));
            $smartyObj->assign('gui', $guiObj);
            $smartyObj->display($tpl);
            break;
        case 'redirect':
            header("Location: {$tpl}");
            exit;
            break;
        default:
            break;
    }
}
开发者ID:tamtrong,项目名称:testlink,代码行数:92,代码来源:reqSpecEdit.php


示例7: initWebEditors

/**
 *
 *
 */
function initWebEditors(&$guiObj, $cfgObj, $baseHREF)
{
    if ($guiObj->can_use_bulk_op) {
        //$guiObj->execStatusValues=createResultsMenu();
        //if( isset($guiObj->execStatusValues[$cfgObj->tc_status['all']]) )
        //{
        //    unset($guiObj->execStatusValues[$cfgObj->tc_status['all']]);
        //}
        $of = web_editor("bulk_exec_notes", $baseHREF, $cfgObj->editorCfg);
        $of->Value = getItemTemplateContents('execution_template', $of->InstanceName, null);
        // Magic numbers that can be determined by trial and error
        $guiObj->bulk_exec_notes_editor = $of->CreateHTML(10, 60);
        unset($of);
    } else {
        $guiObj->exec_notes_editors = createExecNotesWebEditor($guiObj->map_last_exec, $baseHREF, $cfgObj->editorCfg);
    }
}
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:21,代码来源:execSetResults.php


示例8: setUpForBulkExec

function setUpForBulkExec($guiObj)
{
    $guiObj->execStatusValues = testcase::createExecutionResultsMenu();
    if (isset($guiObj->execStatusValues[$guiObj->cfg->tc_status['all']])) {
        unset($guiObj->execStatusValues[$guiObj->cfg->tc_status['all']]);
    }
    $of = web_editor("bulk_exec_notes", $_SESSION['basehref'], $guiObj->cfg->editorCfg);
    $of->Value = getItemTemplateContents('execution_template', $of->InstanceName, null);
    // Magic numbers that can be determined by trial and error
    $guiObj->bulk_exec_notes_editor = $of->CreateHTML(10, 60);
    unset($of);
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:12,代码来源:execSetResults.php


示例9: getWebEditorCfg

 * 
**/
require_once "../../config.inc.php";
require_once "common.php";
require_once "users.inc.php";
require_once "web_editor.php";
$editorCfg = getWebEditorCfg('role');
require_once require_web_editor($editorCfg['type']);
testlinkInitPage($db, false, false, "checkRights");
init_global_rights_maps();
$templateCfg = templateConfiguration();
$args = init_args();
$gui = initialize_gui($args, $editorCfg['type']);
$op = initialize_op();
$owebeditor = web_editor('notes', $args->basehref, $editorCfg);
$owebeditor->Value = getItemTemplateContents('role_template', $owebeditor->InstanceName, null);
$canManage = $args->user->hasRight($db, "role_management") ? true : false;
switch ($args->doAction) {
    case 'create':
        break;
    case 'edit':
        $op->role = tlRole::getByID($db, $args->roleid);
        break;
    case 'doCreate':
    case 'doUpdate':
    case 'duplicate':
        if ($canManage) {
            $op = doOperation($db, $args, $args->doAction);
            $templateCfg->template = $op->template;
        }
        break;
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:rolesEdit.php


示例10: renderGui

/**
 * 
 *
 */
function renderGui(&$argsObj, $guiObj, $opObj, $templateCfg, $editorCfg, &$dbHandler)
{
    $smartyObj = new TLSmarty();
    $renderType = 'none';
    // @TODO document
    $actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doDelete' => '', 'doReorder' => '', 'reorder' => '', 'createTestCases' => 'doCreateTestCases', 'doCreateTestCases' => 'doCreateTestCases', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate', 'copy' => 'doCopy', 'doCopy' => 'doCopy', 'doCreateVersion' => 'doCreateVersion', 'doCreateRevision' => 'doCreateRevision', 'doDeleteVersion' => '', 'doFreezeVersion' => 'doFreezeVersion', 'doAddRelation' => 'doAddRelation', 'doDeleteRelation' => 'doDeleteRelation');
    $owebEditor = web_editor('scope', $argsObj->basehref, $editorCfg);
    switch ($argsObj->doAction) {
        case "edit":
        case "doCreate":
            $owebEditor->Value = $argsObj->scope;
            break;
        default:
            if ($opObj->suggest_revision || $opObj->prompt_for_log) {
                $owebEditor->Value = $argsObj->scope;
            } else {
                $owebEditor->Value = getItemTemplateContents('requirement_template', $owebEditor->InstanceName, $argsObj->scope);
            }
            break;
    }
    $guiObj->askForRevision = $opObj->suggest_revision ? 1 : 0;
    $guiObj->askForLog = $opObj->prompt_for_log ? 1 : 0;
    $guiObj->scope = $owebEditor->CreateHTML();
    $guiObj->editorType = $editorCfg['type'];
    switch ($argsObj->doAction) {
        case "doDelete":
            $guiObj->refreshTree = 1;
            // has to be forced
            break;
        case "doCreate":
            $guiObj->refreshTree = $argsObj->refreshTree;
            break;
        case "doUpdate":
            // IMPORTANT NOTICE
            // we do not set tree refresh here, because on this situation
            // tree update has to be done when reqView page is called.
            // If we ask for tree refresh here we are going to do double refresh (useless and time consuming)
            break;
    }
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "reorder":
        case "doDelete":
        case "doReorder":
        case "createTestCases":
        case "doCreateTestCases":
        case "doCreate":
        case "doFreezeVersion":
        case "doUpdate":
        case "copy":
        case "doCopy":
        case "doCreateVersion":
        case "doDeleteVersion":
        case "doAddRelation":
        case "doDeleteRelation":
        case "doCreateRevision":
            $renderType = 'template';
            $key2loop = get_object_vars($opObj);
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            // exceptions
            $guiObj->askForRevision = $opObj->suggest_revision ? 1 : 0;
            $guiObj->askForLog = $opObj->prompt_for_log ? 1 : 0;
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            $tplDir = !isset($opObj->template_dir) || is_null($opObj->template_dir) ? $templateCfg->template_dir : $opObj->template_dir;
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tpl = $tplDir . $tpl;
            } else {
                $renderType = 'redirect';
            }
            break;
    }
    $req_mgr = new requirement_mgr($dbHandler);
    $guiObj->last_doc_id = $req_mgr->get_last_doc_id_for_testproject($argsObj->tproject_id);
    $guiObj->doAction = $argsObj->doAction;
    switch ($renderType) {
        case 'template':
            $smartyObj->assign('gui', $guiObj);
            $smartyObj->display($tpl);
            break;
        case 'redirect':
            header("Location: {$tpl}");
            exit;
            break;
        default:
            break;
    }
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:96,代码来源:reqEdit.php


示例11: renderGui

/**
 * 
 *
 */
function renderGui(&$argsObj, $guiObj, $opObj, $templateCfg, $editorCfg, &$dbHandler)
{
    $smartyObj = new TLSmarty();
    $renderType = 'none';
    // @TODO document
    $actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doDelete' => '', 'doReorder' => '', 'reorder' => '', 'createTestCases' => 'doCreateTestCases', 'doCreateTestCases' => 'doCreateTestCases', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate', 'copy' => 'doCopy', 'doCopy' => 'doCopy', 'doCreateVersion' => 'doCreateVersion', 'doDeleteVersion' => '', 'doFreezeVersion' => 'doFreezeVersion', 'doAddRelation' => 'doAddRelation', 'doDeleteRelation' => 'doDeleteRelation');
    $owebEditor = web_editor('scope', $argsObj->basehref, $editorCfg);
    switch ($argsObj->doAction) {
        case "edit":
        case "doCreate":
            $owebEditor->Value = $argsObj->scope;
            break;
        default:
            $owebEditor->Value = getItemTemplateContents('requirement_template', $owebEditor->InstanceName, $argsObj->scope);
            break;
    }
    $guiObj->scope = $owebEditor->CreateHTML();
    $guiObj->editorType = $editorCfg['type'];
    // 20100808 - aismon - added logic to refresh filtered tree on action
    switch ($argsObj->doAction) {
        case "doDelete":
        case "doCreate":
            $guiObj->refreshTree = $argsObj->refreshTree;
            break;
    }
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "reorder":
        case "doDelete":
        case "doReorder":
        case "createTestCases":
        case "doCreateTestCases":
        case "doCreate":
        case "doFreezeVersion":
        case "doUpdate":
        case "copy":
        case "doCopy":
        case "doCreateVersion":
        case "doDeleteVersion":
            // BUGID 1748
        // BUGID 1748
        case "doAddRelation":
        case "doDeleteRelation":
            $renderType = 'template';
            $key2loop = get_object_vars($opObj);
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            $tplDir = !isset($opObj->template_dir) || is_null($opObj->template_dir) ? $templateCfg->template_dir : $opObj->template_dir;
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tpl = $tplDir . $tpl;
            } else {
                $renderType = 'redirect';
            }
            break;
    }
    $req_mgr = new requirement_mgr($dbHandler);
    $guiObj->last_doc_id = $req_mgr->get_last_doc_id_for_testproject($argsObj->tproject_id);
    $guiObj->doAction = $argsObj->doAction;
    switch ($renderType) {
        case 'template':
            $smartyObj->assign('gui', $guiObj);
            $smartyObj->display($tpl);
            break;
        case 'redirect':
            header("Location: {$tpl}");
            exit;
            break;
        default:
            break;
    }
}
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:80,代码来源:reqEdit.php


示例12: renderGui

/**
 * renderGui
 *
 */
function renderGui(&$argsObj, $guiObj, $opObj, $templateCfg, $editorCfg)
{
    $smartyObj = new TLSmarty();
    $renderType = 'none';
    $tpl = $tpd = null;
    $actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doDelete' => '', 'doReorder' => '', 'reorder' => '', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate', 'createChild' => 'doCreate', 'copy' => 'doCopy', 'doCopy' => 'doCopy', 'doFreeze' => 'doFreeze', 'copyRequirements' => 'doCopyRequirements', 'doCopyRequirements' => 'doCopyRequirements', 'doCreateRevision' => 'doCreateRevision');
    // ------------------------------------------------------------------------------------------------
    // Web Editor Processing
    $owebEditor = web_editor('scope', $argsObj->basehref, $editorCfg);
    switch ($argsObj->doAction) {
        case "edit":
        case "doCreate":
            $owebEditor->Value = $argsObj->scope;
            break;
        default:
            // TICKET 4661
            if ($opObj->askForRevision || $opObj->askForLog || !$opObj->action_status_ok) {
                $owebEditor->Value = $argsObj->scope;
            } else {
                $owebEditor->Value = getItemTemplateContents('req_spec_template', $owebEditor->InstanceName, $argsObj->scope);
            }
            break;
    }
    $guiObj->scope = $owebEditor->CreateHTML();
    $guiObj->editorType = $editorCfg['type'];
    // Tree refresh Processing
    switch ($argsObj->doAction) {
        case "doCreate":
        case "doUpdate":
        case "doCopyRequirements":
        case "doCopy":
        case "doFreeze":
        case "doDelete":
            $guiObj->refreshTree = $argsObj->refreshTree;
            break;
    }
    // GUI rendering Processing
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "createChild":
        case "reorder":
        case "doDelete":
        case "doReorder":
        case "doCreate":
        case "doUpdate":
        case "copyRequirements":
        case "doCopyRequirements":
        case "copy":
        case "doCopy":
        case "doFreeze":
        case "doCreateRevision":
            $renderType = 'template';
            $key2loop = get_object_vars($opObj);
            if ($opObj->action_status_ok == false) {
                // Remember that scope normally is a WebRichEditor, and that
                // we have already processed WebRichEditor
                // Need to understand if remove of scope key can be done always
                // no matter action_status_ok
                unset($key2loop['scope']);
            }
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $tpd = isset($key2loop['template_dir']) ? $opObj->template_dir : $templateCfg->template_dir;
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tpl = $tpd . $tpl;
            } else {
                $renderType = 'redirect';
            }
            break;
    }
    switch ($renderType) {
        case 'template':
            $smartyObj->assign('mgt_view_events', $argsObj->user->hasRights($db, "mgt_view_events"));
            $smartyObj->assign('gui', $guiObj);
            $smartyObj->display($tpl);
            break;
        case 'redirect':
            header("Location: {$tpl}");
            exit;
            break;
        default:
            echo '$argsObj->doAction:' . $argsObj->doAction . ' Can not process RENDERING!!!';
            break;
    }
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:94,代码来源:reqSpecEdit.php


示例13: initWebEditors

/**
 *
 *
 */
function initWebEditors(&$guiObj, $cfgObj, $baseHREF)
{
    if ($guiObj->can_use_bulk_op) {
        $of = web_editor("bulk_exec_notes", $baseHREF, $cfgObj->editorCfg);
        $of->Value = getItemTemplateContents('execution_template', $of->InstanceName, null);
        // Magic numbers that can be determined by trial and error
        $cols = intval(isset($editorCfg['cols']) ? $cfgObj->editorCfg['cols'] : 60);
        $rows = intval(isset($editorCfg['rows']) ? $cfgObj->editorCfg['rows'] : 10);
        $guiObj->bulk_exec_notes_editor = $of->CreateHTML($rows, $cols);
        unset($of);
    } else {
        $guiObj->exec_notes_editors = createExecNotesWebEditor($guiObj->map_last_exec, $baseHREF, $cfgObj->editorCfg);
    }
}
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:18,代码来源:execSetResults.php



注:本文中的getItemTemplateContents函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getItemTypeForTable函数代码示例发布时间:2022-05-15
下一篇:
PHP getItemForItemtype函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap