*Finish task #46100.
This commit is contained in:
+12
-1
@@ -207,6 +207,16 @@ class bug extends control
|
||||
/* Display of branch label. */
|
||||
$showBranch = $this->loadModel('branch')->showBranch($productID);
|
||||
|
||||
/* Display status of branch. */
|
||||
$branches = $this->loadModel('branch')->getList($productID, 0, 'all');
|
||||
$branchOption = array();
|
||||
$branchTagOption = array();
|
||||
foreach($branches as $branchInfo)
|
||||
{
|
||||
$branchOption[$branchInfo->id] = $branchInfo->name;
|
||||
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
|
||||
}
|
||||
|
||||
/* Set view. */
|
||||
$this->view->title = $productName . $this->lang->colon . $this->lang->bug->common;
|
||||
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName,'','title=' . $productName);
|
||||
@@ -229,7 +239,8 @@ class bug extends control
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->memberPairs = $this->user->getPairs('noletter|nodeleted');
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID);
|
||||
$this->view->stories = $storyList;
|
||||
|
||||
@@ -302,11 +302,11 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
{
|
||||
if($value->id == 'title' || $value->id == 'id' || $value->id == 'pri' || $value->id == 'status')
|
||||
{
|
||||
$this->bug->printCell($value, $bug, $users, $builds, $branches, $modulePairs, $executions, $plans, $stories, $tasks, $useDatatable ? 'datatable' : 'table');
|
||||
$this->bug->printCell($value, $bug, $users, $builds, $branchOption, $modulePairs, $executions, $plans, $stories, $tasks, $useDatatable ? 'datatable' : 'table');
|
||||
}
|
||||
}?>
|
||||
<?php else:?>
|
||||
<?php foreach($setting as $value) $this->bug->printCell($value, $bug, $users, $builds, $branches, $modulePairs, $executions, $plans, $stories, $tasks, $useDatatable ? 'datatable' : 'table');?>
|
||||
<?php foreach($setting as $value) $this->bug->printCell($value, $bug, $users, $builds, $branchOption, $modulePairs, $executions, $plans, $stories, $tasks, $useDatatable ? 'datatable' : 'table');?>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
@@ -385,7 +385,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<?php if($canBatchChangeBranch and $this->session->currentProductType != 'normal'):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->product->branchName[$this->session->currentProductType];?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($branches) > 6;?>
|
||||
<?php $withSearch = count($branchTagOption) > 6;?>
|
||||
<?php if($withSearch):?>
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
@@ -393,13 +393,13 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php $branchsPinYin = common::convert2Pinyin($branches);?>
|
||||
<?php $branchsPinYin = common::convert2Pinyin($branchTagOption);?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach($branches as $branchID => $branchName)
|
||||
foreach($branchTagOption as $branchID => $branchName)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($branchsPinYin, $branchName, '') . '"') : '';
|
||||
$actionLink = $this->createLink('bug', 'batchChangeBranch', "branchID=$branchID");
|
||||
|
||||
@@ -291,12 +291,12 @@
|
||||
|
||||
if($canBatchChangeBranch and $this->session->currentProductType != 'normal')
|
||||
{
|
||||
$withSearch = count($branches) > 8;
|
||||
$withSearch = count($branchTagOption) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->product->branchName[$this->session->currentProductType], '', "id='branchItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($branches as $branchID => $branchName)
|
||||
foreach($branchTagOption as $branchID => $branchName)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangeBranch', "branchID=$branchID");
|
||||
echo "<li class='option' data-key='$branchID'>" . html::a('#', $branchName, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', this)\"") . "</li>";
|
||||
@@ -569,7 +569,7 @@
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->branch;?></th>
|
||||
<td><?php echo $branches[$plan->branch];?></td>
|
||||
<td><?php echo $branchOption[$plan->branch];?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
+37
-26
@@ -189,36 +189,47 @@ class testcase extends control
|
||||
/* Display of branch label. */
|
||||
$showBranch = $this->loadModel('branch')->showBranch($productID);
|
||||
|
||||
/* Display status of branch. */
|
||||
$branches = $this->loadModel('branch')->getList($productID, $projectID, 'all');
|
||||
$branchOption = array();
|
||||
$branchTagOption = array();
|
||||
foreach($branches as $branchInfo)
|
||||
{
|
||||
$branchOption[$branchInfo->id] = $branchInfo->name;
|
||||
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
|
||||
}
|
||||
|
||||
$product = $this->product->getById($productID);
|
||||
|
||||
/* Assign. */
|
||||
$tree = $moduleID ? $this->tree->getByID($moduleID) : '';
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->testcase->common;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch);
|
||||
$this->view->moduleTree = $moduleTree;
|
||||
$this->view->moduleName = $moduleID ? $tree->name : $this->lang->tree->all;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->projectType = !empty($projectID) ? $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model') : '';
|
||||
$this->view->summary = $this->testcase->summary($cases);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
|
||||
$this->view->suiteID = $suiteID;
|
||||
$this->view->setModule = true;
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
|
||||
$this->view->showBranch = $showBranch;
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->testcase->common;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch);
|
||||
$this->view->moduleTree = $moduleTree;
|
||||
$this->view->moduleName = $moduleID ? $tree->name : $this->lang->tree->all;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->projectType = !empty($projectID) ? $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model') : '';
|
||||
$this->view->summary = $this->testcase->summary($cases);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
|
||||
$this->view->suiteID = $suiteID;
|
||||
$this->view->setModule = true;
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
|
||||
$this->view->showBranch = $showBranch;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ js::set('suiteID', $suiteID);
|
||||
<tbody>
|
||||
<?php foreach($cases as $case):?>
|
||||
<tr data-id='<?php echo $case->id?>'>
|
||||
<?php foreach($setting as $key => $value) $this->testcase->printCell($value, $case, $users, $branches, $modulePairs, $browseType, $useDatatable ? 'datatable' : 'table');?>
|
||||
<?php foreach($setting as $key => $value) $this->testcase->printCell($value, $case, $users, $branchOption, $modulePairs, $browseType, $useDatatable ? 'datatable' : 'table');?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
@@ -182,7 +182,7 @@ js::set('suiteID', $suiteID);
|
||||
<?php if(common::hasPriv('testcase', 'batchChangeBranch') and $this->session->currentProductType != 'normal'):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->product->branchName[$this->session->currentProductType];?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($branches) > 6;?>
|
||||
<?php $withSearch = count($branchTagOption) > 6;?>
|
||||
<?php if($withSearch):?>
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
@@ -190,13 +190,13 @@ js::set('suiteID', $suiteID);
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php $branchsPinYin = common::convert2Pinyin($branches);?>
|
||||
<?php $branchsPinYin = common::convert2Pinyin($branchTagOption);?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach($branches as $branchID => $branchName)
|
||||
foreach($branchTagOption as $branchID => $branchName)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($branchsPinYin, $branchName, '') . '"') : '';
|
||||
$actionLink = $this->createLink('testcase', 'batchChangeBranch', "branchID=$branchID");
|
||||
|
||||
Reference in New Issue
Block a user