scrumlistblock.html.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * The scrumlist block view file of block 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 Yuting Wang <wangyuting@easycorp.ltd>
  7. * @package block
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('delayInfo', $lang->project->delayInfo);
  12. foreach($executionStats as $scrum)
  13. {
  14. $scrum->totalEstimate = zget($scrum, 'estimate', 0) . $lang->execution->workHourUnit;
  15. $scrum->totalConsumed = zget($scrum, 'consumed', 0) . $lang->execution->workHourUnit;
  16. $scrum->totalLeft = zget($scrum, 'left', 0) . $lang->execution->workHourUnit;
  17. $scrum->progress = zget($scrum, 'progress', 0);
  18. $scrum->totalEstimate = helper::formatHours($scrum->totalEstimate);
  19. $scrum->totalConsumed = helper::formatHours($scrum->totalConsumed);
  20. $scrum->totalLeft = helper::formatHours($scrum->totalLeft);
  21. }
  22. if(!$longBlock)
  23. {
  24. unset($config->block->scrum->dtable->fieldList['status']);
  25. unset($config->block->scrum->dtable->fieldList['totalEstimate']);
  26. unset($config->block->scrum->dtable->fieldList['totalConsumed']);
  27. unset($config->block->scrum->dtable->fieldList['totalLeft']);
  28. unset($config->block->scrum->dtable->fieldList['burns']);
  29. }
  30. panel
  31. (
  32. setClass('p-0 scrumlist-block list-block ' . ($longBlock ? 'block-long' : 'block-sm')),
  33. set::title($block->title),
  34. set::headingClass('border-b'),
  35. to::headingActions
  36. (
  37. a
  38. (
  39. set('class', 'text-gray'),
  40. set('href', $block->moreLink),
  41. $lang->more,
  42. icon('caret-right')
  43. )
  44. ),
  45. dtable
  46. (
  47. set::height(318),
  48. set::horzScrollbarPos('inside'),
  49. set::fixedLeftWidth($longBlock ? '0.33' : '0.5'),
  50. set::cols(array_values($config->block->scrum->dtable->fieldList)),
  51. set::data(array_values($executionStats)),
  52. set::onRenderCell(jsRaw('window.onRenderScrumNameCell'))
  53. )
  54. );
  55. render();