kanban.html.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * The kanban view file of product 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 Sun Guangming<sungunagming@easycorp.ltd>
  7. * @package project
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $privs = array
  12. (
  13. 'canViewExecution' => common::hasPriv('execution', 'task'),
  14. 'canViewProject' => common::hasPriv('project', 'index'),
  15. 'canViewRelease' => common::hasPriv('release', 'view'),
  16. 'canViewPlan' => common::hasPriv('productplan', 'view'),
  17. );
  18. foreach($kanbanList as $current => $region)
  19. {
  20. foreach($region['items'] as $index => $group)
  21. {
  22. $group['draggable'] = true;
  23. $group['colWidth'] = 'auto';
  24. $group['maxLaneHeight'] = '300px';
  25. $group['getCol'] = jsRaw('window.getCol');
  26. $group['getItem'] = jsRaw('window.getItem');
  27. $group['itemRender'] = jsRaw('window.itemRender');
  28. $group['canDrop'] = jsRaw('window.canDrop');
  29. $group['onDrop'] = jsRaw('window.onDrop');
  30. $kanbanList[$current]['items'][$index] = $group;
  31. }
  32. }
  33. jsVar('privs', $privs);
  34. jsVar('delayed', $lang->project->statusList['delay']);
  35. featureBar(li
  36. (
  37. setClass('nav-item item'),
  38. a($browseType == 'my' ? setClass('active') : null, set::href(createLink('product', 'kanban', "browseType=my")), $lang->product->myProduct)
  39. ), li
  40. (
  41. setClass('nav-item item'),
  42. set::active($browseType == 'other'),
  43. a($browseType == 'other' ? setClass('active') : null, set::href(createLink('product', 'kanban', "browseType=other")), $lang->product->otherProduct)
  44. ));
  45. if(empty($kanbanList))
  46. {
  47. panel
  48. (
  49. div
  50. (
  51. setClass('dtable-empty-tip'),
  52. div(setClass('row gap-4 items-center'), span
  53. (
  54. setClass('text-gray'),
  55. $lang->noData
  56. ))
  57. )
  58. );
  59. }
  60. else
  61. {
  62. zui::kanbanList
  63. (
  64. set::key('kanban'),
  65. set::items($kanbanList),
  66. set::height('calc(100vh - 120px)')
  67. );
  68. }