* Fix bug #16936.
This commit is contained in:
@@ -176,6 +176,9 @@ class caselib extends control
|
||||
$this->session->set('caseList', $this->app->getURI(true), 'qa');
|
||||
$this->session->set('caselibList', $this->app->getURI(true), 'qa');
|
||||
|
||||
/* Display of branch label. */
|
||||
$isShowBranch = $this->loadModel('branch')->isShowBranch(0);
|
||||
|
||||
/* Set menu. */
|
||||
$libID = $this->caselib->saveLibState($libID, $libraries);
|
||||
setcookie('preCaseLibID', $libID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
@@ -231,6 +234,7 @@ class caselib extends control
|
||||
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
|
||||
$this->view->param = $param;
|
||||
$this->view->setModule = true;
|
||||
$this->view->isShowBranch = $isShowBranch;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ body {margin-bottom: 25px;}
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr data-id='<?php echo $task->id;?>' data-status='<?php echo $task->status?>' data-estimate='<?php echo $task->estimate?>' data-consumed='<?php echo $task->consumed?>' data-left='<?php echo $task->left?>'>
|
||||
<?php foreach($customFields as $field) $this->task->printCell($field, $task, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table');?>
|
||||
<?php foreach($customFields as $field) $this->task->printCell($field, $task, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', false, $isShowBranch);?>
|
||||
</tr>
|
||||
<?php if(!empty($task->children)):?>
|
||||
<?php $i = 0;?>
|
||||
@@ -258,7 +258,7 @@ body {margin-bottom: 25px;}
|
||||
<?php $class = $i == 0 ? ' table-child-top' : '';?>
|
||||
<?php $class .= ($i + 1 == count($task->children)) ? ' table-child-bottom' : '';?>
|
||||
<tr class='table-children<?php echo $class;?> parent-<?php echo $task->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>' data-consumed='<?php echo $child->consumed?>' data-left='<?php echo $child->left?>'>
|
||||
<?php foreach($customFields as $field) $this->task->printCell($field, $child, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', true);?>
|
||||
<?php foreach($customFields as $field) $this->task->printCell($field, $child, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', true, $isShowBranch);?>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endforeach;?>
|
||||
|
||||
@@ -3011,7 +3011,7 @@ class taskModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function printCell($col, $task, $users, $browseType, $branchGroups, $modulePairs = array(), $mode = 'datatable', $child = false)
|
||||
public function printCell($col, $task, $users, $browseType, $branchGroups, $modulePairs = array(), $mode = 'datatable', $child = false, $isShowBranch = false)
|
||||
{
|
||||
$canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($task) ? $task : null);
|
||||
$canBatchClose = (common::hasPriv('task', 'batchClose', !empty($task) ? $task : null) and strtolower($browseType) != 'closed');
|
||||
@@ -3070,9 +3070,9 @@ class taskModel extends model
|
||||
echo "</span>";
|
||||
break;
|
||||
case 'name':
|
||||
$showBranch = isset($this->config->execution->task->showBranch) ? $this->config->execution->task->showBranch : 1;
|
||||
if($isShowBranch) $isShowBranch = isset($this->config->execution->task->showBranch) ? $this->config->execution->task->showBranch : 1;
|
||||
if($task->parent > 0 and isset($task->parentName)) $task->name = "{$task->parentName} / {$task->name}";
|
||||
if(!empty($task->product) and isset($branchGroups[$task->product][$task->branch]) and $showBranch) echo "<span class='label label-badge label-outline'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
|
||||
if(!empty($task->product) and isset($branchGroups[$task->product][$task->branch]) and $isShowBranch) echo "<span class='label label-badge label-outline'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
|
||||
if($task->module and isset($modulePairs[$task->module])) echo "<span class='label label-gray label-badge'>" . $modulePairs[$task->module] . '</span> ';
|
||||
if($task->parent > 0) echo '<span class="label label-badge label-light" title="' . $this->lang->task->children . '">' . $this->lang->task->childrenAB . '</span> ';
|
||||
if(!empty($task->team)) echo '<span class="label label-badge label-light" title="' . $this->lang->task->multiple . '">' . $this->lang->task->multipleAB . '</span> ';
|
||||
|
||||
Reference in New Issue
Block a user