issue.html.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php'?>
  2. <style>
  3. #dropMenu.has-search-text{width: 400px; max-width: 500px; min-width: 200px;}
  4. #dropMenu .list-group{width: 400px; max-width: 410px;padding: 5px 10px;}
  5. #dropMenu>.search-box{max-width: 400px;}
  6. #dropMenu .col-footer{width: 400px;}
  7. #mainMenu #currentItem > span.caret {right: 0px; top: 12px;}
  8. </style>
  9. <div id="mainMenu" class="clearfix">
  10. <div class="btn-toolbar pull-left">
  11. <div class="btn-group angle-btn">
  12. <div class="btn-group">
  13. <?php if(empty($reviewInfo)):?>
  14. <button data-toggle="dropdown" type="button" class="btn btn-limit" id="currentItem" title="<?php echo $lang->reviewissue->searchReview;?>" style="border-radius: 2px;"><?php echo $lang->reviewissue->searchReview;?>
  15. <?php else:?>
  16. <button data-toggle="dropdown" type="button" class="btn btn-limit" id="currentItem" title="<?php echo $reviewInfo->title . '--' . $reviewInfo->version;?>" style="border-radius: 2px;"><?php echo $reviewInfo->title . '--' . $reviewInfo->version;?>
  17. <?php endif;?>
  18. <span class="caret"></span>
  19. </button>
  20. <div id="dropMenu" class="dropdown-menu load-indicator" data-ride="searchList" data-url="<?php echo $this->createLink('reviewissue', 'ajaxGetReview',"project=$projectID&reviewID=$reviewID&status=$status");?>">
  21. <div class="input-control search-box has-icon-left has-icon-right search-example">
  22. <input type="search" class="form-control search-input empty">
  23. <label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
  24. <a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <?php
  30. $featureBar = $lang->reviewissue->featureBar['issue'];
  31. if(in_array($project->model, array('scrum', 'agileplus'))) unset($featureBar['audit'], $featureBar['decision']);
  32. if(in_array($project->model, array('waterfall', 'waterfallplus'))) unset($featureBar['decision']);
  33. foreach($featureBar as $type => $label)
  34. {
  35. $active = ($type == $status and $browseType != 'bysearch') ? 'btn-active-text' : '';
  36. echo html::a($this->createLink('reviewissue', 'issue', "project=$projectID&reviewID=$reviewID&status=$type"), "<span class='text'>" . $label . '</span> ' . ($status == $type ? "<span class='label label-light label-badge'>{$pager->recTotal}</span>" : ''), '',"class='btn btn-link $active'");
  37. }
  38. $rawModule = $this->app->rawModule;
  39. $rawMethod = $this->app->rawMethod;
  40. foreach(customModel::getFeatureMenu($rawModule, $rawMethod) as $menuItem)
  41. {
  42. if(isset($menuItem->hidden)) continue;
  43. $menuType = $menuItem->name;
  44. if($menuType == 'QUERY')
  45. {
  46. $searchBrowseLink = $this->createLink('reviewissue', 'issue', "projectID=$projectID&reviewID=$reviewID&status=$status&orderBy=$orderBy&browseType=bysearch&param=%s");
  47. $isBySearch = $browseType == 'bysearch';
  48. include $app->getModuleRoot() . 'common/view/querymenu.html.php';
  49. }
  50. }
  51. ?>
  52. <a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->searchAB;?></a>
  53. </div>
  54. <div class="pull-right"><?php echo $lang->pageActions;?></div>
  55. </div>
  56. <div id="mainContent" class="main-row">
  57. <div class="main-col">
  58. <div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-url="<?php echo $this->createLink('search', 'buildOldForm', 'module=reviewissue');?>" data-module='reviewissue'></div>
  59. <?php if(empty($issueList)):?>
  60. <div class="table-empty-tip">
  61. <p>
  62. <span class="text-muted"><?php echo $lang->noData;?></span>
  63. </p>
  64. </div>
  65. <?php else:?>
  66. <div class="main-table">
  67. <table class='table has-sort-head table-fixed' id="issueTable">
  68. <?php $vars = "project=$projectID&reviewID=$reviewID&status=$status&orderBy=%s&browseType=$browseType&param=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
  69. <thead>
  70. <tr>
  71. <th class="c-id w-60px"><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB)?></th>
  72. <th class="w-220px"><?php common::printOrderLink('title', $orderBy, $vars, $this->lang->reviewissue->title)?></th>
  73. <th class="w-220px"><?php common::printOrderLink('review', $orderBy, $vars, $this->lang->reviewissue->review)?></th>
  74. <th class="w-220px"><?php common::printOrderLink('opinion', $orderBy, $vars, $this->lang->reviewissue->opinion)?></th>
  75. <th class="w-120px"><?php common::printOrderLink('status', $orderBy, $vars, $this->lang->reviewissue->status)?></th>
  76. <th class="w-120px"><?php common::printOrderLink('type', $orderBy, $vars, $this->lang->reviewissue->type)?></th>
  77. <th class="w-120px"><?php common::printOrderLink('createdBy', $orderBy, $vars, $this->lang->reviewissue->createdBy)?></th>
  78. <th class="w-120px"><?php common::printOrderLink('createdDate', $orderBy, $vars, $this->lang->reviewissue->createdDate)?></th>
  79. <th class="text-center w-160px"><?php echo $lang->actions;?></th>
  80. </tr>
  81. </thead>
  82. <tbody class="sortable" id="issueTableList">
  83. <?php foreach($issueList as $issue):?>
  84. <tr data-id="<?php echo $issue->id;?>">
  85. <td class="text-left text-ellipsis"><?php echo $issue->id;?></td>
  86. <td class="text-left text-ellipsis"><?php echo html::a($this->createLink('reviewissue', 'view', "issueID=$issue->id"), $issue->title, '', "title='$issue->title'");?></td>
  87. <td class="text-left text-ellipsis"><?php echo html::a($this->createLink('reviewissue', 'view', "issueID=$issue->id"), $issue->reviewtitle, '', "title='$issue->reviewtitle'");?></td>
  88. <td class="text-left text-ellipsis"><?php echo $issue->opinion;?></td>
  89. <td class="text-left"><?php echo zget($this->lang->reviewissue->statusList, $issue->status);?></td>
  90. <td class="text-left"><?php echo zget($this->lang->reviewissue->issueType, $issue->type);?></td>
  91. <td class="text-left"><?php echo zget($users, $issue->createdBy);?></td>
  92. <td class="text-left"><?php echo $issue->createdDate;?></td>
  93. <td class="text-center c-actions">
  94. <?php
  95. $hide = '';
  96. $active = '';
  97. $close = '';
  98. if($issue->status == 'active') $active = $close = 'disabled';
  99. if($issue->status == 'resolved') $hide = 'disabled';
  100. if($issue->status == 'closed') $hide = $close = 'disabled';
  101. js::set('confirmActive', $lang->reviewissue->confirmActive);
  102. js::set('confirmClose', $lang->reviewissue->confirmClose);
  103. $activeURL = $this->createLink('reviewissue', 'updateStatus', "issueID=$issue->id&status=active");
  104. $closedURL = $this->createLink('reviewissue', 'updateStatus', "issueID=$issue->id&status=closed");
  105. common::printIcon('reviewissue', 'edit', "project=$projectID&issueID=$issue->id", $issue, 'list');
  106. common::printIcon('reviewissue', 'resolved', "project=$projectID&issueID=$issue->id&status=resolved", $issue, 'list', 'checked', '', 'iframe ' . $hide, true, "data-width=30%");
  107. echo html::a("javascript:ajaxDelete(\"$closedURL\", \"getList\", confirmClose)", '<i class="icon-bug-activate icon-off"></i>', '', "title='{$lang->reviewissue->close}' class='btn $close'");
  108. echo html::a("javascript:ajaxDelete(\"$activeURL\", \"getList\", confirmActive)", '<i class="icon-bug-activate icon-magic"></i>', '', "title='{$lang->reviewissue->activation}' class='btn $active'");
  109. common::printIcon('reviewissue', 'delete', "issueID=$issue->id&project=$projectID&confirm=no", $issue, 'list', 'trash', 'hiddenwin');
  110. ?>
  111. </td>
  112. </tr>
  113. <?php endforeach;?>
  114. </tbody>
  115. </table>
  116. <div class="table-footer">
  117. <?php $pager->show('right', 'pagerjs');?>
  118. </div>
  119. </div>
  120. <?php endif;?>
  121. </div>
  122. </div>
  123. <?php include $app->getModuleRoot() . 'common/view/footer.html.php'?>