assess.html.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  3. <style>
  4. .checkbox-primary {display: inline-block; line-height: 20px;}
  5. .review-result {white-space: nowrap;}
  6. .gantt_container {overflow-x: auto!important;}
  7. </style>
  8. <div id="mainMenu" class="clearfix">
  9. <div class="btn-toolbar pull-left">
  10. <?php $browseLink = $app->session->reviewList != false ? $app->session->reviewList : inlink('browse', "project=$review->project");?>
  11. <?php echo html::backButton("<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "btn btn-secondary");?>
  12. <div class="divider"></div>
  13. <div class="page-title">
  14. <span class="label label-id"><?php echo $review->id?></span>
  15. <span class="text"><?php echo $review->title . $lang->arrow . zget($lang->baseline->objectList, $review->category);?></span>
  16. </div>
  17. </div>
  18. </div>
  19. <form class='form-ajax' method='post' id="assessForm">
  20. <div id='reviewRow' class='main-row fade split-row in'>
  21. <div class='side-col' data-min-width='550'>
  22. <div class='cell scrollbar-hover'>
  23. <?php
  24. if($review->category == 'PP')
  25. {
  26. $ganttType = $type;
  27. $productID = $review->product;
  28. include $app->getModuleRoot() . 'programplan/view/gantt.html.php';
  29. }
  30. ?>
  31. <?php
  32. if(isset($bookID) and $bookID)
  33. {
  34. echo '<div class="tab-pane active" id="book">';
  35. echo '<ul data-name="docsTree" data-ride="tree" data-initial-state="preserve" class="tree no-margin" data-idx="0">';
  36. include './book.html.php';
  37. echo '</ul>';
  38. echo '</div>';
  39. }
  40. else
  41. {
  42. if($review->category != 'PP')
  43. {
  44. if(isset($doc) and $doc)
  45. {
  46. echo "<div class='detail-title'>" . $doc->title . "</div>";
  47. if($doc->contentType == 'markdown')
  48. {
  49. echo "<div class='detail-content article-content'><textarea id='markdownContent'>$doc->content</textarea></div>";
  50. }
  51. else
  52. {
  53. echo "<div class='detail-content article-content'>$doc->content</div>";
  54. }
  55. }
  56. elseif(isset($template) and (!isset($doc) or !$doc))
  57. {
  58. echo "<div class='detail-title'>" . zget($lang->baseline->objectList, $review->category) . "</div>";
  59. if($template->type == 'markdown')
  60. {
  61. echo "<div class='detail-content article-content'><textarea id='markdownContent'>$template->content</textarea></div>";
  62. }
  63. else
  64. {
  65. echo "<div class='detail-content article-content'>$template->content</div>";
  66. }
  67. }
  68. }
  69. }
  70. ?>
  71. <?php if(isset($doc) && $doc) echo $this->fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'true'));?>
  72. <?php echo $this->fetch('file', 'printFiles', array('files' => $review->files, 'fieldset' => 'true'));?>
  73. </div>
  74. </div>
  75. <div class='col-spliter' id="splitLine"></div>
  76. <div class='main-col' data-min-width='600' id="issueList">
  77. <?php if(!empty($reviewcl)):?>
  78. <div class='cell scrollbar-hover' id='reviewcl'>
  79. <div class="detail-title"><?php echo $lang->review->reviewcl;?></div>
  80. <div class="detail-content article-content">
  81. <table class='table reviewcl'>
  82. <thead>
  83. <tr>
  84. <th class='text-center'><?php echo $lang->review->listCategory;?></th>
  85. <th><?php echo $lang->review->listTitle;?></th>
  86. <th><?php echo $lang->review->listResult;?></th>
  87. <th><?php echo $lang->review->opinion;?></th>
  88. </tr>
  89. </thead>
  90. <tbody>
  91. <?php foreach($reviewcl as $category => $list):?>
  92. <tr>
  93. <td rowspan=<?php echo count($list);?> class='text-center'><strong><?php echo zget($categoryList, $category);?></strong></td>
  94. <?php $i = 0 ;?>
  95. <?php foreach($list as $data):?>
  96. <?php $i++ ;?>
  97. <?php if($i != 1) echo "<tr>"?>
  98. <td><?php echo html::a($this->createLink('reviewcl', 'view', "id=$data->id", '', true), $data->title, '', "title='$data->title' data-toggle='modal' class='iframe'");?></td>
  99. <td><?php echo html::radio("issueResult[$data->id]", $lang->review->checkList, '1', "class='issueResult'", 'block');?></td>
  100. <td><textarea name="<?php echo "issueOpinion[$data->id]";?>" id="<?php echo "issueOpinion$data->id";?>" rows="1" class="form-control opinion" readonly></textarea></td>
  101. <?php if($i != 1) echo "</tr>"?>
  102. <?php endforeach;?>
  103. </tr>
  104. <?php endforeach;?>
  105. </tbody>
  106. </table>
  107. </div>
  108. </div>
  109. <?php endif;?>
  110. <?php $class = empty($reviewcl) ? '' : 'review-footer';?>
  111. <div class='cell <?php echo $class;?>'>
  112. <table class='table table-form'>
  113. <?php if($setReviewer):?>
  114. <?php $reviewer = strpos($setReviewer, 'pending-') !== false ? substr($setReviewer, 8) : $setReviewer;?>
  115. <tr>
  116. <th class='w-120px'><?php echo $lang->review->setReviewer;?></th>
  117. <td class='review-result'><?php echo html::select('setReviewer', $users, $reviewer, "class='form-control chosen'");?></td>
  118. </tr>
  119. <?php endif;?>
  120. <tr>
  121. <th class='w-120px'><?php echo $lang->review->result;?></th>
  122. <td class='review-result'><?php echo html::radio('result', $lang->review->resultList, isset($result->result) ? $result->result : 'pass');?></td>
  123. </tr>
  124. <tr>
  125. <th class='text-nowrap'><?php echo $lang->review->reviewedDate;?></th>
  126. <td><?php echo html::input('createdDate', helper::today(), 'class="form-control form-date"');?></td>
  127. <td>
  128. <div class='input-group'>
  129. <span class='input-group-addon'><?php echo $lang->review->consumed;?></span>
  130. <?php echo html::input('consumed', isset($result->consumed) ? $result->consumed : 0, "class='form-control w-120px'");?>
  131. <span class='input-group-addon'>h</span>
  132. </div>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td colspan='5'>
  137. <div class='input-group'>
  138. <span class='input-group-addon w-120px'><?php echo $lang->review->finalOpinion;?></span>
  139. <?php echo html::textarea('opinion', isset($result->opinion) ? $result->opinion : '', "class='form-control'");?>
  140. </div>
  141. </td>
  142. </tr>
  143. <tr>
  144. <th><?php echo $lang->review->files;?></th>
  145. <td colspan='2'><?php echo $this->fetch('file', 'buildoldform', 'fileCount=1&percent=0.85');?></td>
  146. </tr>
  147. <tr>
  148. <td colspan='5' class='text-center'>
  149. <?php echo html::submitButton();?>
  150. </td>
  151. </tr>
  152. </table>
  153. </div>
  154. </div>
  155. </div>
  156. </form>
  157. <style>
  158. .review-footer{margin-top: 10px; height: 260px;}
  159. .review-footer table th{vertical-align: middle}
  160. .reviewcl td{padding: 4px 10px !important;}
  161. </style>
  162. <?php js::set('stopSubmit', $lang->review->stopSubmit);?>
  163. <script>
  164. $(function()
  165. {
  166. var mainHeight = $(window).height() - $('#footer').outerHeight() - $('#header').outerHeight() - 370;
  167. var sideHeight = mainHeight + 275;
  168. $('.main-col #reviewcl').css('height', mainHeight);
  169. $('.side-col .cell').css('height', sideHeight);
  170. $('table.reviewcl .issueResult, table.reviewcl').change(function()
  171. {
  172. var result = $(this).val();
  173. if(result == 1)
  174. {
  175. $(this).closest('tr').find('.opinion').attr('readonly', true);
  176. }
  177. else
  178. {
  179. $(this).closest('tr').find('.opinion').attr('readonly', false);
  180. }
  181. })
  182. })
  183. </script>
  184. <?php if((!empty($doc->contentType) and $doc->contentType == 'markdown') or (!empty($template->type) and $template->type == 'markdown')):?>
  185. <?php css::import($jsRoot . "markdown/simplemde.min.css");?>
  186. <?php js::import($jsRoot . 'markdown/simplemde.min.js'); ?>
  187. <script>
  188. $(function()
  189. {
  190. var simplemde = new SimpleMDE({element: $("#markdownContent")[0],toolbar:false, status: false});
  191. simplemde.value($('#markdownContent').html());
  192. simplemde.togglePreview();
  193. $('#content .CodeMirror .editor-preview a').attr('target', '_blank');
  194. })
  195. </script>
  196. <?php endif;?>
  197. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>