export.html.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * The export view file of task module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Yanyi Cao <caoyanyi@easycorp.ltd>
  7. * @package task
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. include '../../file/ui/export.html.php';
  12. $canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($execution) ? $execution : null);
  13. $canBatchClose = common::hasPriv('task', 'batchClose', !empty($execution) ? $execution : null) && strtolower($type) != 'closed';
  14. $canBatchCancel = common::hasPriv('task', 'batchCancel', !empty($execution) ? $execution : null) && strtolower($type) != 'cancel';
  15. $canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($execution) ? $execution : null);
  16. $canBatchChangeModule = common::hasPriv('task', 'batchChangeModule', !empty($execution) ? $execution : null);
  17. $canBatchAction = in_array(true, array($canBatchEdit, $canBatchClose, $canBatchCancel, $canBatchChangeModule, $canBatchAssignTo));
  18. if(!$canBatchAction)
  19. {
  20. global $lang;
  21. query('#exportPanel .form-row.exportRange')->replaceWith
  22. (
  23. formRow
  24. (
  25. formGroup
  26. (
  27. set::label($lang->file->exportRange),
  28. set::control('picker'),
  29. set::name('exportType'),
  30. set::items($lang->exportTypeList),
  31. set::required(true),
  32. set::disabled(true)
  33. )
  34. )
  35. );
  36. }