whitelist.html.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * The whitelist view file of personnel 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 Mengyi Liu <liumengyi@easycorp.ltd>
  7. * @package personnel
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $config->personnel->whitelist->actionList['unbindWhitelist']['url'] = array('module' => $module, 'method' => 'unbindWhitelist', 'params' => 'userID={id}');
  12. $config->personnel->whitelist->dtable->fieldList['dept']['map'] = $depts;
  13. $whitelist = initTableData($whitelist, $config->personnel->whitelist->dtable->fieldList, $this->personnel);
  14. $cols = array_values($config->personnel->whitelist->dtable->fieldList);
  15. $data = array_values($whitelist);
  16. dropmenu();
  17. featureBar
  18. (
  19. set::current('all'),
  20. set::linkParams("objectID={$objectID}&module=whitelist&objectType={$objectType}")
  21. );
  22. $whitelistVars = $module == 'program' ? "objectID={$objectID}&programID={$projectProgramID}&module={$module}&from={$from}" : "objectID={$objectID}";
  23. $addWhitelistVars = $module == 'program' ? "objectID={$objectID}&deptID=0&copyID=0&programID={$projectProgramID}&from={$from}" : "objectID={$objectID}";
  24. toolbar
  25. (
  26. btngroup
  27. (
  28. btn
  29. (
  30. setClass('btn primary'),
  31. set::icon('plus'),
  32. set::url(helper::createLink($module, 'addWhitelist', $addWhitelistVars)),
  33. $lang->personnel->addWhitelist
  34. )
  35. )
  36. );
  37. dtable
  38. (
  39. set::cols($cols),
  40. set::data($data),
  41. set::fixedLeftWidth('0.33'),
  42. set::footPager(usePager())
  43. );
  44. render();