linkbug.html.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * The link bug view of release module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package release
  9. * @version $Id: linkbug.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <div id='queryBox' data-module='bug' class='show'></div>
  14. <?php
  15. $releaseBugs = $type == 'bug' ? $release->bugs : $release->leftBugs;
  16. $formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm';
  17. ?>
  18. <div id='<?php echo $type == 'bug' ? 'unlinkBugList' : 'unlinkLeftBugList';?>'>
  19. <form class='main-table' method='post' target='hiddenwin' id='<?php echo $formID?>' action='<?php echo $this->createLink('projectrelease', 'linkBug', "releaseID=$release->id&browseType=$browseType&param=$param&type=$type")?>' data-ride='table'>
  20. <div class='table-header hl-primary text-primary strong'>
  21. <?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedBugs;?>
  22. </div>
  23. <table class='table tablesorter'>
  24. <thead>
  25. <tr class='text-center'>
  26. <th class='c-id text-left'>
  27. <?php if($allBugs):?>
  28. <div class="checkbox-primary check-all tablesorter-noSort" title="<?php echo $lang->selectAll?>">
  29. <label></label>
  30. </div>
  31. <?php endif;?>
  32. <?php echo $lang->idAB;?>
  33. </th>
  34. <th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
  35. <th class='text-left'><?php echo $lang->bug->title;?></th>
  36. <th class='c-user'><?php echo $lang->openedByAB;?></th>
  37. <th class='c-user'><?php echo $lang->bug->resolvedBy;?></th>
  38. <th class='c-status'><?php echo $lang->statusAB;?></th>
  39. </tr>
  40. </thead>
  41. <tbody class='text-center'>
  42. <?php $unlinkedCount = 0;?>
  43. <?php foreach($allBugs as $bug):?>
  44. <tr>
  45. <td class='c-id text-left'>
  46. <?php echo html::checkbox('bugs', array($bug->id => sprintf('%03d', $bug->id)), ($type == 'leftBug' or $bug->status == 'resolved' or $bug->status == 'closed') ? $bug->id : '');?>
  47. </td>
  48. <td><span class='label-pri label-pri-<?php echo $bug->pri;?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
  49. <td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
  50. <td><?php echo zget($users, $bug->openedBy);?></td>
  51. <td><?php echo zget($users, $bug->resolvedBy);?></td>
  52. <td>
  53. <span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
  54. </td>
  55. </tr>
  56. <?php $unlinkedCount++;?>
  57. <?php endforeach;?>
  58. </tbody>
  59. </table>
  60. <div class='table-footer'>
  61. <?php if($unlinkedCount):?>
  62. <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
  63. <div class="table-actions btn-toolbar">
  64. <?php echo html::submitButton($lang->release->linkBug, '', 'btn btn-secondary');?>
  65. </div>
  66. <?php endif;?>
  67. <div class="btn-toolbar">
  68. <?php echo html::a(inlink('view', "releaseID=$release->id&type=$type"), $lang->goback, '', "class='btn'");?>
  69. </div>
  70. <div class='table-statistic'></div>
  71. <?php $pager->show('right', 'pagerjs');?>
  72. </div>
  73. </form>
  74. </div>
  75. <script>
  76. $(function()
  77. {
  78. $('#<?php echo $formID;?> .tablesorter').sortTable();
  79. setForm()
  80. });
  81. </script>