managebranchpriv.html.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * The managebranchpriv 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 Yanyi Cao <caoyanyi@easycorp.ltd>
  7. * @package gitlab
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. if(!empty($permissionError))
  12. {
  13. jsCall('alertJump', array($permissionError, $errorJump));
  14. return;
  15. }
  16. jsVar('hasAccessBranches', $hasAccessBranches);
  17. formBatchPanel
  18. (
  19. set::data(array_values($hasAccessBranches)),
  20. set::onRenderRow(jsRaw('onRenderRow')),
  21. formBatchItem
  22. (
  23. set::name('id'),
  24. set::label('ID'),
  25. set::control('index'),
  26. set::width('50px')
  27. ),
  28. formBatchItem
  29. (
  30. set::label($lang->gitlab->branch->name),
  31. set::width('1/3'),
  32. set::name('name'),
  33. set::control
  34. (
  35. array(
  36. 'type' => 'picker',
  37. 'name' => 'name',
  38. 'cache' => false,
  39. 'items' => $branchPairs,
  40. 'menu' => jsRaw('{getItem(item) {return getMenu(item)}}')
  41. )
  42. )
  43. ),
  44. formBatchItem
  45. (
  46. set::name('mergeAccess'),
  47. set::label($lang->gitlab->branch->mergeAllowed),
  48. set::control('picker'),
  49. set::width('1/3'),
  50. set::items($lang->gitlab->branch->branchCreationLevelList)
  51. ),
  52. formBatchItem
  53. (
  54. set::name('pushAccess'),
  55. set::label($lang->gitlab->branch->pushAllowed),
  56. set::control('picker'),
  57. set::width('1/3'),
  58. set::items($lang->gitlab->branch->branchCreationLevelList)
  59. )
  60. );