importissue.html.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * The importissue view file of gitlab 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 Zeng Gang<zenggang@easycorp.ltd>
  7. * @package gitlab
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $items = array();
  12. $items[] = array('name' => 'title', 'label' => $lang->gitlab->gitlabIssue, 'control' => 'static');
  13. $items[] = array('name' => 'objectTypeList', 'label' => $lang->gitlab->objectType, 'control' => 'picker', 'items' => $objectTypes);
  14. $items[] = array('name' => 'productList', 'label' => $lang->productCommon, 'control' => 'picker', 'items' => $products, '' => 'loadProductExecutions' );
  15. $items[] = array('name' => 'executionList', 'label' => $lang->execution->common, 'control' => 'picker', 'items' => array());
  16. foreach($gitlabIssues as $issue)
  17. {
  18. $issue->id = $issue->iid;
  19. }
  20. if(empty($gitlabIssues))
  21. {
  22. panel
  23. (
  24. setStyle('--zt-panel-form-max-width', 'auto'),
  25. setClass('panel-form'),
  26. set::size('lg'),
  27. set::title($lang->gitlab->importIssue),
  28. set::headingActions(array(array(
  29. 'url' => createLink('gitlab', 'browseProject', "gitlabID={$gitlabID}"),
  30. 'type' => 'primary',
  31. 'icon' => 'back',
  32. 'text' => $lang->goback
  33. ))),
  34. $lang->gitlab->noImportableIssues
  35. );
  36. }
  37. else
  38. {
  39. formBatchPanel
  40. (
  41. h::input
  42. (
  43. set::type('hidden'),
  44. set::name('gitlabID'),
  45. set::value($gitlabID)
  46. ),
  47. h::input
  48. (
  49. set::type('hidden'),
  50. set::name('gitlabProjectID'),
  51. set::value($gitlabProjectID)
  52. ),
  53. set::title($lang->gitlab->importIssue),
  54. set::mode('edit'),
  55. set::items($items),
  56. set::data($gitlabIssues),
  57. set::onRenderRowCol(jsRaw('window.renderRowCol')),
  58. on::change('[data-name="productList"]', 'loadProductExecutions')
  59. );
  60. }