calendar.html.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * The calendar view file of execution module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2026 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @license ZPL (http://zpl.pub/page/zplv12.html)
  7. * @author Hao Sun <sunhao@chandao.com>
  8. * @package execution
  9. * @version $Id: editrelation.html.php 935 2024-08-08 15:14:24Z $
  10. * @link https://www.zentao.net
  11. */
  12. namespace zin;
  13. if($config->vision == 'lite') include 'header.html.php';
  14. $canCreateTask = hasPriv('task', 'create', (object)['execution' => $executionID]);
  15. $canExportTask = hasPriv('task', 'export');
  16. $createLink = createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
  17. featureBar();
  18. $toolbarItems = [];
  19. $toolbarItems[] = ['type' => 'ghost', 'text' => $lang->task->export, 'icon' => 'import', 'disabled' => !$canExportTask, 'url' => $canExportTask ? createLink('task', 'export', "execution=$executionID&orderBy=$orderBy&type=calendar") : '#', 'data-toggle' => 'modal', 'data-size' => 620];
  20. if($canCreateTask) $toolbarItems[] = ['type' => 'primary', 'text' => $lang->task->create, 'icon' => 'plus', 'url' => $createLink];
  21. toolbar(set::items($toolbarItems));
  22. $waitTaskLists = [];
  23. foreach($events as $i => $task)
  24. {
  25. if($task['status'] != 'wait') continue;
  26. $waitTaskLists[] = (object)$task;
  27. }
  28. sidebar
  29. (
  30. set::side('right'),
  31. set::width(280),
  32. panel
  33. (
  34. set::title($lang->task->waitTask),
  35. set::bodyClass('pt-0 overflow-y-auto scrollbar-hover'),
  36. set::bodyProps(['style' => ['max-height' => 'calc(100vh - 130px)']]),
  37. entitylist
  38. (
  39. set::type('task'),
  40. set::items($waitTaskLists)
  41. )
  42. )
  43. );
  44. panel
  45. (
  46. zui::calendar
  47. (
  48. set::_id('calendar'),
  49. set::tasks($events),
  50. set::hideEmptyWeekends(),
  51. set('$options', jsRaw('window.setCalendarOptions'))
  52. )
  53. );