Merge branch 'master' of github.com:easysoft/zentaopms
*pull for push added lang
This commit is contained in:
@@ -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;}
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -36,6 +36,7 @@ $lang->testsuite->unlinkedCases = '未关联';
|
||||
|
||||
$lang->testsuite->confirmDelete = '您确认要删除该套件吗?';
|
||||
$lang->testsuite->confirmUnlinkCase = '您确认要移除该用例吗?';
|
||||
$lang->testsuite->noticeNone = '您还没有创建套件';
|
||||
|
||||
$lang->testsuite->lblCases = '用例列表';
|
||||
$lang->testsuite->lblUnlinkCase = '移除用例';
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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 = '失败<span class="text-danger">%s</span>次';
|
||||
|
||||
$lang->testtask->confirmDelete = '您确认要删除该版本吗?';
|
||||
$lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?';
|
||||
$lang->testtask->noticeNoOther = '该产品还没有其他测试版本';
|
||||
|
||||
$lang->testtask->assignedToMe = '指派给我';
|
||||
$lang->testtask->allCases = '所有用例';
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['testtask']);?> <strong><?php echo $testtask->id;?></strong></span>
|
||||
<strong><?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?></strong>
|
||||
<small class='text-success'> <?php echo $lang->testtask->doing;?> <?php echo html::icon($lang->icons['start']);?></small>
|
||||
<small class='text-success'> <?php echo $lang->testtask->activate;?> <?php echo html::icon($lang->icons['start']);?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['testtask']);?> <strong><?php echo $testtask->id;?></strong></span>
|
||||
<strong><?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?></strong>
|
||||
<small class='text-success'> <?php echo $lang->testtask->blocked;?> <?php echo html::icon($lang->icons['pause']);?></small>
|
||||
<small class='text-success'> <?php echo $lang->testtask->block;?> <?php echo html::icon($lang->icons['pause']);?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class='actions'>
|
||||
<?php
|
||||
echo "<div class='btn-group'>";
|
||||
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 '</div>';
|
||||
echo "<div class='btn-group'>";
|
||||
|
||||
@@ -17,42 +17,54 @@
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['testtask']);?> <strong><?php echo $task->id;?></strong></span>
|
||||
<strong><?php echo html::a($this->createLink('testtask', 'view', 'taskID=' . $task->id), $task->name, '_blank');?></strong>
|
||||
<small class='text-muted'> <?php echo $lang->testtask->linkCase;?> <?php echo html::icon($lang->icons['link']);?></small>
|
||||
<div class='heading-actions'>
|
||||
<?php
|
||||
$lang->testtask->linkCase = $lang->testtask->linkByStory;
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bystory", '', 'button', '', '', 'btn-primary btn-sm');
|
||||
|
||||
echo "<span class='dropdown'>";
|
||||
echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkBySuite} <span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
if($suiteList)
|
||||
{
|
||||
foreach($suiteList as $suiteID => $suite)
|
||||
{
|
||||
$active = ($type == 'bysuite' and (int)$param == $suiteID) ? "class='active'" : '';
|
||||
$suiteName = $suite->name;
|
||||
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
|
||||
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bysuite¶m=$suiteID"), $suiteName) . "</li>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<li>" . html::a('###', $lang->testsuite->noticeNone) . "</li>";
|
||||
}
|
||||
echo "</ul></span>";
|
||||
|
||||
echo "<span class='dropdown'>";
|
||||
echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkByVersion} <span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
if($testTask)
|
||||
{
|
||||
foreach($testTask as $tmpID => $tmpTitle)
|
||||
{
|
||||
$active = ($type == 'bybuild' and (int)$param == $tmpID) ? "class='active'" : '';
|
||||
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bybuild¶m=$tmpID"), $tmpTitle) . "</li>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<li>" . html::a('###', $lang->testtask->noticeNoOther) . "</li>";
|
||||
}
|
||||
echo "</ul></span>";
|
||||
//$lang->testtask->linkCase = $lang->testtask->linkByBug;
|
||||
//common::printIcon('testtask', 'linkCase', "taskID=$taskID&type=bybug", '', 'button', 'link');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<?php
|
||||
echo "<div class='btn-group'>";
|
||||
|
||||
echo "<span class='dropdown'>";
|
||||
echo "<button class='btn' type='button' data-toggle='dropdown'><i class='icon icon-link'></i> {$lang->testtask->linkByVersion} <span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
foreach($testTask as $tmpID => $tmpTitle)
|
||||
{
|
||||
$active = ($type == 'bybuild' and (int)$param == $tmpID) ? "class='active'" : '';
|
||||
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bybuild¶m=$tmpID"), $tmpTitle) . "</li>";
|
||||
}
|
||||
echo "</ul></span>";
|
||||
|
||||
echo "<span class='dropdown'>";
|
||||
echo "<button class='btn' type='button' data-toggle='dropdown'><i class='icon icon-link'></i> {$lang->testtask->linkBySuite} <span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
|
||||
foreach($suiteList as $suiteID => $suite)
|
||||
{
|
||||
$active = ($type == 'bysuite' and (int)$param == $suiteID) ? "class='active'" : '';
|
||||
$suiteName = $suite->name;
|
||||
if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
|
||||
echo "<li $active>" . html::a(inlink('linkCase', "taskID=$taskID&type=bysuite¶m=$suiteID"), $suiteName) . "</li>";
|
||||
}
|
||||
echo "</ul></span>";
|
||||
|
||||
$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 '</div>';
|
||||
echo "<div class='btn-group'>";
|
||||
common::printRPN($this->session->testtaskList);
|
||||
echo '</div>';
|
||||
?>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
echo "<div class='btn-group'>";
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user