Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
wangyidong
2021-04-29 10:56:13 +08:00
12 changed files with 34 additions and 23 deletions
+1
View File
@@ -26,6 +26,7 @@ class caselibModel extends model
/* Set case lib menu. */
$products =$this->loadModel('product')->getPairs();
if(!empty($products) and $this->session->product) $this->loadModel('qa')->setMenu($products, $this->session->product);
if(empty($products)) $this->loadModel('qa')->setMenu($products, 0);
if($libraries)
{
+1 -1
View File
@@ -199,7 +199,7 @@ class doc extends control
if(!empty($lib->execution)) $this->view->execution = $this->dao->select('id,name')->from(TABLE_EXECUTION)->where('id')->eq($lib->execution)->fetch();
$this->view->lib = $lib;
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->users = $this->user->getPairs('noletter', $lib->users);
$this->view->users = $this->user->getPairs('noletter|noclosed', $lib->users);
$this->view->libID = $libID;
die($this->display());
-2
View File
@@ -1,6 +1,4 @@
form {margin-right: 30px;}
.chosen-container .chosen-results {max-height: 180px;}
#whiteListBox div.input-group {margin-bottom: 2px;}
#whiteListBox .input-group:last-child {margin-top: 10px;}
+5
View File
@@ -12,6 +12,11 @@
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/chosen.html.php';?>
<?php if($lib->type == 'product'):?>
<style> .chosen-container .chosen-results {max-height: 180px;}</style>
<?php else:?>
<style> .chosen-container .chosen-results {max-height: 145px;}</style>
<?php endif;?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
+4
View File
@@ -1182,6 +1182,10 @@ class executionModel extends model
{
$link = helper::createLink('execution', $module, "executionID=%s");
}
elseif($module == 'repo')
{
$link = helper::createLink('repo', 'browse', "repoID=0&branchID=&executionID=%s");
}
else
{
$link = helper::createLink($module, $method, "executionID=%s");
+6 -2
View File
@@ -256,7 +256,12 @@ class group extends control
$groupUsers = $this->group->getUserPairs($groupID);
$allUsers = $this->loadModel('dept')->getDeptUserPairs($deptID);
$otherUsers = array_diff_assoc($allUsers, $groupUsers);
$outsideUsers = $this->user->getPairs('outside|noclosed|noletter|noempty');
if($this->config->systemMode == 'new')
{
$outsideUsers = $this->user->getPairs('outside|noclosed|noletter|noempty');
$this->view->outsideUsers = array_diff_assoc($outsideUsers, $groupUsers);
}
$title = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageMember;
$position[] = $group->name;
@@ -268,7 +273,6 @@ class group extends control
$this->view->deptTree = $this->loadModel('dept')->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createGroupManageMemberLink'), $groupID);
$this->view->groupUsers = $groupUsers;
$this->view->otherUsers = $otherUsers;
$this->view->outsideUsers = array_diff_assoc($outsideUsers, $groupUsers);
$this->display();
}
+2
View File
@@ -58,6 +58,7 @@
<?php endforeach;?>
</td>
</tr>
<?php if($config->systemMode == 'new'):?>
<tr>
<th class='w-140px'>
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
@@ -71,6 +72,7 @@
<?php endforeach;?>
</td>
</tr>
<?php endif;?>
<tr>
<td class='text-center form-actions' colspan='2'>
<?php
+3 -3
View File
@@ -474,13 +474,13 @@ class product extends control
/* Get the relevant person in charge. */
$this->loadModel('user');
$poUsers = $this->user->getPairs('nodeleted|pofirst', $product->PO, $this->config->maxCount);
$poUsers = $this->user->getPairs('nodeleted|pofirst|noclosed', $product->PO, $this->config->maxCount);
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["PO"] = $this->config->user->moreLink;
$qdUsers = $this->user->getPairs('nodeleted|qdfirst', $product->QD, $this->config->maxCount);
$qdUsers = $this->user->getPairs('nodeleted|qdfirst|noclosed', $product->QD, $this->config->maxCount);
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["QD"] = $this->config->user->moreLink;
$rdUsers = $this->user->getPairs('nodeleted|devfirst', $product->RD, $this->config->maxCount);
$rdUsers = $this->user->getPairs('nodeleted|devfirst|noclosed', $product->RD, $this->config->maxCount);
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink;
$lines = array();
+3
View File
@@ -173,6 +173,9 @@ class project extends control
{
$projectID = $this->project->saveState($projectID, $this->project->getPairsByProgram());
if($projectID == 0 and common::hasPriv('project', 'create')) $this->locate($this->createLink('project', 'create'));
if($projectID == 0 and !common::hasPriv('project', 'create')) $this->locate($this->createLink('project', 'browse'));
$this->project->setMenu($projectID);
$project = $this->project->getByID($projectID);
+6 -4
View File
@@ -501,12 +501,14 @@ class testcaseModel extends model
if($branch and strpos($caseQuery, '`branch` =') === false) $caseQuery .= " AND `branch` in('0','$branch')";
if(strpos($caseQuery, $allBranch) !== false) $caseQuery = str_replace($allBranch, '1', $caseQuery);
$caseQuery .= ')';
$caseQuery = str_replace(array('`product`', '`version`'), array('t1.`product`', 't1.`version`'), $caseQuery);
$caseQuery = str_replace('`version`', 't1.`version`', $caseQuery);
if($this->app->openApp == 'project') $caseQuery = str_replace('`product`', 't2.`product`', $caseQuery);
$cases = $this->dao->select('*')->from(TABLE_CASE)
->beginIF($this->app->openApp == 'project')->alias('t1')->fi()
->beginIF($this->app->openApp == 'project')->leftJoin(TABLE_PROJECTCASE)->alias('t2')->on('t1.id=t2.case')->fi()
/* Search criteria under compatible project. */
$sql = $this->dao->select('*')->from(TABLE_CASE)->alias('t1');
if($this->app->openApp == 'project') $sql->leftJoin(TABLE_PROJECTCASE)->alias('t2')->on('t1.id=t2.case');
$cases = $sql
->where($caseQuery)
->beginIF($this->app->openApp == 'project')->andWhere('t2.project')->eq($this->session->project)->fi()
->beginIF(!empty($productID) and $queryProductID != 'all')
+2 -2
View File
@@ -1130,7 +1130,7 @@ class testtaskModel extends model
/* Update testRun's status. */
if(!dao::isError())
{
$runStatus = $caseResult == 'blocked' ? 'blocked' : 'done';
$runStatus = $caseResult == 'blocked' ? 'blocked' : 'normal';
$this->dao->update(TABLE_TESTRUN)
->set('lastRunResult')->eq($caseResult)
->set('status')->eq($runStatus)
@@ -1429,7 +1429,7 @@ class testtaskModel extends model
foreach(explode(',', trim($run->stage, ',')) as $stage) echo $this->lang->testcase->stageList[$stage] . '<br />';
break;
case 'status':
echo $caseChanged ? "<span class='warning'>{$this->lang->testcase->changed}</span>" : $this->processStatus('testtask', $run);
echo $caseChanged ? "<span class='warning'>{$this->lang->testcase->changed}</span>" : $this->processStatus('testcase', $run);
break;
case 'precondition':
echo $run->precondition;
+1 -9
View File
@@ -10,14 +10,6 @@
* @link http://www.zentao.net
*/
?>
<?php
$mode = 'classic';
if(isset($config->maxVersion))
{
unset($lang->upgrade->to15Mode['classic']);
$mode = 'new';
}
?>
<?php include '../../common/view/header.lite.html.php';?>
<div class='container'>
<div class='panel' style='padding:50px; margin:50px 300px;'>
@@ -26,7 +18,7 @@ if(isset($config->maxVersion))
<div class='panel-body'>
<div style='width:600px; margin: auto;'>
<?php echo $lang->upgrade->to15Desc;?>
<?php echo html::radio('mode', $lang->upgrade->to15Mode, $mode);?>
<?php echo html::radio('mode', $lang->upgrade->to15Mode, 'classic');?>
<p> </p>
<div id='selectedModeTips' class='text-info'><?php echo $lang->upgrade->selectedModeTips['classic'];?></div>
</div>