importrelease.html.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * The importrelease view file of kanban 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 kanban
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('kanbanID', $kanbanID);
  12. jsVar('regionID', $regionID);
  13. jsVar('groupID', $groupID);
  14. jsVar('columnID', $columnID);
  15. jsVar('methodName', $this->app->rawMethod);
  16. foreach($releases2Imported as $release)
  17. {
  18. $projects = '';
  19. $builds = '';
  20. if($release->builds)
  21. {
  22. foreach($release->builds as $build)
  23. {
  24. $builds .= $build->name . ' ';
  25. $projects .= $build->projectName . ' ';
  26. }
  27. }
  28. $release->build = $builds;
  29. $release->project = $projects;
  30. }
  31. featureBar
  32. (
  33. inputGroup
  34. (
  35. span(setClass('input-group-addon'), $lang->kanban->selectedProduct),
  36. picker(set::name('product'), set::items($products), set::value($selectedProductID), set::style(array('width' => '200px')), set('data-on', 'change'), set('data-call', 'changeProduct'), set::required(true)),
  37. span(setClass('input-group-addon'), $lang->kanban->selectedLane),
  38. picker(set::name('lane'), set::items($lanePairs), set::style(array('width' => '200px')), set::required(true))
  39. )
  40. );
  41. $config->release->dtable->fieldList['id']['type'] = 'checkID';
  42. unset($config->release->dtable->fieldList['title']['link']);
  43. unset($config->release->dtable->fieldList['branch']);
  44. unset($config->release->dtable->fieldList['actions']);
  45. $config->release->dtable->fieldList['name']['width'] = 120;
  46. $config->release->dtable->fieldList['system']['type'] = 'shortTitle';
  47. $config->release->dtable->fieldList['system']['checkbox'] = false;
  48. $config->release->dtable->fieldList['system']['nestedToggle'] = false;
  49. $config->release->dtable->fieldList['system']['map'] = array(0 => '') + $appList;
  50. foreach($config->release->dtable->fieldList as $id => $field) $config->release->dtable->fieldList[$id]['sortType'] = false;
  51. formBase
  52. (
  53. setID('linkForm'),
  54. set::actions(''),
  55. setClass('mt-2'),
  56. dtable
  57. (
  58. set::fixedLeftWidth('0.33'),
  59. set::checkable(true),
  60. set::cols(array_values($config->release->dtable->fieldList)),
  61. set::data(array_values($releases2Imported)),
  62. set::footToolbar(array('items' => array(array('text' => $lang->kanban->importAB, 'btnType' => 'primary', 'className' => 'size-sm batch-btn', 'data-url' => inlink('importrelease', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
  63. set::footPager(usePager())
  64. )
  65. );