view.html.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <?php
  2. /**
  3. * The view file of bug module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(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 Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package bug
  9. * @version $Id: view.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php $browseLink = $this->session->reviewList ? $this->session->reviewList : inlink('browse', "project=$review->project");?>
  15. <div id="mainMenu" class="clearfix">
  16. <div class="btn-toolbar pull-left">
  17. <div class="page-title">
  18. <span class="label label-id"><?php echo $review->id?></span>
  19. <span class="text"><?php echo $review->title;?></span>
  20. <?php if($review->deleted):?>
  21. <span class='label label-danger'><?php echo $lang->review->deleted;?></span>
  22. <?php endif; ?>
  23. </div>
  24. </div>
  25. </div>
  26. <div id="mainContent" class="main-row">
  27. <div class="main-col col-8">
  28. <div class='cell'>
  29. <div class="detail scrollbar-hover">
  30. <?php
  31. if($review->category == 'PP')
  32. {
  33. $ganttType = 'gantt';
  34. $productID = $review->product;
  35. include $app->getModuleRoot() . 'programplan/view/gantt.html.php';
  36. }
  37. ?>
  38. <?php
  39. if(isset($bookID) and $bookID)
  40. {
  41. echo '<div class="tab-pane active" id="book">';
  42. echo '<ul data-name="docsTree" data-ride="tree" data-initial-state="preserve" class="tree no-margin" data-idx="0">';
  43. include './book.html.php';
  44. echo '</ul>';
  45. echo '</div>';
  46. }
  47. else
  48. {
  49. if($review->category != 'PP')
  50. {
  51. if(isset($doc) and $doc)
  52. {
  53. echo "<div class='detail-title'>" . $doc->title . "</div>";
  54. if($doc->contentType == 'markdown')
  55. {
  56. echo "<div class='detail-content article-content'><textarea id='markdownContent'>$doc->content</textarea></div>";
  57. }
  58. else
  59. {
  60. echo "<div class='detail-content article-content'>$doc->content</div>";
  61. }
  62. }
  63. elseif(isset($template) and (!isset($doc) or !$doc))
  64. {
  65. echo "<div class='detail-title'>" . zget($lang->baseline->objectList, $review->category) . "</div>";
  66. if($template->type == 'markdown')
  67. {
  68. echo "<div class='detail-content article-content'><textarea id='markdownContent'>$template->content</textarea></div>";
  69. }
  70. else
  71. {
  72. echo "<div class='detail-content article-content'>$template->content</div>";
  73. }
  74. }
  75. }
  76. }
  77. ?>
  78. <?php if(isset($doc) && $doc) echo $this->fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'true'));?>
  79. </div>
  80. <?php echo $this->fetch('file', 'printFiles', array('files' => $review->files, 'fieldset' => 'true', 'object' => $review));?>
  81. </div>
  82. <div class='cell'>
  83. <div class="detail">
  84. <div class="detail-title"><?php echo $lang->review->auditOpinion;?></div>
  85. <div class="detail-content article-content">
  86. <?php echo !empty($auditOpinion) ? $auditOpinion : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
  87. </div>
  88. </div>
  89. </div>
  90. <div class='cell'><?php include $app->getModuleRoot() . 'common/view/action.html.php';?></div>
  91. <div class='main-actions'>
  92. <div class="btn-toolbar">
  93. <?php $params = "reviewID=$review->id"; ?>
  94. <?php common::printBack($browseLink);?>
  95. <div class='divider'></div>
  96. <?php
  97. common::printIcon('review', 'submit', $params, $review, 'button', 'play', '', 'iframe', true, '', $lang->review->submit);
  98. if(isset($pendingReviews[$review->id]) and !$review->deleted)
  99. {
  100. common::printIcon('review', 'assess', $params, $review, 'button', 'glasses');
  101. }
  102. common::printIcon('approval', 'progress', "approval=$approval->id", $review, 'button', 'list-alt', '', 'iframe', true);
  103. if(!$review->deleted)
  104. {
  105. common::printIcon('review', 'edit', $params, $review);
  106. common::printIcon('review', 'delete', $params, $review, 'button', 'trash', 'hiddenwin');
  107. }
  108. ?>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="side-col col-4">
  113. <div class="cell">
  114. <div class='detail'>
  115. <div class='detail-title'><?php echo $lang->review->basicInfo;?></div>
  116. <div class='detail-content'>
  117. <table class='table table-data'>
  118. <tbody>
  119. <tr>
  120. <th class='w-100px'><?php echo $lang->review->object;?></th>
  121. <td><?php echo zget($lang->baseline->objectList, $review->category);?></td>
  122. </tr>
  123. <tr>
  124. <th><?php echo $lang->review->version;?></th>
  125. <td><?php echo $review->version;?></td>
  126. </tr>
  127. <tr>
  128. <th><?php echo $lang->review->status;?></th>
  129. <td><?php echo zget($lang->review->statusList, $review->status);?></td>
  130. </tr>
  131. <tr>
  132. <th><?php echo $lang->review->reviewedBy;?></th>
  133. <td><?php $reviewedBy = explode(',', str_replace(' ', '', $review->reviewedBy)); foreach($reviewedBy as $account) echo ' ' . zget($users, $account);?></td>
  134. </tr>
  135. <tr>
  136. <th><?php echo $lang->review->reviewer;?></th>
  137. <td>
  138. <?php
  139. foreach($reviewerResult as $account => $resultList)
  140. {
  141. $class = (in_array('', $resultList) || in_array('ignore', $resultList)) ? '' : 'text-gray';
  142. echo "<span class='$class'>" . zget($users, $account) . "</span> &nbsp;";
  143. }
  144. ?>
  145. </td>
  146. </tr>
  147. <tr>
  148. <th><?php echo $lang->review->auditedBy;?></th>
  149. <td><?php echo zget($users, $review->auditedBy);?></td>
  150. </tr>
  151. <tr>
  152. <th><?php echo $lang->review->deadline;?></th>
  153. <td><?php echo helper::isZeroDate($review->deadline) ? '' : substr($review->deadline, 0, 19);?></td>
  154. </tr>
  155. <tr>
  156. <th><?php echo $lang->review->createdBy;?></th>
  157. <td><?php echo zget($users, $review->createdBy);?></td>
  158. </tr>
  159. <tr>
  160. <th><?php echo $lang->review->createdDate;?></th>
  161. <td><?php echo $review->createdDate;?></td>
  162. </tr>
  163. </tbody>
  164. </table>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. <script>
  171. $(function()
  172. {
  173. var mainHeight = $(window).height() - $('#footer').outerHeight() - $('#header').outerHeight() - 350;
  174. var sideHeight = mainHeight + 275;
  175. $('.scrollbar-hover').css('height', sideHeight);
  176. $('.scrollbar-hover').css('overflow-y', 'auto');
  177. })
  178. </script>
  179. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>