browseissue.html.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * The browseissue view file of sonarqube module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Yanyi Cao <caoyanyi@easycorp.ltd>
  8. * @package sonarqube
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. $replaceKey = urlencode(helper::safe64Encode($projectKey));
  13. $issueList = array();
  14. foreach($sonarqubeIssueList as $issue)
  15. {
  16. $issue->productID = $productID;
  17. $issue->projectKey = $projectKey;
  18. $issue->replaceKey = $replaceKey;
  19. $issue->sonarqubeID = $sonarqube->id ;
  20. $issue->issueKey = str_replace('-', '*', $issue->key);
  21. $issue->message = htmlspecialchars_decode($issue->message);
  22. $issue->actions = array('createBug');
  23. $issueList[] = $issue;
  24. }
  25. $config->sonarqube->dtable->issue->fieldList['message']['link']['url'] = sprintf($config->sonarqube->dtable->issue->fieldList['message']['link']['url'], trim($sonarqube->url, '/'));
  26. if(!hasPriv('bug', 'create')) unset($config->sonarqube->dtable->issue->fieldList['actions']);
  27. featureBar
  28. (
  29. backBtn
  30. (
  31. set::text($lang->goback),
  32. set::url(createLink('sonarqube', 'browseProject', "sonarqubeID={$sonarqube->id}"))
  33. ),
  34. form
  35. (
  36. setID('searchForm'),
  37. setClass('ml-4'),
  38. set::actions(array()),
  39. formRow
  40. (
  41. input
  42. (
  43. set::placeholder($lang->sonarqube->placeholder->searchIssue),
  44. set::name('keyword'),
  45. set::value($keyword)
  46. ),
  47. btn
  48. (
  49. setClass('primary'),
  50. $lang->sonarqube->search,
  51. on::click('search')
  52. )
  53. )
  54. )
  55. );
  56. dtable
  57. (
  58. set::cols($config->sonarqube->dtable->issue->fieldList),
  59. set::data($sonarqubeIssueList),
  60. set::sortLink(createLink('sonarqube', 'browseIssue', "sonarqubeID={$sonarqube->id}&projectKey={$replaceKey}&search={$search}&orderBy={name}_{sortType}")),
  61. set::orderBy($orderBy),
  62. set::footPager(usePager())
  63. );