From 595e3e35c4197313c79c4b89dd5b805bb427741b Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Thu, 13 Aug 2020 09:38:57 +0800 Subject: [PATCH] * Fix bug #2573. --- module/bug/model.php | 2 +- module/bug/view/browse.html.php | 37 ++++++++++++++++++--------- module/caselib/view/browse.html.php | 4 ++- module/my/view/bug.html.php | 22 ++++++++++------ module/my/view/story.html.php | 20 +++++++++------ module/my/view/todo.html.php | 21 +++++++++------ module/product/view/browse.html.php | 29 ++++++++++++++------- module/productplan/view/view.html.php | 2 +- module/project/view/all.html.php | 4 ++- module/project/view/story.html.php | 14 ++++++---- module/project/view/task.html.php | 19 ++++++++------ module/release/view/view.html.php | 11 +++++--- module/story/model.php | 20 ++++++++++++++- module/task/model.php | 4 +-- module/testcase/model.php | 18 ++++++++++++- module/testcase/view/browse.html.php | 25 +++++++++++++----- module/testtask/model.php | 16 +++++++++++- module/testtask/view/cases.html.php | 7 ++--- 18 files changed, 194 insertions(+), 81 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 18fe679913..0d83189197 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2494,7 +2494,7 @@ class bugModel extends model $canBatchResolve = common::hasPriv('bug', 'batchResolve'); $canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo'); - $canBatchAction = $canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo; + $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); $canView = common::hasPriv('bug', 'view'); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 7697d91a08..ef3c1b5ab0 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -206,6 +206,17 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $setting = $this->datatable->getSetting('bug'); $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; + + $canBatchEdit = common::hasPriv('bug', 'batchEdit'); + $canBatchConfirm = common::hasPriv('bug', 'batchConfirm'); + $canBatchClose = common::hasPriv('bug', 'batchClose'); + $canBatchActivate = common::hasPriv('bug', 'batchActivate'); + $canBatchChangeBranch = common::hasPriv('bug', 'batchChangeBranch'); + $canBatchChangeModule = common::hasPriv('bug', 'batchChangeModule'); + $canBatchResolve = common::hasPriv('bug', 'batchResolve'); + $canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo'); + + $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); ?> ';?> ' id='bugList' data-fixed-left-width='' data-fixed-right-width=''> @@ -219,7 +230,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow if(common::checkNotCN() and $value->id == 'severity') $value->name = $lang->bug->severity; if(common::checkNotCN() and $value->id == 'pri') $value->name = $lang->bug->pri; if(common::checkNotCN() and $value->id == 'confirmed') $value->name = $lang->bug->confirmed; - $this->datatable->printHead($value, $orderBy, $vars); + $this->datatable->printHead($value, $orderBy, $vars, $canBatchAction); $columns ++; } } @@ -236,33 +247,35 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
';?> - +
10;?> diff --git a/module/caselib/view/browse.html.php b/module/caselib/view/browse.html.php index 2071d0642c..085d032cd5 100644 --- a/module/caselib/view/browse.html.php +++ b/module/caselib/view/browse.html.php @@ -97,7 +97,7 @@ js::set('flow', $config->global->flow); testcase->needReview or !empty($config->testcase->forceReview));?> - + recTotal}&recPerPage={$pager->recPerPage}";?>
@@ -155,7 +155,9 @@ js::set('flow', $config->global->flow);