bugcreate.html.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * The bug create view file of pivot 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 Gang Liu <liugang@easycorp.ltd>
  7. * @package pivot
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $cols = $config->pivot->dtable->bugCreate->fieldList;
  12. $cols['openedBy']['map'] = $users;
  13. $data = new stdclass();
  14. $data->cols = $this->pivot->processDTableCols($cols);
  15. $data->array = $this->pivot->processDTableData(array_keys($cols), $bugs);
  16. $generateData = function() use ($lang, $title, $cols, $data, $bugs, $products, $executions, $begin, $end, $product, $execution)
  17. {
  18. return array
  19. (
  20. div
  21. (
  22. setID('conditions'),
  23. setClass('flex gap-4 bg-canvas p-2'),
  24. on::change('loadBugCreate'),
  25. inputGroup
  26. (
  27. setClass('w-5/12'),
  28. $lang->pivot->bugOpenedDate,
  29. datePicker(set(array('name' => 'begin', 'value' => $begin))),
  30. $lang->pivot->to,
  31. datePicker(set(array('name' => 'end', 'value' => $end)))
  32. ),
  33. inputGroup
  34. (
  35. setClass('w-1/4'),
  36. $lang->pivot->product,
  37. picker
  38. (
  39. setClass('w-full'),
  40. set(array('name' => 'product', 'items' => $products, 'value' => $product))
  41. )
  42. ),
  43. inputGroup
  44. (
  45. setClass('w-1/3'),
  46. $lang->execution->common,
  47. picker
  48. (
  49. setClass('w-full'),
  50. set(array('name' => 'execution', 'items' => $executions, 'value' => $execution))
  51. )
  52. )
  53. ),
  54. panel
  55. (
  56. setID('pivotPanel'),
  57. set::title($title),
  58. set::shadow(false),
  59. set::headingClass('h-14'),
  60. set::bodyClass('pt-0'),
  61. dtable
  62. (
  63. set::striped(true),
  64. set::bordered(true),
  65. set::cols($cols),
  66. set::data($bugs),
  67. set::emptyTip($lang->error->noData),
  68. set::height(jsRaw('getHeight'))
  69. ),
  70. div
  71. (
  72. setID('exportData'),
  73. setClass('hidden'),
  74. rawContent(),
  75. html($this->pivot->buildPivotTable($data, array()))
  76. )
  77. )
  78. );
  79. };