*Finish task #46100.
This commit is contained in:
+12
-18
@@ -169,29 +169,23 @@ class build extends control
|
||||
$productGroups[$build->product] = $product;
|
||||
}
|
||||
|
||||
$branchGroups = $this->loadModel('project')->getBranchesByProject($build->execution);
|
||||
$branchPairs = $this->loadModel('branch')->getPairs($build->product);
|
||||
$products = array();
|
||||
$branches = array();
|
||||
|
||||
/* Set branches and products. */
|
||||
if($productGroups[$build->product]->type != 'normal' and isset($branchGroups[$build->product]))
|
||||
/* Display status of branch. */
|
||||
$branches = $this->loadModel('branch')->getList($build->product, $build->execution, 'all');
|
||||
$branchTagOption = array();
|
||||
foreach($branches as $branchInfo)
|
||||
{
|
||||
foreach($branchGroups[$build->product] as $branchID => $branch)
|
||||
{
|
||||
$branches[$branchID] = $branchPairs[$branchID];
|
||||
}
|
||||
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
|
||||
}
|
||||
|
||||
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;
|
||||
$this->view->product = isset($productGroups[$build->product]) ? $productGroups[$build->product] : '';
|
||||
$this->view->branches = $branches;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$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;
|
||||
$this->view->product = isset($productGroups[$build->product]) ? $productGroups[$build->product] : '';
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->orderBy = $orderBy;
|
||||
|
||||
$this->view->productGroups = $productGroups;
|
||||
$this->view->products = $products;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<?php
|
||||
if($build->productType != 'normal')
|
||||
{
|
||||
echo "<span class='input-group-addon fix-padding fix-border'></span>" . html::select('branch', $branches, $build->branch, "class='form-control chosen' $disabled");
|
||||
echo "<span class='input-group-addon fix-padding fix-border'></span>" . html::select('branch', $branchTagOption, $build->branch, "class='form-control chosen' $disabled");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $plan->id;?></span>
|
||||
<span title='<?php echo $plan->title;?>' class='text'><?php echo $plan->title;?></span>
|
||||
<?php if($product->type !== 'normal') echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>" . $branches[$branch] . '</span>';?>
|
||||
<?php if($product->type !== 'normal') echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>" . $branchOption[$branch] . '</span>';?>
|
||||
<span class='label label-info label-badge'>
|
||||
<?php echo ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? $lang->productplan->future : $plan->begin . '~' . $plan->end;?>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user