storyblock.html.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * The story 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. if(!$longBlock)
  12. {
  13. unset($config->block->story->dtable->fieldList['status']);
  14. unset($config->block->story->dtable->fieldList['category']);
  15. unset($config->block->story->dtable->fieldList['estimate']);
  16. unset($config->block->story->dtable->fieldList['stage']);
  17. }
  18. else
  19. {
  20. foreach($stories as $story) $story->estimate .= $config->hourUnit;
  21. }
  22. blockPanel
  23. (
  24. setClass('list-block'),
  25. dtable
  26. (
  27. set::height(318),
  28. set::fixedLeftWidth($longBlock ? '0.5' : '0.8'),
  29. set::cols(array_values($config->block->story->dtable->fieldList)),
  30. set::data(array_values($stories))
  31. )
  32. );
  33. render();