diff --git a/config/config.php b/config/config.php
index 0d7871a2a1..f9404b042d 100644
--- a/config/config.php
+++ b/config/config.php
@@ -195,7 +195,7 @@ $config->objectTables['todo'] = TABLE_TODO;
$config->objectTables['custom'] = TABLE_LANG;
$config->objectTables['branch'] = TABLE_BRANCH;
$config->objectTables['module'] = TABLE_MODULE;
-$config->objectTables['testlib'] = TABLE_TESTSUITE;
+$config->objectTables['caselib'] = TABLE_TESTSUITE;
/* Include extension config files. */
$extConfigFiles = glob($configRoot . 'ext/*.php');
diff --git a/module/action/config.php b/module/action/config.php
index 73e54fb298..99d917c4bb 100755
--- a/module/action/config.php
+++ b/module/action/config.php
@@ -17,7 +17,7 @@ $config->action->objectNameFields['todo'] = 'name';
$config->action->objectNameFields['branch'] = 'name';
$config->action->objectNameFields['module'] = 'name';
$config->action->objectNameFields['testsuite'] = 'name';
-$config->action->objectNameFields['testlib'] = 'name';
+$config->action->objectNameFields['caselib'] = 'name';
$config->action->objectNameFields['testreport'] = 'title';
$config->action->commonImgSize = 870;
diff --git a/module/action/lang/en.php b/module/action/lang/en.php
index ac0911370a..57622d63d4 100755
--- a/module/action/lang/en.php
+++ b/module/action/lang/en.php
@@ -62,7 +62,7 @@ $lang->action->objectTypes['todo'] = 'To-Dos';
$lang->action->objectTypes['branch'] = 'Branch';
$lang->action->objectTypes['module'] = 'Module';
$lang->action->objectTypes['testsuite'] = 'Suite';
-$lang->action->objectTypes['testlib'] = 'Library';
+$lang->action->objectTypes['caselib'] = 'Library';
$lang->action->objectTypes['testreport'] = 'Report';
/* 用来描述操作历史记录。*/
@@ -200,7 +200,7 @@ $lang->action->search->objectTypeList['release'] = 'Release';
$lang->action->search->objectTypeList['productplan'] = 'Plan';
$lang->action->search->objectTypeList['branch'] = 'Branch';
$lang->action->search->objectTypeList['testsuite'] = 'Suite';
-$lang->action->search->objectTypeList['testlib'] = 'Library';
+$lang->action->search->objectTypeList['caselib'] = 'Library';
/* 用来在动态显示中显示动作 */
$lang->action->search->label[''] = '';
diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php
index ef46205b0b..6a64d2e249 100755
--- a/module/action/lang/zh-cn.php
+++ b/module/action/lang/zh-cn.php
@@ -62,8 +62,8 @@ $lang->action->objectTypes['todo'] = '待办';
$lang->action->objectTypes['branch'] = '分支';
$lang->action->objectTypes['module'] = '模块';
$lang->action->objectTypes['testsuite'] = '套件';
-$lang->action->objectTypes['testlib'] = '公共库';
-$lang->action->objectTypes['testreport'] = '总结报告';
+$lang->action->objectTypes['caselib'] = '用例库';
+$lang->action->objectTypes['testreport'] = '测试报告';
/* 用来描述操作历史记录。*/
$lang->action->desc = new stdclass();
@@ -200,7 +200,7 @@ $lang->action->search->objectTypeList['release'] = '发布';
$lang->action->search->objectTypeList['productplan'] = '计划';
$lang->action->search->objectTypeList['branch'] = '分支';
$lang->action->search->objectTypeList['testsuite'] = '套件';
-$lang->action->search->objectTypeList['testlib'] = '公共库';
+$lang->action->search->objectTypeList['caselib'] = '公共库';
/* 用来在动态显示中显示动作 */
$lang->action->search->label[''] = '';
diff --git a/module/action/model.php b/module/action/model.php
index 35a9537750..eb4561937d 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -373,7 +373,7 @@ class actionModel extends model
->andWhere('extra')->eq($extra)
->orderBy($orderBy)->page($pager)->fetchAll();
if(!$trashes) return array();
-
+
/* Group trashes by objectType, and get there name field. */
foreach($trashes as $object)
{
@@ -627,7 +627,7 @@ class actionModel extends model
*/
public function getBySQL($sql, $orderBy, $pager = null)
{
- return $actions = $this->dao->select('*')->from(TABLE_ACTION)
+ return $actions = $this->dao->select('*')->from(TABLE_ACTION)
->where($sql)
->orderBy($orderBy)
->page($pager)
@@ -669,11 +669,11 @@ class actionModel extends model
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
if($todo->private == 1 and $todo->account != $this->app->user->account)
{
- $objectNames[$objectType][$id] = $this->lang->todo->thisIsPrivate;
+ $objectNames[$objectType][$id] = $this->lang->todo->thisIsPrivate;
}
else
{
- $objectNames[$objectType][$id] = $todo->name;
+ $objectNames[$objectType][$id] = $todo->name;
}
}
}
diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php
index 6eb6811366..ede973a7a6 100755
--- a/module/action/view/trash.html.php
+++ b/module/action/view/trash.html.php
@@ -37,7 +37,13 @@
| action->objectTypes, $action->objectType, '');?> |
objectID;?> |
- createLink($module, $module == 'testlib' ? 'libview' : 'view', $action->objectType == 'user' ? "account={$action->objectName}" : "id={$action->objectID}"), $action->objectName);?> |
+
+ objectType == 'user' ? "account={$action->objectName}" : "id={$action->objectID}";
+ echo html::a($this->createLink($module, $moduleName, $params), $action->objectName);
+ ?>
+ |
actor];?> |
date;?> |
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index 47b5a4cabb..f66ab4649e 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -238,7 +238,7 @@ $lang->qa->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s'
$lang->qa->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
$lang->qa->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
$lang->qa->menu->report = array('link' => '总结报告|testreport|browse|productID=%s');
-$lang->qa->menu->testlib = array('link' => '公共库|testsuite|library');
+$lang->qa->menu->caselib = array('link' => '公共库|testsuite|library');
$lang->qa->menu->index = array('link' => "TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->bug = new stdclass();
@@ -250,7 +250,7 @@ $lang->bug->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s
$lang->bug->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
$lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
$lang->bug->menu->report = array('link' => '总结报告|testreport|browse|productID=%s');
-$lang->bug->menu->testlib = array('link' => '公共库|testsuite|library');
+$lang->bug->menu->caselib = array('link' => '公共库|testsuite|library');
$lang->bug->menu->index = array('link' => "TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testcase = new stdclass();
@@ -262,7 +262,7 @@ $lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|product
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase');
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
$lang->testcase->menu->report = array('link' => '总结报告|testreport|browse|productID=%s', 'alias' => 'view,create');
-$lang->testcase->menu->testlib = array('link' => '公共库|testsuite|library');
+$lang->testcase->menu->caselib = array('link' => '公共库|testsuite|library');
$lang->testcase->menu->index = array('link' => "TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testtask = new stdclass();
@@ -272,16 +272,16 @@ $lang->testsuite->menu = $lang->testcase->menu;
$lang->testreport = new stdclass();
$lang->testreport->menu = $lang->testcase->menu;
-$lang->testlib = new stdclass();
-$lang->testlib->menu = new stdclass();
-$lang->testlib->menu->lib = array('link' => '%s', 'fixed' => true);
-$lang->testlib->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
-$lang->testlib->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
-$lang->testlib->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
-$lang->testlib->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
-$lang->testlib->menu->testlib = array('link' => '公共库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
-$lang->testlib->menu->create = array('link' => "创建库|testsuite|createLib|", 'float' => 'right');
-$lang->testlib->menu->index = array('link' => "测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
+$lang->caselib = new stdclass();
+$lang->caselib->menu = new stdclass();
+$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
+$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
+$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
+$lang->caselib->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
+$lang->caselib->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
+$lang->caselib->menu->caselib = array('link' => '公共库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
+$lang->caselib->menu->create = array('link' => "创建库|testsuite|createLib|", 'float' => 'right');
+$lang->caselib->menu->index = array('link' => "测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
/* 文档视图菜单设置。*/
$lang->doc = new stdclass();
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index bea944905a..623f6aa2ef 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -237,8 +237,8 @@ $lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->qa->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
-$lang->qa->menu->report = array('link' => '总结报告|testreport|browse|productID=%s');
-$lang->qa->menu->testlib = array('link' => '公共库|testsuite|library');
+$lang->qa->menu->report = array('link' => '测试报告|testreport|browse|productID=%s');
+$lang->qa->menu->caselib = array('link' => '用例库|testsuite|library');
$lang->qa->menu->index = array('link' => "测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->bug = new stdclass();
@@ -249,8 +249,8 @@ $lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'al
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
-$lang->bug->menu->report = array('link' => '总结报告|testreport|browse|productID=%s');
-$lang->bug->menu->testlib = array('link' => '公共库|testsuite|library');
+$lang->bug->menu->report = array('link' => '测试报告|testreport|browse|productID=%s');
+$lang->bug->menu->caselib = array('link' => '用例库|testsuite|library');
$lang->bug->menu->index = array('link' => "测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testcase = new stdclass();
@@ -261,8 +261,8 @@ $lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s'
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importlib,report', 'subModule' => 'tree');
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase');
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
-$lang->testcase->menu->report = array('link' => '总结报告|testreport|browse|productID=%s', 'alias' => 'view,create');
-$lang->testcase->menu->testlib = array('link' => '公共库|testsuite|library');
+$lang->testcase->menu->report = array('link' => '测试报告|testreport|browse|productID=%s', 'alias' => 'view,create');
+$lang->testcase->menu->caselib = array('link' => '用例库|testsuite|library');
$lang->testcase->menu->index = array('link' => "测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testtask = new stdclass();
@@ -272,16 +272,16 @@ $lang->testsuite->menu = $lang->testcase->menu;
$lang->testreport = new stdclass();
$lang->testreport->menu = $lang->testcase->menu;
-$lang->testlib = new stdclass();
-$lang->testlib->menu = new stdclass();
-$lang->testlib->menu->lib = array('link' => '%s', 'fixed' => true);
-$lang->testlib->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
-$lang->testlib->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
-$lang->testlib->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
-$lang->testlib->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
-$lang->testlib->menu->testlib = array('link' => '公共库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
-$lang->testlib->menu->create = array('link' => "创建库|testsuite|createLib|", 'float' => 'right');
-$lang->testlib->menu->index = array('link' => "测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
+$lang->caselib = new stdclass();
+$lang->caselib->menu = new stdclass();
+$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
+$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
+$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
+$lang->caselib->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
+$lang->caselib->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
+$lang->caselib->menu->caselib = array('link' => '用例库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
+$lang->caselib->menu->create = array('link' => "创建库|testsuite|createLib|", 'float' => 'right');
+$lang->caselib->menu->index = array('link' => "测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
/* 文档视图菜单设置。*/
$lang->doc = new stdclass();
diff --git a/module/testcase/control.php b/module/testcase/control.php
index ae56232c78..a6a4fe2b95 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -119,7 +119,7 @@ class testcase extends control
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule, $linkedLibs) : array();
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createCaseLink'), '', $branch);
- $libModuleTree = $this->tree->getTestLibTreeInCase('case', $productID, array('treeModel', 'createCaseLink'));
+ $libModuleTree = $this->tree->getCaseLibTreeInCase('case', $productID, array('treeModel', 'createCaseLink'));
if($libModuleTree) $moduleTree = substr($moduleTree, 0, strrpos($moduleTree, '')) . $libModuleTree . '';
/* Assign. */
@@ -621,7 +621,7 @@ class testcase extends control
$this->view->libID = $case->lib;
$this->view->libName = $libraries[$case->lib];
$this->view->libraries = $libraries;
- $this->view->moduleOptionMenu = $this->tree->getOptionMenu($case->lib, $viewType = 'testlib', $startModuleID = 0);
+ $this->view->moduleOptionMenu = $this->tree->getOptionMenu($case->lib, $viewType = 'caselib', $startModuleID = 0);
}
else
{
@@ -636,7 +636,7 @@ class testcase extends control
if($case->lib and $case->fromLib)
{
$libName = $this->loadModel('testsuite')->getById($case->lib)->name;
- $libModules = $this->tree->getOptionMenu($case->lib, 'testlib');
+ $libModules = $this->tree->getOptionMenu($case->lib, 'caselib');
foreach($libModules as $moduleID => $moduleName)
{
if($moduleID == 0) continue;
@@ -707,7 +707,7 @@ class testcase extends control
$this->lang->testcase->menu = $this->lang->testsuite->menu;
/* Set modules. */
- $modules = $this->tree->getOptionMenu($libID, $viewType = 'testlib', $startModuleID = 0, $branch);
+ $modules = $this->tree->getOptionMenu($libID, $viewType = 'caselib', $startModuleID = 0, $branch);
$modules = array('ditto' => $this->lang->testcase->ditto) + $modules;
$this->view->modules = $modules;
@@ -1537,7 +1537,7 @@ class testcase extends control
$modules = $this->loadModel('tree')->getOptionMenu($productID, 'case', 0, $branch);
$libName = $libraries[$libID];
- $libModules = $this->tree->getOptionMenu($libID, 'testlib');
+ $libModules = $this->tree->getOptionMenu($libID, 'caselib');
foreach($libModules as $moduleID => $moduleName)
{
if($moduleID == 0) continue;
diff --git a/module/testcase/js/edit.js b/module/testcase/js/edit.js
index 25970fb19a..602030e67c 100644
--- a/module/testcase/js/edit.js
+++ b/module/testcase/js/edit.js
@@ -53,7 +53,7 @@ function loadLinkCases(caseID)
function loadLibModules(libID)
{
- link = createLink('tree', 'ajaxGetOptionMenu', 'libID=' + libID + '&viewtype=testlib&branch=0&rootModuleID=0&returnType=html&needManage=true');
+ link = createLink('tree', 'ajaxGetOptionMenu', 'libID=' + libID + '&viewtype=caselib&branch=0&rootModuleID=0&returnType=html&needManage=true');
$('#moduleIdBox').load(link, function()
{
$(this).find('select').chosen(defaultChosenOptions)
diff --git a/module/testsuite/control.php b/module/testsuite/control.php
index 0e7a55d24d..f71dec65b3 100644
--- a/module/testsuite/control.php
+++ b/module/testsuite/control.php
@@ -161,7 +161,7 @@ class testsuite extends control
if(dao::isError()) die(js::error(dao::getError()));
if($changes)
{
- $objectType = $suite->type == 'library' ? 'testlib' : 'testsuite';
+ $objectType = $suite->type == 'library' ? 'caselib' : 'testsuite';
$actionID = $this->loadModel('action')->create($objectType, $suiteID, 'edited');
$this->action->logHistory($actionID, $changes);
}
@@ -178,7 +178,7 @@ class testsuite extends control
$this->view->title = $libraries[$suiteID] . $this->lang->colon . $this->lang->testsuite->edit;
$this->view->position[] = html::a($this->createLink('testsuite', 'library', "libID=$suiteID"), $libraries[$suiteID]);
- $this->view->position[] = $this->lang->testlib->common;
+ $this->view->position[] = $this->lang->caselib->common;
}
else
{
@@ -381,8 +381,8 @@ class testsuite extends control
/* Set menu. */
$libID = $this->testsuite->saveLibState($libID, $libraries);
- setcookie('preTestLibID', $libID, $this->config->cookieLife, $this->config->webRoot);
- if($this->cookie->preTestLibID != $libID)
+ setcookie('preCaseLibID', $libID, $this->config->cookieLife, $this->config->webRoot);
+ if($this->cookie->preCaseLibID != $libID)
{
$_COOKIE['libCaseModule'] = 0;
setcookie('libCaseModule', 0, $this->config->cookieLife, $this->config->webRoot);
@@ -415,9 +415,9 @@ class testsuite extends control
$this->loadModel('datatable');
$this->loadModel('tree');
$showModule = !empty($this->config->datatable->testsuiteLibrary->showModule) ? $this->config->datatable->testsuiteLibrary->showModule : '';
- $this->view->modulePairs = $showModule ? $this->tree->getModulePairs($libID, 'testlib', $showModule) : array();
+ $this->view->modulePairs = $showModule ? $this->tree->getModulePairs($libID, 'caselib', $showModule) : array();
- $this->view->title = $this->lang->testlib->common . $this->lang->colon . $libraries[$libID];
+ $this->view->title = $this->lang->caselib->common . $this->lang->colon . $libraries[$libID];
$this->view->position[] = html::a($this->createLink('testsuite', 'library', "libID=$libID"), $libraries[$libID]);
$this->view->libID = $libID;
@@ -425,8 +425,8 @@ class testsuite extends control
$this->view->cases = $cases;
$this->view->orderBy = $orderBy;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
- $this->view->modules = $this->tree->getOptionMenu($libID, $viewType = 'testlib', $startModuleID = 0);
- $this->view->moduleTree = $this->tree->getTreeMenu($libID, $viewType = 'testlib', $startModuleID = 0, array('treeModel', 'createTestLibLink'), '');
+ $this->view->modules = $this->tree->getOptionMenu($libID, $viewType = 'caselib', $startModuleID = 0);
+ $this->view->moduleTree = $this->tree->getTreeMenu($libID, $viewType = 'caselib', $startModuleID = 0, array('treeModel', 'createCaseLibLink'), '');
$this->view->pager = $pager;
$this->view->browseType = $browseType;
$this->view->moduleID = $moduleID;
@@ -449,7 +449,7 @@ class testsuite extends control
{
$libID = $this->testsuite->createLib();
if(dao::isError()) die(js::error(dao::getError()));
- $this->loadModel('action')->create('testlib', $libID, 'opened');
+ $this->loadModel('action')->create('caselib', $libID, 'opened');
die(js::locate($this->createLink('testsuite', 'library', "libID=$libID"), 'parent'));
}
@@ -458,9 +458,9 @@ class testsuite extends control
$libID = $this->testsuite->saveLibState(0, $libraries);
$this->testsuite->setLibMenu($libraries, $libID);
- $this->view->title = $this->lang->testlib->common . $this->lang->colon . $this->lang->testlib->create;
- $this->view->position[] = $this->lang->testlib->common;
- $this->view->position[] = $this->lang->testlib->create;
+ $this->view->title = $this->lang->caselib->common . $this->lang->colon . $this->lang->caselib->create;
+ $this->view->position[] = $this->lang->caselib->common;
+ $this->view->position[] = $this->lang->caselib->create;
$this->display();
}
@@ -544,7 +544,7 @@ class testsuite extends control
$this->view->precondition = $precondition;
$this->view->keywords = $keywords;
$this->view->steps = $steps;
- $this->view->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($libID, $viewType = 'testlib', $startModuleID = 0);
+ $this->view->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($libID, $viewType = 'caselib', $startModuleID = 0);
$this->display();
}
@@ -570,7 +570,7 @@ class testsuite extends control
$this->view->position[] = $this->lang->testsuite->view;
$this->view->lib = $lib;
- $this->view->actions = $this->loadModel('action')->getList('testlib', $libID);
+ $this->view->actions = $this->loadModel('action')->getList('caselib', $libID);
$this->display();
}
diff --git a/module/testsuite/js/createcase.js b/module/testsuite/js/createcase.js
index 5941fc3bbc..6bc99c2bb1 100644
--- a/module/testsuite/js/createcase.js
+++ b/module/testsuite/js/createcase.js
@@ -2,7 +2,7 @@ var newRowID = 0;
function loadLibModules(libID)
{
- link = createLink('tree', 'ajaxGetOptionMenu', 'libID=' + libID + '&viewtype=testlib&branch=0&rootModuleID=0&returnType=html&needManage=true');
+ link = createLink('tree', 'ajaxGetOptionMenu', 'libID=' + libID + '&viewtype=caselib&branch=0&rootModuleID=0&returnType=html&needManage=true');
$('#moduleIdBox').load(link, function()
{
$(this).find('select').chosen(defaultChosenOptions)
diff --git a/module/testsuite/lang/en.php b/module/testsuite/lang/en.php
index 2c064f3f25..5b36b5d5a5 100644
--- a/module/testsuite/lang/en.php
+++ b/module/testsuite/lang/en.php
@@ -43,7 +43,7 @@ $lang->testsuite->lblUnlinkCase = 'Unlink Case';
$lang->testsuite->authorList['private'] = 'Private';
$lang->testsuite->authorList['public'] = 'Public';
-$lang->testlib->common = 'Test Library';
-$lang->testlib->create = 'Create';
-$lang->testlib->edit = 'Edit';
-$lang->testlib->all = 'All';
+$lang->caselib->common = 'Test Library';
+$lang->caselib->create = 'Create';
+$lang->caselib->edit = 'Edit';
+$lang->caselib->all = 'All';
diff --git a/module/testsuite/lang/zh-cn.php b/module/testsuite/lang/zh-cn.php
index 9be9039107..817e38144f 100644
--- a/module/testsuite/lang/zh-cn.php
+++ b/module/testsuite/lang/zh-cn.php
@@ -43,7 +43,7 @@ $lang->testsuite->lblUnlinkCase = '移除用例';
$lang->testsuite->authorList['private'] = '私有';
$lang->testsuite->authorList['public'] = '公开';
-$lang->testlib->common = '公共用例库';
-$lang->testlib->create = '创建库';
-$lang->testlib->edit = '编辑';
-$lang->testlib->all = '所有公共库';
+$lang->caselib->common = '公共用例库';
+$lang->caselib->create = '创建库';
+$lang->caselib->edit = '编辑';
+$lang->caselib->all = '所有公共库';
diff --git a/module/testsuite/model.php b/module/testsuite/model.php
index 9860954c70..a09aacc008 100644
--- a/module/testsuite/model.php
+++ b/module/testsuite/model.php
@@ -76,26 +76,26 @@ class testsuiteModel extends model
{
$currentLibName = zget($libraries, $libID, '');
$selectHtml = empty($libraries) ? '' : "{$currentLibName} ";
- setCookie("lastTestLib", $libID, $this->config->cookieLife, $this->config->webRoot);
- foreach($this->lang->testlib->menu as $key => $value)
+ setCookie("lastCaseLib", $libID, $this->config->cookieLife, $this->config->webRoot);
+ foreach($this->lang->caselib->menu as $key => $value)
{
$replace = ($key == 'lib') ? $selectHtml : '';
- common::setMenuVars($this->lang->testlib->menu, $key, $replace);
+ common::setMenuVars($this->lang->caselib->menu, $key, $replace);
}
- $this->lang->testsuite->menu = $this->lang->testlib->menu;
+ $this->lang->testsuite->menu = $this->lang->caselib->menu;
}
public function saveLibState($libID = 0, $libraries = array())
{
- if($libID > 0) $this->session->set('testLib', (int)$libID);
- if($libID == 0 and $this->cookie->lastTestLib) $this->session->set('testLib', $this->cookie->lastTestLib);
- if($libID == 0 and $this->session->testLib == '') $this->session->set('testLib', key($libraries));
- if(!isset($libraries[$this->session->testLib]))
+ if($libID > 0) $this->session->set('caseLib', (int)$libID);
+ if($libID == 0 and $this->cookie->lastCaseLib) $this->session->set('caseLib', $this->cookie->lastCaseLib);
+ if($libID == 0 and $this->session->caseLib == '') $this->session->set('caseLib', key($libraries));
+ if(!isset($libraries[$this->session->caseLib]))
{
- $this->session->set('testLib', key($libraries));
- $libID = $this->session->testLib;
+ $this->session->set('caseLib', key($libraries));
+ $libID = $this->session->caseLib;
}
- return $this->session->testLib;
+ return $this->session->caseLib;
}
/**
@@ -292,7 +292,7 @@ class testsuiteModel extends model
parent::delete(TABLE_TESTSUITE, $suiteID);
if($suite->type == 'library')
{
- $this->dao->update(TABLE_ACTION)->set('objectType')->eq('testlib')->where('objectID')->eq($suiteID)->andWhere('objectType')->eq('testsuite')->exec();
+ $this->dao->update(TABLE_ACTION)->set('objectType')->eq('caselib')->where('objectID')->eq($suiteID)->andWhere('objectType')->eq('testsuite')->exec();
}
else
{
@@ -339,7 +339,7 @@ class testsuiteModel extends model
if(!dao::isError())
{
$libID = $this->dao->lastInsertID();
- $this->file->updateObjectID($this->post->uid, $libID, 'testlib');
+ $this->file->updateObjectID($this->post->uid, $libID, 'caselib');
return $libID;
}
return false;
@@ -379,22 +379,22 @@ class testsuiteModel extends model
if($queryID)
{
$query = $this->loadModel('search')->getQuery($queryID);
- $this->session->set('testlibQuery', ' 1 = 1');
+ $this->session->set('caselibQuery', ' 1 = 1');
if($query)
{
- $this->session->set('testlibQuery', $query->sql);
- $this->session->set('testlibForm', $query->form);
+ $this->session->set('caselibQuery', $query->sql);
+ $this->session->set('caselibForm', $query->form);
}
}
else
{
- if($this->session->testlibQuery == false) $this->session->set('testlibQuery', ' 1 = 1');
+ if($this->session->caselibQuery == false) $this->session->set('caselibQuery', ' 1 = 1');
}
$queryLibID = $libID;
$allLib = "`lib` = 'all'";
- $caseQuery = '(' . $this->session->testlibQuery;
- if(strpos($this->session->testlibQuery, $allLib) !== false)
+ $caseQuery = '(' . $this->session->caselibQuery;
+ if(strpos($this->session->caselibQuery, $allLib) !== false)
{
$caseQuery = str_replace($allLib, '1', $caseQuery);
$queryLibID = 'all';
@@ -452,10 +452,10 @@ class testsuiteModel extends model
public function buildSearchForm($libID, $libraries, $queryID, $actionURL)
{
$this->config->testcase->search['fields']['lib'] = $this->lang->testcase->lib;
- $this->config->testcase->search['params']['lib']['values'] = array('' => '', $libID => $libraries[$libID], 'all' => $this->lang->testlib->all);
+ $this->config->testcase->search['params']['lib']['values'] = array('' => '', $libID => $libraries[$libID], 'all' => $this->lang->caselib->all);
$this->config->testcase->search['params']['lib']['operator'] = '=';
$this->config->testcase->search['params']['lib']['control'] = 'select';
- $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($libID, $viewType = 'testlib');
+ $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($libID, $viewType = 'caselib');
if(!$this->config->testcase->needReview) unset($this->config->testcase->search['params']['status']['values']['wait']);
unset($this->config->testcase->search['fields']['product']);
unset($this->config->testcase->search['params']['product']);
@@ -468,7 +468,7 @@ class testsuiteModel extends model
unset($this->config->testcase->search['fields']['lastRunDate']);
unset($this->config->testcase->search['params']['lastRunDate']);
- $this->config->testcase->search['module'] = 'testlib';
+ $this->config->testcase->search['module'] = 'caselib';
$this->config->testcase->search['actionURL'] = $actionURL;
$this->config->testcase->search['queryID'] = $queryID;
@@ -500,7 +500,7 @@ class testsuiteModel extends model
}
else if($module == 'tree')
{
- $link = helper::createLink($module, $method, "libID=%s&type=testlib¤tModuleID=0");
+ $link = helper::createLink($module, $method, "libID=%s&type=caselib¤tModuleID=0");
}
else
{
diff --git a/module/testsuite/view/createcase.html.php b/module/testsuite/view/createcase.html.php
index aed3e03533..ab314e65f7 100644
--- a/module/testsuite/view/createcase.html.php
+++ b/module/testsuite/view/createcase.html.php
@@ -38,7 +38,7 @@
if(count($moduleOptionMenu) == 1)
{
echo "";
- echo html::a($this->createLink('tree', 'browse', "rootID=$libID&view=testlib¤tModuleID=0"), "", '_blank', "data-toggle='tooltip' class='btn' title='{$lang->tree->manage}'");
+ echo html::a($this->createLink('tree', 'browse', "rootID=$libID&view=caselib¤tModuleID=0"), "", '_blank', "data-toggle='tooltip' class='btn' title='{$lang->tree->manage}'");
echo '';
echo "";
echo html::a("javascript:loadLibModules($libID)", "", '', "data-toggle='tooltip' class='btn' title='{$lang->refresh}'");
diff --git a/module/testsuite/view/createlib.html.php b/module/testsuite/view/createlib.html.php
index 3a7f7f74f8..2cf8a6c12a 100644
--- a/module/testsuite/view/createlib.html.php
+++ b/module/testsuite/view/createlib.html.php
@@ -16,7 +16,7 @@
- icons['create']);?> testlib->create;?>
+ icons['create']);?> caselib->create;?>
diff --git a/module/testsuite/view/libview.html.php b/module/testsuite/view/libview.html.php
index 8c072e2aad..9dba052611 100644
--- a/module/testsuite/view/libview.html.php
+++ b/module/testsuite/view/libview.html.php
@@ -13,7 +13,7 @@
- id;?>
+ id;?>
name;?>
deleted):?>
testsuite->deleted;?>
diff --git a/module/testtask/control.php b/module/testtask/control.php
index c9cab909b3..24bdad5b64 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -270,7 +270,7 @@ class testtask extends control
$runs = $this->testcase->appendBugAndResults($runs, 'run');
$moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
- $libModuleTree = $this->tree->getTestLibTreeInCase('testtask', $taskID, array('treeModel', 'createTestTaskLink'));
+ $libModuleTree = $this->tree->getCaseLibTreeInCase('testtask', $taskID, array('treeModel', 'createTestTaskLink'));
if($libModuleTree) $moduleTree = substr($moduleTree, 0, strrpos($moduleTree, '')) . $libModuleTree . '';
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->cases;
diff --git a/module/tree/control.php b/module/tree/control.php
index ff0f73f19d..c81df458a0 100644
--- a/module/tree/control.php
+++ b/module/tree/control.php
@@ -49,7 +49,7 @@ class tree extends control
$lib = $this->doc->getLibById($rootID);
$this->view->root = $lib;
}
- elseif(strpos($viewType, 'testlib') !== false)
+ elseif(strpos($viewType, 'caselib') !== false)
{
$this->loadModel('testsuite');
$lib = $this->testsuite->getById($rootID);
@@ -97,16 +97,16 @@ class tree extends control
$position[] = html::a($this->createLink('testcase', 'browse', "product=$rootID"), $product->name);
$position[] = $this->lang->tree->manageCase;
}
- elseif($viewType == 'testlib')
+ elseif($viewType == 'caselib')
{
$this->testsuite->setLibMenu($this->testsuite->getLibraries(), $rootID);
$this->lang->tree->menu = $this->lang->testsuite->menu;
$this->lang->tree->menuOrder = $this->lang->testsuite->menuOrder;
$this->lang->set('menugroup.tree', 'qa');
- $title = $lib->name . $this->lang->colon . $this->lang->tree->manageTestLib;
+ $title = $lib->name . $this->lang->colon . $this->lang->tree->manageCaseLib;
$position[] = html::a($this->createLink('testsuite', 'library', "libID=$rootID"), $lib->name);
- $position[] = $this->lang->tree->manageTestLib;
+ $position[] = $this->lang->tree->manageCaseLib;
}
elseif(strpos($viewType, 'doc') !== false)
{
diff --git a/module/tree/lang/en.php b/module/tree/lang/en.php
index 37bc85914e..7fc99a02ed 100644
--- a/module/tree/lang/en.php
+++ b/module/tree/lang/en.php
@@ -21,14 +21,14 @@ $lang->tree->manageProduct = "Manage {$lang->productCommon}";
$lang->tree->manageProject = "Manage {$lang->projectCommon}";
$lang->tree->manageBug = 'Manage Bug';
$lang->tree->manageCase = 'Manage Case';
-$lang->tree->manageTestLib = 'Manage Library';
+$lang->tree->manageCaseLib = 'Manage Library';
$lang->tree->manageCustomDoc = 'Manage DocLib';
$lang->tree->updateOrder = 'Update Order';
$lang->tree->manageChild = 'Manage Child Module';
$lang->tree->manageStoryChild = 'Manage Child Story';
$lang->tree->manageBugChild = 'Manage Child Bug';
$lang->tree->manageCaseChild = 'Manage Child Case';
-$lang->tree->manageTestlibChild = 'Manage Child Library';
+$lang->tree->manageCaselibChild = 'Manage Child Library';
$lang->tree->manageTaskChild = "Manage Child {$lang->projectCommon}";
$lang->tree->syncFromProduct = 'Copy';
$lang->tree->dragAndSort = "Drag and Sort";
diff --git a/module/tree/lang/zh-cn.php b/module/tree/lang/zh-cn.php
index b9a3fda2fe..4ae7a63213 100644
--- a/module/tree/lang/zh-cn.php
+++ b/module/tree/lang/zh-cn.php
@@ -21,14 +21,14 @@ $lang->tree->manageProduct = "维护{$lang->productCommon}视图模块";
$lang->tree->manageProject = "维护{$lang->projectCommon}视图模块";
$lang->tree->manageBug = '维护测试视图模块';
$lang->tree->manageCase = '维护用例视图模块';
-$lang->tree->manageTestLib = '维护公共库模块';
+$lang->tree->manageCaseLib = '维护测试库模块';
$lang->tree->manageCustomDoc = '维护文档库分类';
$lang->tree->updateOrder = '更新排序';
$lang->tree->manageChild = '维护子模块';
$lang->tree->manageStoryChild = '维护子模块';
$lang->tree->manageBugChild = '维护Bug子模块';
$lang->tree->manageCaseChild = '维护用例子模块';
-$lang->tree->manageTestlibChild = '维护公共库子模块';
+$lang->tree->manageCaselibChild = '维护测试库子模块';
$lang->tree->manageTaskChild = "维护{$lang->projectCommon}子模块";
$lang->tree->syncFromProduct = '复制';
$lang->tree->dragAndSort = "拖放排序";
diff --git a/module/tree/model.php b/module/tree/model.php
index 35ce895ac5..24a004619c 100644
--- a/module/tree/model.php
+++ b/module/tree/model.php
@@ -155,7 +155,7 @@ class treeModel extends model
$modules = array();
if($viewType == 'case' and $extra)
{
- $modules += $this->dao->select('id,name,path,short')->from(TABLE_MODULE)->where('root')->in($extra)->andWhere('type')->eq('testlib')->andWhere('deleted')->eq(0)->fetchAll('id');
+ $modules += $this->dao->select('id,name,path,short')->from(TABLE_MODULE)->where('root')->in($extra)->andWhere('type')->eq('caselib')->andWhere('deleted')->eq(0)->fetchAll('id');
}
if($this->isMergeModule($rootID, $viewType)) $viewType .= ',story';
$modules += $this->dao->select('id,name,path,short')->from(TABLE_MODULE)->where('root')->eq($rootID)->andWhere('type')->in($viewType)->andWhere('deleted')->eq(0)->fetchAll('id');
@@ -886,12 +886,30 @@ class treeModel extends model
return $linkHtml;
}
- public function createTestlibLink($type, $module)
+ /**
+ * Create case lib link
+ *
+ * @param string $type
+ * @param string $module
+ * @access public
+ * @return string
+ */
+ public function createCaseLibLink($type, $module)
{
$linkHtml = html::a(helper::createLink('testsuite', 'library', "root={$module->root}&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
return $linkHtml;
}
+ /**
+ * Create branch link
+ *
+ * @param string $type
+ * @param int $rootID
+ * @param int $branchID
+ * @param string $branch
+ * @access public
+ * @return string
+ */
public function createBranchLink($type, $rootID, $branchID, $branch)
{
if($type == 'story') return html::a(helper::createLink('product', 'browse', "productID={$rootID}&branch=$branchID"), $branch, '_self', "id='branch{$branchID}'");
@@ -1498,7 +1516,7 @@ class treeModel extends model
}
/**
- * Get testlib tree in case view.
+ * Get caselib tree in case view.
*
* @param string $objectType
* @param int $objectID
@@ -1506,7 +1524,7 @@ class treeModel extends model
* @access public
* @return string
*/
- public function getTestLibTreeInCase($objectType, $objectID, $userFunc)
+ public function getCaseLibTreeInCase($objectType, $objectID, $userFunc)
{
if($objectType == 'case')
{
@@ -1530,7 +1548,7 @@ class treeModel extends model
if(empty($libs)) return null;
$libs = $this->dao->select('*')->from(TABLE_TESTSUITE)->where('type')->eq('library')->andWhere('id')->in($libs)->andWhere('deleted')->eq(0)->fetchAll('id');
- $moduleGroup = $this->dao->select('*')->from(TABLE_MODULE)->where('root')->in(array_keys($libs))->andWhere('type')->eq('testlib')->andWhere('deleted')->eq(0)->orderBy('grade desc, `order`')->fetchGroup('root');
+ $moduleGroup = $this->dao->select('*')->from(TABLE_MODULE)->where('root')->in(array_keys($libs))->andWhere('type')->eq('caselib')->andWhere('deleted')->eq(0)->orderBy('grade desc, `order`')->fetchGroup('root');
$lastMenu = '';
$keepModules = array();
foreach($libs as $lib)
@@ -1576,7 +1594,7 @@ class treeModel extends model
public function getExistLibModules($libs, $modules)
{
$libs = $this->dao->select('*')->from(TABLE_TESTSUITE)->where('type')->eq('library')->andWhere('id')->in($libs)->andWhere('deleted')->eq(0)->fetchAll('id');
- $libModules = $this->dao->select('*')->from(TABLE_MODULE)->where('root')->in(array_keys($libs))->andWhere('type')->eq('testlib')->andWhere('deleted')->eq(0)->andWhere('id')->in($modules)->orderBy('grade,`order`')->fetchAll();
+ $libModules = $this->dao->select('*')->from(TABLE_MODULE)->where('root')->in(array_keys($libs))->andWhere('type')->eq('caselib')->andWhere('deleted')->eq(0)->andWhere('id')->in($modules)->orderBy('grade,`order`')->fetchAll();
$modulePath = array();
foreach($libModules as $module)
{
|