diff --git a/module/bug/css/create.css b/module/bug/css/create.css index 5ea4470f14..ef613a5b03 100644 --- a/module/bug/css/create.css +++ b/module/bug/css/create.css @@ -30,7 +30,7 @@ #contactListGroup .input-group-btn > .btn {margin-left: -1px!important;} #contactListGroup .chosen-container-single a {border-left-width: 0px;} -.chosen-container {max-width: 533px;} +.chosen-container {max-width: 580px;} .minw-80px {min-width: 80px;} diff --git a/module/common/model.php b/module/common/model.php index 25f17805b9..ae4effccac 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -749,7 +749,7 @@ class commonModel extends model /* set the class. */ if(!$icon) { - $icon = $lang->icons[$method] ? $lang->icons[$method] : $method; + $icon = isset($lang->icons[$method]) ? $lang->icons[$method] : $method; } if(strpos(',edit,copy,report,export,delete,', ",$method,") !== false) $module = 'common'; $class = "icon-$module-$method"; diff --git a/module/testsuite/lang/zh-cn.php b/module/testsuite/lang/zh-cn.php index 817e38144f..d1d69071b9 100644 --- a/module/testsuite/lang/zh-cn.php +++ b/module/testsuite/lang/zh-cn.php @@ -36,6 +36,7 @@ $lang->testsuite->unlinkedCases = '未关联'; $lang->testsuite->confirmDelete = '您确认要删除该套件吗?'; $lang->testsuite->confirmUnlinkCase = '您确认要移除该用例吗?'; +$lang->testsuite->noticeNone = '您还没有创建套件'; $lang->testsuite->lblCases = '用例列表'; $lang->testsuite->lblUnlinkCase = '移除用例'; diff --git a/module/testtask/config.php b/module/testtask/config.php index 270b424076..e56adeac74 100644 --- a/module/testtask/config.php +++ b/module/testtask/config.php @@ -6,11 +6,13 @@ $config->testtask->create->requiredFields = 'project,build,begin,end,name'; $config->testtask->edit->requiredFields = 'project,build,begin,end,name'; $config->testtask->editor = new stdclass(); -$config->testtask->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->testtask->editor->edit = array('id' => 'desc,report', 'tools' => 'simpleTools'); -$config->testtask->editor->view = array('id' => 'lastComment', 'tools' => 'simpleTools'); -$config->testtask->editor->start = array('id' => 'comment', 'tools' => 'simpleTools'); -$config->testtask->editor->close = array('id' => 'report,comment', 'tools' => 'simpleTools'); +$config->testtask->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->testtask->editor->edit = array('id' => 'desc,report', 'tools' => 'simpleTools'); +$config->testtask->editor->view = array('id' => 'lastComment', 'tools' => 'simpleTools'); +$config->testtask->editor->start = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->testtask->editor->close = array('id' => 'report,comment', 'tools' => 'simpleTools'); +$config->testtask->editor->block = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->testtask->editor->activate= array('id' => 'comment', 'tools' => 'simpleTools'); $config->testtask->datatable = new stdclass(); $config->testtask->datatable->defaultField = array('id', 'pri', 'title', 'type', 'assignedTo', 'lastRunner', 'lastRunDate', 'lastRunResult', 'status', 'bugs', 'results', 'actions'); diff --git a/module/testtask/control.php b/module/testtask/control.php index 6164760290..6d5dc1e727 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -523,19 +523,19 @@ class testtask extends control } /** - * Close testtask. + * block testtask. * * @param int $taskID * @access public * @return void */ - public function blocked($taskID) + public function block($taskID) { $actions = $this->loadModel('action')->getList('testtask', $taskID); if(!empty($_POST)) { - $changes = $this->testtask->blocked($taskID); + $changes = $this->testtask->block($taskID); if(dao::isError()) die(js::error(dao::getError())); if($this->post->comment != '' or !empty($changes)) @@ -558,7 +558,7 @@ class testtask extends control $this->view->testtask = $testtask; $this->view->title = $testtask->name . $this->lang->colon . $this->lang->testtask->start; $this->view->position[] = $this->lang->testtask->common; - $this->view->position[] = $this->lang->testtask->blocked; + $this->view->position[] = $this->lang->testtask->block; $this->view->actions = $actions; $this->display(); } @@ -655,7 +655,7 @@ class testtask extends control $this->view->position[] = $this->lang->testtask->common; $this->view->position[] = $this->lang->testtask->linkCase; - $testTask = $this->testtask->getRelatedTestTasks($productID, $param); + $testTask = $this->testtask->getRelatedTestTasks($productID, $taskID); /* Get cases. */ $cases = $this->testtask->getLinkableCases($productID, $task, $taskID, $type, $param, $pager); diff --git a/module/testtask/css/linkcase.css b/module/testtask/css/linkcase.css index 6c6d30b5d3..9046a9fd4f 100644 --- a/module/testtask/css/linkcase.css +++ b/module/testtask/css/linkcase.css @@ -1 +1,3 @@ .table > caption {border:1px solid #ddd; border-bottom: none;} +.heading-actions{display:inline-block;margin-top:-5px; margin-left:10px;} +.heading-actions .dropdown{margin-right:5px;} diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index 5e4127b86f..2a05b7154b 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -32,7 +32,7 @@ $lang->testtask->next = '下一个'; $lang->testtask->start = "开始"; $lang->testtask->close = "关闭"; $lang->testtask->wait = "待测版本"; -$lang->testtask->blocked = "阻塞"; +$lang->testtask->block = "阻塞"; $lang->testtask->activate = "激活"; $lang->testtask->testing = "测试中版本"; $lang->testtask->blockedA = "被阻塞版本"; @@ -74,7 +74,7 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[4] = '4'; $lang->testtask->unlinkedCases = '未关联'; -$lang->testtask->linkByVersion = '按版本复制'; +$lang->testtask->linkByVersion = '复制版本'; $lang->testtask->linkByStory = '按需求关联'; $lang->testtask->linkByBug = '按Bug关联'; $lang->testtask->linkBySuite = '按套件关联'; @@ -86,6 +86,7 @@ $lang->testtask->showFail = '失败%s次'; $lang->testtask->confirmDelete = '您确认要删除该版本吗?'; $lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?'; +$lang->testtask->noticeNoOther = '该产品还没有其他测试版本'; $lang->testtask->assignedToMe = '指派给我'; $lang->testtask->allCases = '所有用例'; diff --git a/module/testtask/model.php b/module/testtask/model.php index bb01874172..018b9fc6d2 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -203,7 +203,7 @@ class testtaskModel extends model if($type == 'all') $cases = $this->getAllLinkableCases($task, $query, $linkedCases, $pager); if($type == 'bystory') $cases = $this->getLinkableCasesByStory($productID, $task, $query, $linkedCases, $pager); if($type == 'bybug') $cases = $this->getLinkableCasesByBug($productID, $task, $query, $linkedCases, $pager); - if($type == 'bysuite') $cases = $this->getLinkableCasesBySuite($productID, $query, $param, $linkedCases, $pager); + if($type == 'bysuite') $cases = $this->getLinkableCasesBySuite($productID, $task, $query, $param, $linkedCases, $pager); if($type == 'bybuild') $cases = $this->getLinkableCasesByTestTask($param, $linkedCases, $pager); return $cases; @@ -296,6 +296,7 @@ class testtaskModel extends model * Get linkable cases by suite. * * @param int $productID + * @param object $task * @param string $query * @param string $suite * @param array $linkedCases @@ -303,7 +304,7 @@ class testtaskModel extends model * @access public * @return array */ - public function getLinkableCasesBySuite($productID, $query, $suite, $linkedCases, $pager) + public function getLinkableCasesBySuite($productID, $task, $query, $suite, $linkedCases, $pager) { return $this->dao->select('t1.*,t2.version as version')->from(TABLE_CASE)->alias('t1') ->leftJoin(TABLE_SUITECASE)->alias('t2')->on('t1.id=t2.case') diff --git a/module/testtask/view/doing.html.php b/module/testtask/view/activate.html.php similarity index 92% rename from module/testtask/view/doing.html.php rename to module/testtask/view/activate.html.php index a85479b10d..20ee5fe6d5 100644 --- a/module/testtask/view/doing.html.php +++ b/module/testtask/view/activate.html.php @@ -18,7 +18,7 @@
icons['testtask']);?> id;?> createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?> - testtask->doing;?> icons['start']);?> + testtask->activate;?> icons['start']);?>
diff --git a/module/testtask/view/blocked.html.php b/module/testtask/view/block.html.php similarity index 96% rename from module/testtask/view/blocked.html.php rename to module/testtask/view/block.html.php index 3aabb0eefb..923366c582 100644 --- a/module/testtask/view/blocked.html.php +++ b/module/testtask/view/block.html.php @@ -18,7 +18,7 @@
icons['testtask']);?> id;?> createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?> - testtask->blocked;?> icons['pause']);?> + testtask->block;?> icons['pause']);?>
diff --git a/module/testtask/view/caseheader.html.php b/module/testtask/view/caseheader.html.php index a1f3ba4f44..417c0a54cd 100644 --- a/module/testtask/view/caseheader.html.php +++ b/module/testtask/view/caseheader.html.php @@ -48,7 +48,7 @@
"; - common::printIcon('testtask', 'linkCase', "taskID=$task->id&type=all¶m=$taskID", '', 'button', 'link'); + common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'button', 'link'); common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id", '', 'button', '', '', 'iframe export'); echo '
'; echo "
"; diff --git a/module/testtask/view/linkcase.html.php b/module/testtask/view/linkcase.html.php index ccefeb7ac9..f51f43fb98 100644 --- a/module/testtask/view/linkcase.html.php +++ b/module/testtask/view/linkcase.html.php @@ -17,42 +17,54 @@ icons['testtask']);?> id;?> createLink('testtask', 'view', 'taskID=' . $task->id), $task->name, '_blank');?> testtask->linkCase;?> icons['link']);?> +
+ testtask->linkCase = $lang->testtask->linkByStory; + common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bystory", '', 'button', '', '', 'btn-primary btn-sm'); + + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + //$lang->testtask->linkCase = $lang->testtask->linkByBug; + //common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bybug", '', 'button', 'link'); + ?> +
"; - - echo ""; - echo ""; - echo ""; - - echo ""; - echo ""; - echo ""; - - $lang->testtask->linkCase = $lang->testtask->linkByStory; - common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bystory", '', 'button', 'link'); - - //Temporary hiding, add 'hidden'. 暂时隐藏 - $lang->testtask->linkCase = $lang->testtask->linkByBug; - common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bybug", '', 'button', 'link', '', 'hidden'); - - echo '
'; - echo "
"; common::printRPN($this->session->testtaskList); echo '
'; ?> diff --git a/module/testtask/view/view.html.php b/module/testtask/view/view.html.php index d22c17471a..6b625cbb18 100644 --- a/module/testtask/view/view.html.php +++ b/module/testtask/view/view.html.php @@ -31,7 +31,7 @@ echo "
"; common::printIcon('testtask', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); common::printIcon('testtask', 'close', "taskID=$task->id", $task, 'button', '', '', 'iframe', true); - common::printIcon('testtask', 'blocked', "taskID=$task->id", $task, 'button', 'pause', '', 'iframe', true); + common::printIcon('testtask', 'block', "taskID=$task->id", $task, 'button', 'pause', '', 'iframe', true); common::printIcon('testtask', 'activate', "taskID=$task->id", $task, 'button', 'magic', '', 'iframe', true); common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'button', 'sitemap'); common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'button', 'link');