ajaxgetjenkinstasks.html.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * The jenkins task view file of repo module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license LGPL (http://www.gnu.org/licenses/lgpl.html)
  7. * @author Gang Zeng <zenggang@cnezsoft.com>
  8. * @package repo
  9. * @version $Id$
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <style>
  14. #dropMenuTasks .tree li {padding: 3px 0 0 10px;}
  15. #dropMenuTasks .tree li.has-list.open:before {border-left: 0px;}
  16. #dropMenuTasks .tree li > a {max-width: 100%; line-height: 20px; border-radius: 2px; padding-top: 5px;}
  17. #dropMenuTasks .col-left {padding: 0;}
  18. #dropMenuTasks .label {margin-left: 3px;}
  19. #dropMenuTasks .hide-in-search {padding-left: 8px;}
  20. #dropMenuTasks .hide-in-search .hidden {display: block !important; visibility: inherit !important;}
  21. #dropMenuTasksRepo > div.table-row > div > div > ul > li > div {padding-left: 10px;}
  22. #dropMenuTasks ul.tree-angles {margin-bottom: 0;}
  23. #dropMenuTasks {margin: 0;}
  24. #dropMenuTasks ul > li > ul > li > a:hover {color: white; background-color: #0c64eb; text-decoration: none;}
  25. #dropMenuTasks .tree .has-list > ul > li {padding-top: 0;}
  26. .search-list .list-group {padding: 7px 10px;}
  27. #dropMenuTasks .label-type {margin: 1px 10px; line-height: 20px;}
  28. .tree li>.list-toggle {top: 0px;}
  29. .tree .one-level>.list-toggle {top: 3px;}
  30. </style>
  31. <div class="table-row">
  32. <div class="table-col col-left">
  33. <div class="list-group" id="jenkinsTaskList">
  34. <ul class='tree tree-angles' data-ride='tree' data-idx='0'>
  35. <?php foreach($tasks as $groupName => $task):?>
  36. <?php if(empty($task)) continue;?>
  37. <?php if(is_array($task)):?>
  38. <li data-idx='$groupName' data-id='<?php echo $groupName?>' class='has-list open in one-level'>
  39. <i class='list-toggle icon'></i>
  40. <div class='label-type'>
  41. <a class='text-muted not-list-item'><?php echo $groupName;?></a>
  42. </div>
  43. <ul data-idx='<?php echo $groupName;?>'>
  44. <?php foreach($task as $task2name => $task2):?>
  45. <?php if(is_array($task2)):?>
  46. <li data-idx='$groupName' data-id='<?php echo $task2name?>' class='has-list open in'>
  47. <i class='list-toggle icon'></i>
  48. <div class='label-type'>
  49. <a class='text-muted not-list-item'><?php echo $task2name;?></a>
  50. </div>
  51. <ul data-idx='<?php echo $task2name;?>'>
  52. <?php foreach($task2 as $task3name => $task3):?>
  53. <?php if(is_array($task3)):?>
  54. <li data-idx='$groupName' data-id='<?php echo $task3name?>' class='has-list open in'>
  55. <i class='list-toggle icon'></i>
  56. <div class='label-type'>
  57. <a class='text-muted not-list-item'><?php echo $task3name;?></a>
  58. </div>
  59. <ul data-idx='<?php echo $task3name;?>'>
  60. <?php foreach($task3 as $task4name => $task4):?>
  61. <?php if(is_array($task4)) continue;?>
  62. <li data-idx='<?php echo $task4name;?>' data-id='<?php echo $task4name;?>'>
  63. <a href='###' id='<?php echo $task4name?>' class='' text-ellipsis' onclick='setJenkinsJob("<?php echo $task4;?>","<?php echo $task4name;?>")' title='<?php echo $task4;?>' data-key='<?php echo $task4;?>'><?php echo $task4;?></a>
  64. </li>
  65. <?php endforeach;?>
  66. </ul>
  67. </li>
  68. <?php else:?>
  69. <li data-idx='<?php echo $task3name;?>' data-id='<?php echo $task3name;?>'>
  70. <a href='###' id='<?php echo $task3name?>' onclick='setJenkinsJob("<?php echo $task3;?>","<?php echo $task3name;?>")' class='' text-ellipsis' title='<?php echo $task3;?>' data-key='<?php echo $task3;?>'><?php echo $task3;?></a>
  71. </li>
  72. <?php endif;?>
  73. <?php endforeach;?>
  74. </ul>
  75. </li>
  76. <?php else:?>
  77. <li data-idx='<?php echo $task2name;?>' data-id='<?php echo $task2name;?>'>
  78. <a href='###' onclick='setJenkinsJob("<?php echo $task2;?>","<?php echo $task2name;?>")' id='<?php echo $task2name?>' class='' text-ellipsis' title='<?php echo $task2;?>' data-key='<?php echo $task2;?>'><?php echo $task2;?></a>
  79. </li>
  80. <?php endif;?>
  81. <?php endforeach;?>
  82. </ul>
  83. </li>
  84. <?php else:?>
  85. <li data-idx='<?php echo $task;?>' data-id='<?php echo $task;?>'>
  86. <a href='###' id='<?php echo $groupName;?>' class='text-ellipsis' onclick='setJenkinsJob("<?php echo $task;?>","<?php echo $groupName;?>")' title='<?php echo $task;?>' data-key='<?php echo $task;?>' ><?php echo $task;?></a>
  87. </li>
  88. <?php endif;?>
  89. <?php endforeach;?>
  90. </ul>
  91. </div>
  92. </div>
  93. </div>
  94. <script>
  95. $('#jenkinsTaskList .tree').tree();
  96. </script>