singleplanblock.html.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * The singleproductplanblock 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 Mengyi Liu <liumengyi@easycorp.ltd>
  7. * @package block
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('delay', $lang->block->delay);
  12. if(!$longBlock)
  13. {
  14. unset($config->block->plan->dtable->fieldList['id']);
  15. unset($config->block->plan->dtable->fieldList['product']);
  16. unset($config->block->plan->dtable->fieldList['hour']);
  17. unset($config->block->plan->dtable->fieldList['bugs']);
  18. }
  19. else
  20. {
  21. $config->block->plan->dtable->fieldList['product']['map'] = $products;
  22. foreach($plans as $plan) $plan->hour .= $config->hourUnit;
  23. }
  24. blockPanel
  25. (
  26. setClass('plan-block list-block'),
  27. dtable
  28. (
  29. set::height(318),
  30. set::fixedLeftWidth($longBlock ? '0.33' : '0.5'),
  31. set::onRenderCell(jsRaw('window.onRenderPlanNameCell')),
  32. set::cols(array_values($config->block->plan->dtable->fieldList)),
  33. set::data(array_values($plans))
  34. )
  35. );
  36. render();