Merge branch 'sprint/170' into 'sprint/173_lizhiqiang__16336'
# Conflicts: # module/execution/view/bug.html.php
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
.c-order {width: 70px;}
|
||||
.c-check {width: 40px}
|
||||
|
||||
a.setDefault {padding-left: 8px !important}
|
||||
|
||||
td.flex {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center;}
|
||||
td.flex .label-primary {min-width: 40px;}
|
||||
td.flex .setDefault {min-width: 120px;}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
elseif($branch->status == 'active')
|
||||
{
|
||||
$setDefaultLink = helper::createLink('branch', 'setDefault', "productID=$productID&branchID=$branch->id", '', true);
|
||||
$setDefaultHtml = html::a($setDefaultLink, "<i class='icon icon-hand-right'></i> <span>{$lang->branch->setDefault}</span>", 'hiddenwin', "class='btn btn-icon-left btn-sm setDefault hidden'");
|
||||
$setDefaultHtml = html::a($setDefaultLink, "<span><i class='icon icon-hand-right'></i> {$lang->branch->setDefault}</span>", 'hiddenwin', "class='btn btn-icon-left btn-sm setDefault hidden'");
|
||||
|
||||
echo common::hasPriv('branch', 'setDefault') ? $setDefaultHtml : '';
|
||||
}
|
||||
|
||||
+16
-25
@@ -66,25 +66,21 @@ class build extends control
|
||||
$productGroups = $this->execution->getProducts($executionID);
|
||||
$productID = $productID ? $productID : key($productGroups);
|
||||
$branchGroups = $this->loadModel('project')->getBranchesByProject($executionID);
|
||||
$branchPairs = $this->loadModel('branch')->getPairs($productID, 'active');
|
||||
$branchPairs = $this->loadModel('branch')->getPairs($productID);
|
||||
$branches = array();
|
||||
$products = array();
|
||||
foreach($productGroups as $product)
|
||||
|
||||
/* Set branches and products. */
|
||||
if($productGroups[$productID]->type != 'normal' and isset($branchGroups[$productID]))
|
||||
{
|
||||
$products[$product->id] = $product->name;
|
||||
if(isset($productGroups[$productID]) and $productGroups[$productID]->type != 'normal')
|
||||
foreach($branchGroups[$productID] as $branchID => $branch)
|
||||
{
|
||||
$branches[$product->id] = array();
|
||||
if(isset($branchGroups[$product->id]))
|
||||
{
|
||||
foreach($branchGroups[$product->id] as $branchID => $branch)
|
||||
{
|
||||
$branches[$product->id][$branchID] = $branchPairs[$branchID];
|
||||
}
|
||||
}
|
||||
$branches[$branchID] = $branchPairs[$branchID];
|
||||
}
|
||||
}
|
||||
|
||||
foreach($productGroups as $product) $products[$product->id] = $product->name;
|
||||
|
||||
$this->view->title = $this->lang->build->create;
|
||||
$this->view->position[] = $this->lang->build->create;
|
||||
|
||||
@@ -165,27 +161,22 @@ class build extends control
|
||||
$productGroups[$build->product] = $product;
|
||||
}
|
||||
|
||||
$products = array();
|
||||
$branchGroups = $this->loadModel('project')->getBranchesByProject($build->execution);
|
||||
$branchPairs = $this->loadModel('branch')->getPairs($build->product, 'active');
|
||||
$branchPairs = $this->loadModel('branch')->getPairs($build->product);
|
||||
$products = array();
|
||||
$branches = array();
|
||||
|
||||
foreach($productGroups as $product)
|
||||
/* Set branches and products. */
|
||||
if($productGroups[$build->product]->type != 'normal' and isset($branchGroups[$build->product]))
|
||||
{
|
||||
$products[$product->id] = $product->name;
|
||||
if(isset($productGroups[$build->product]) and $productGroups[$build->product]->type != 'normal')
|
||||
foreach($branchGroups[$build->product] as $branchID => $branch)
|
||||
{
|
||||
$branches[$product->id] = array();
|
||||
if(isset($branchGroups[$product->id]))
|
||||
{
|
||||
foreach($branchGroups[$product->id] as $branchID => $branch)
|
||||
{
|
||||
$branches[$product->id][$branchID] = $branchPairs[$branchID];
|
||||
}
|
||||
}
|
||||
$branches[$branchID] = $branchPairs[$branchID];
|
||||
}
|
||||
}
|
||||
|
||||
foreach($productGroups as $product) $products[$product->id] = $product->name;
|
||||
|
||||
$this->view->title = $execution->name . $this->lang->colon . $this->lang->build->edit;
|
||||
$this->view->position[] = html::a($this->createLink('execution', 'task', "executionID=$build->execution"), $execution->name);
|
||||
$this->view->position[] = $this->lang->build->edit;
|
||||
|
||||
@@ -379,7 +379,7 @@ class buildModel extends model
|
||||
$buildID = (int)$buildID;
|
||||
$oldBuild = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq($buildID)->fetch();
|
||||
$build = fixer::input('post')->stripTags($this->config->build->editor->edit['id'], $this->config->allowedTags)
|
||||
->setIF($this->post->branch === '', 'branch', $oldBuild->branch)
|
||||
->setIF(!isset($this->post->branch), 'branch', $oldBuild->branch)
|
||||
->setDefault('product', $oldBuild->product)
|
||||
->cleanInt('product,branch,execution')
|
||||
->remove('allchecker,resolvedBy,files,labels,uid')
|
||||
|
||||
@@ -32,9 +32,8 @@
|
||||
<div class='input-group' id='productBox'>
|
||||
<?php echo html::select('product', $products, empty($product) ? '' : $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required");?>
|
||||
<?php
|
||||
if(!empty($product) and $product->type != 'normal' and isset($branches[$product->id]))
|
||||
if(!empty($product) and $product->type != 'normal')
|
||||
{
|
||||
$branches = $branches[$product->id];
|
||||
echo "<span class='input-group-addon fix-padding fix-border'></span>" . html::select('branch', $branches, $product->branch, "class='form-control chosen'");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -33,9 +33,8 @@
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('product', $products, $build->product, "onchange='loadBranches(this.value);' class='form-control chosen' $disabled required");?>
|
||||
<?php
|
||||
if($build->productType != 'normal' and isset($branches[$build->product]))
|
||||
if($build->productType != 'normal')
|
||||
{
|
||||
$branches = $branches[$build->product];
|
||||
echo "<span class='input-group-addon fix-padding fix-border'></span>" . html::select('branch', $branches, $build->branch, "class='form-control chosen' $disabled");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -105,7 +105,7 @@ $(function()
|
||||
<td><?php echo html::radio('showAllModule', $lang->datatable->showAllModuleList, isset($config->execution->task->allModule) ? $config->execution->task->allModule : 0);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($product) and $product->type != 'normal' and $this->app->tab == 'product' or $this->app->tab == 'qa'):?>
|
||||
<?php if(!empty($product) and $product->type != 'normal' and ($this->app->tab == 'product' or $this->app->tab == 'qa')):?>
|
||||
<tr>
|
||||
<td><?php echo $lang->datatable->showBranch;?></td>
|
||||
<td><?php echo html::radio('showBranch', $lang->datatable->showBranchList, isset($config->$currentModule->$currentMethod->showBranch) ? $config->$currentModule->$currentMethod->showBranch : 1);?></td>
|
||||
|
||||
@@ -1382,7 +1382,7 @@ class execution extends control
|
||||
$this->view->code = $code;
|
||||
$this->view->team = $team;
|
||||
$this->view->teams = array(0 => '') + $this->execution->getTeamPairsByProject((int)$projectID);
|
||||
$this->view->allProjects = array(0 => '') + $this->project->getPairsByModel();
|
||||
$this->view->allProjects = array(0 => '') + $this->project->getPairsByModel('all', 0, 'noclosed');
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->projectID = $projectID;
|
||||
@@ -1538,7 +1538,7 @@ class execution extends control
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
$this->view->allProjects = $this->project->getPairsByModel();
|
||||
$this->view->allProjects = $this->project->getPairsByModel('all', 0, 'noclosed');
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
@@ -1619,7 +1619,7 @@ class execution extends control
|
||||
$this->view->position[] = $this->lang->execution->batchEdit;
|
||||
$this->view->executionIDList = $executionIDList;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->allProjects = $this->project->getPairsByModel();
|
||||
$this->view->allProjects = $this->project->getPairsByModel('all', 0, 'noclosed');
|
||||
$this->view->pmUsers = $pmUsers;
|
||||
$this->view->poUsers = $poUsers;
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $case->pri?>' title='<?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<?php $params = "testcaseID=$caseID&version=$case->version";?>
|
||||
<?php if($type == 'assigntome') $params .= "&from=testtask&taskID=$case->task";?>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'");?></td>
|
||||
<td class='c-title text-left'><?php echo html::a($this->createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'");?></td>
|
||||
<td><?php echo zget($lang->testcase->typeList, $case->type);?></td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
|
||||
@@ -86,6 +86,7 @@ $lang->misc->feature->detailed = 'Detail';
|
||||
$lang->misc->feature->introduction = 'Features';
|
||||
$lang->misc->feature->tutorial = 'Tutorial';
|
||||
$lang->misc->feature->youngBlueTheme = 'Young Blue Theme';
|
||||
$lang->misc->feature->youngBlueImage = 'theme/default/images/main/new_theme_en.png';
|
||||
$lang->misc->feature->nextStep = 'Next step';
|
||||
$lang->misc->feature->close = 'Close';
|
||||
$lang->misc->feature->downloadFile = 'Download introduction';
|
||||
|
||||
@@ -86,6 +86,7 @@ $lang->misc->feature->detailed = '详情';
|
||||
$lang->misc->feature->introduction = '新功能介绍';
|
||||
$lang->misc->feature->tutorial = '新手引导教程';
|
||||
$lang->misc->feature->youngBlueTheme = '全新青春蓝主题';
|
||||
$lang->misc->feature->youngBlueImage = 'theme/default/images/main/new_theme.png';
|
||||
$lang->misc->feature->nextStep = '下一步';
|
||||
$lang->misc->feature->close = '关闭';
|
||||
$lang->misc->feature->downloadFile = '下载新版本功能介绍文档';
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<?php elseif($feature == 'youngBlueTheme'):?>
|
||||
<div class='text-center'>
|
||||
<?php echo $lang->misc->feature->themeDesc;?>
|
||||
<img class='text-center' src='<?php echo $config->webRoot . 'theme/default/images/main/new_theme.png';?>' />
|
||||
<img class='text-center' src='<?php echo $config->webRoot . $lang->misc->feature->youngBlueImage;?>' />
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -884,7 +884,7 @@ class productModel extends model
|
||||
else
|
||||
{
|
||||
$this->config->product->search['fields']['branch'] = sprintf($this->lang->product->branch, $this->lang->product->branchName[$productInfo->type]);
|
||||
$this->config->product->search['params']['branch']['values'] = array('' => '', '0' => $this->lang->branch->main) + $this->loadModel('branch')->getPairs($productID, 'noempty') + array('all' => $this->lang->branch->all);
|
||||
$this->config->product->search['params']['branch']['values'] = array('' => '', '0' => $this->lang->branch->main) + $this->loadModel('branch')->getPairs($productID, 'noempty');
|
||||
}
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->product->search);
|
||||
|
||||
@@ -647,7 +647,7 @@ class projectModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPairsByModel($model = 'all', $programID = 0)
|
||||
public function getPairsByModel($model = 'all', $programID = 0, $param = '')
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProjectPairs();
|
||||
|
||||
@@ -655,6 +655,7 @@ class projectModel extends model
|
||||
->where('type')->eq('project')
|
||||
->beginIF($programID)->andWhere('parent')->eq($programID)->fi()
|
||||
->beginIF($model != 'all')->andWhere('model')->eq($model)->fi()
|
||||
->beginIF(strpos($param, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
|
||||
->andWhere('deleted')->eq('0')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->orderBy('id_desc')
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
Reference in New Issue
Block a user