This commit is contained in:
mayue
2021-12-01 17:14:43 +08:00
parent e44737b3b3
commit eec94fd383
3 changed files with 9 additions and 5 deletions
+3 -3
View File
@@ -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> ';