diff --git a/module/task/control.php b/module/task/control.php index c002bf6a7a..86fa61aed1 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1135,6 +1135,7 @@ class task extends control $this->view->orderBy = $orderBy; $this->view->type = $type; $this->view->executionID = $executionID; + $this->view->execution = $execution; $this->display(); } diff --git a/module/task/ui/export.html.php b/module/task/ui/export.html.php index 08f71ca82f..fa51f8023f 100644 --- a/module/task/ui/export.html.php +++ b/module/task/ui/export.html.php @@ -8,4 +8,12 @@ declare(strict_types=1); * @package task * @link https://www.zentao.net */ +namespace zin; include '../../file/ui/export.html.php'; + +$canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($execution) ? $execution : null); +$canBatchClose = common::hasPriv('task', 'batchClose', !empty($execution) ? $execution : null) && strtolower($type) != 'closed'; +$canBatchCancel = common::hasPriv('task', 'batchCancel', !empty($execution) ? $execution : null) && strtolower($type) != 'cancel'; +$canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($execution) ? $execution : null); +$canBatchChangeModule = common::hasPriv('task', 'batchChangeModule', !empty($execution) ? $execution : null); +$canBatchAction = in_array(true, array($canBatchEdit, $canBatchClose, $canBatchCancel, $canBatchChangeModule, $canBatchAssignTo));