Merge branch 'sprint/zentaopms271_lanzongjun' into 'master'
* Finish Task #78673#78688 See merge request easycorp/zentaopms!6489
This commit is contained in:
@@ -14,6 +14,12 @@ $().ready(function()
|
||||
if(data) $('#buildBox').html(data);
|
||||
$('#builds').attr('data-placeholder', multipleSelect).chosen();
|
||||
});
|
||||
|
||||
$.get(createLink('product', 'ajaxGetProductById', 'produtID=' + productID), function(data)
|
||||
{
|
||||
console.log(data.branchName)
|
||||
$('#branchBox').closest('tr').find('th').text(data.branchName);
|
||||
}, 'json');
|
||||
});
|
||||
|
||||
$('input[name=isIntegrated]').change(function()
|
||||
@@ -69,6 +75,11 @@ function loadProducts(executionID)
|
||||
loadBranches($("#product").val());
|
||||
}
|
||||
});
|
||||
|
||||
$.get(createLink('product', 'ajaxGetProductById', 'produtID=' + $("#product").val()), function(data)
|
||||
{
|
||||
$('#branchBox').closest('tr').find('th').text(data.branchName);
|
||||
}, 'json');
|
||||
loadLastBuild();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class='<?php if(!empty($product) and $product->type == 'normal') echo 'hidden'?>'>
|
||||
<th class='w-120px'><?php echo $lang->build->branch;?></th>
|
||||
<th class='w-120px'><?php echo $product->type == 'normal' ? '' : $lang->product->branchName[$product->type]?></th>
|
||||
<td>
|
||||
<div class='input-group' id='branchBox'>
|
||||
<?php echo html::select('branch[]', $branches, key($product->branches), "class='form-control chosen' multiple required"); ?>
|
||||
|
||||
@@ -356,7 +356,7 @@ class product extends control
|
||||
$this->view->productName = $productName;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID, ($branch === 'all' or empty($branch)) ? '' : $branch, '', true);
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID, ($branch === 'all' or empty($branch)) ? '' : $branch, 'unexpired', true);
|
||||
$this->view->productPlans = isset($productPlans) ? array(0 => '') + $productPlans : array();
|
||||
$this->view->summary = $this->product->summary($stories, $storyType);
|
||||
$this->view->moduleTree = $moduleTree;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#releaseList tr:hover {background-color:unset;}
|
||||
td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
|
||||
.c-build {width: 250px;}
|
||||
.c-build {width: 300px;}
|
||||
.c-branch {width: 200px;}
|
||||
td.c-build {padding-left:8px !important;}
|
||||
.c-product, .c-execution {width: 120px;}
|
||||
|
||||
@@ -85,7 +85,20 @@ class projectreleaseModel extends model
|
||||
{
|
||||
$release->project = trim($release->project, ',');
|
||||
$release->branch = trim($release->branch, ',');
|
||||
$release->build = trim($release->build, ',');
|
||||
|
||||
$branchName = '';
|
||||
if($release->branch != 'normal')
|
||||
{
|
||||
foreach(explode(',', $release->branch) as $releaseBranch)
|
||||
{
|
||||
$branchName .= $this->loadModel('branch')->getById($releaseBranch);
|
||||
$branchName .= ',';
|
||||
}
|
||||
$branchName = trim($branchName, ',');
|
||||
}
|
||||
$release->branchName = empty($branchName) ? $this->lang->branch->main : $branchName;
|
||||
$release->build = trim($release->build, ',');
|
||||
|
||||
$buildIdList = array_merge($buildIdList, explode(',', $release->build));
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<th class='c-product'><?php echo $lang->projectrelease->product;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-build'><?php echo $lang->release->includedBuild;?></th>
|
||||
<th class='c-branch text-center'><?php echo $lang->release->branch;?></th>
|
||||
<th class='c-status text-center'><?php echo $lang->release->status;?></th>
|
||||
<th class='c-date text-center'><?php echo $lang->release->date;?></th>
|
||||
<?php
|
||||
@@ -87,6 +88,7 @@
|
||||
<td class='c-build'><?php if($buildCount) echo html::a($this->createLink($build->execution ? 'build' : 'projectbuild', 'view', "buildID=$buildID"), $build->name, '', "data-app='project' title='{$build->name}'");?></td>
|
||||
<?php if($i == 0):?>
|
||||
<?php $status = $this->processStatus('release', $release);?>
|
||||
<td <?php echo $rowspan?> class='c-branch text-center'><?php echo $release->branchName; ?></td>
|
||||
<td <?php echo $rowspan?> class='c-status text-center' title='<?php echo $status;?>'>
|
||||
<span class="status-release status-<?php echo $release->status?>"><?php echo $status;?></span>
|
||||
</td>
|
||||
|
||||
@@ -236,7 +236,11 @@ class releaseModel extends model
|
||||
if($linkedBuilds) $builds += $this->dao->select('id,project,branch,builds,stories,bugs')->from(TABLE_BUILD)->where('id')->in($linkedBuilds)->fetchAll('id');
|
||||
foreach($builds as $build)
|
||||
{
|
||||
$branches[$build->branch] = $build->branch;
|
||||
foreach(explode(',', $build->branch) as $buildBranch)
|
||||
{
|
||||
if(!isset($branches[$buildBranch])) $branches[$buildBranch] = $buildBranch;
|
||||
}
|
||||
|
||||
$projects[$build->project] = $build->project;
|
||||
|
||||
if($this->post->sync)
|
||||
|
||||
Reference in New Issue
Block a user