drillmodal.html.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * The drill data modal view file of pivot module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2024 禅道软件(青岛)有限公司(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 Tingting Dai <daitingting@easycorp.ltd>
  7. * @package pivot
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. modalHeader
  12. (
  13. set::titleClass('text-lg font-bold'),
  14. set::title($lang->pivot->stepDrill->drillView)
  15. );
  16. foreach($datas as $index => $data)
  17. {
  18. foreach($data as $key => $value)
  19. {
  20. foreach($cols as $col)
  21. {
  22. if(isset($col['name']) && $col['name'] != $key) continue;
  23. if(isset($col['type']) && $col['type'] == 'user' && is_string($value) && strpos($value, ',') !== false) $datas[$index]->$key = explode(',', $value);
  24. }
  25. }
  26. }
  27. dtable
  28. (
  29. isset($from) && $from == 'screen' ? set::_class('dark') : null,
  30. set::striped(true),
  31. set::bordered(true),
  32. set::cols($cols),
  33. set::data($datas),
  34. set::userMap($users),
  35. set::onRenderCell(jsRaw('window.renderDrillResult'))
  36. );