view.html.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?php
  2. /**
  3. * The view view of charter 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 charter
  9. * @version $Id: view.html.php 4129 2013-01-18 01:58:14Z wwccss $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  15. <div id='mainContent' class="main-row">
  16. <div class="col-8 main-col">
  17. <div class="row">
  18. <div class="col-sm-12">
  19. <div class="cell">
  20. <div class="detail">
  21. <h2 class="detail-title">
  22. <span class="label-id"><?php echo $charter->id;?></span>
  23. <span class="label label-<?php echo $charter->status;?> label-outline"><?php echo zget($lang->charter->statusList, $charter->status);?></span> <?php echo $charter->name;?>
  24. <?php if($charter->deleted):?>
  25. <span class='label label-danger'><?php echo $lang->charter->deleted;?></span>
  26. <?php endif;?>
  27. </h2>
  28. <div class="detail-content article-content">
  29. <p><?php echo $charter->spec;?></p>
  30. </div>
  31. </div>
  32. <div class="detail">
  33. <div class="detail-content">
  34. <table class="table table-data data-basic">
  35. <tbody>
  36. <tr>
  37. <th class="c-category"><?php echo $lang->charter->category;?></th>
  38. <td><strong><?php echo zget($lang->charter->categoryList, $charter->category);?></strong></td>
  39. <?php $levelClass = $charter->level ? "label-pri label-pri-{$charter->level}" : '';?>
  40. <th class="c-level"><?php echo $lang->charter->level;?></th>
  41. <td><strong><span class='<?php echo $levelClass;?>'><?php if($charter->level) echo zget($lang->charter->levelList, $charter->level);?></span></strong></td>
  42. <th class="c-market"><?php echo $lang->charter->market;?></th>
  43. <td><strong><?php echo zget($lang->charter->marketList, $charter->market);?></strong></td>
  44. </tr>
  45. <tr>
  46. <th><?php echo $lang->charter->appliedBy;?></th>
  47. <td><strong><?php echo zget($users, $charter->appliedBy);?></strong></td>
  48. <th><?php echo $lang->charter->budget?></th>
  49. <td><strong><?php echo $charter->budget;?></strong></td>
  50. </tr>
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="cell">
  57. <div class="detail">
  58. <h2 class="detail-title"><?php echo $lang->charter->productRoadmap;?></h2>
  59. </div>
  60. <div class="detail">
  61. <div class="detail-content article-content">
  62. <?php if(empty($groupDate)):?>
  63. <div class="table-empty-tip">
  64. <p>
  65. <span class="text-muted"><?php echo $lang->charter->noData;?></span>
  66. </p>
  67. </div>
  68. <?php else:?>
  69. <table class="table table-hover table-fixed">
  70. <thead>
  71. <tr class='text-center'>
  72. <th class='w-80px'><?php echo $lang->charter->linkProduct;?></th>
  73. <th class='w-150px'> <?php echo $lang->charter->linkRoadmap;?></th>
  74. </tr>
  75. </thead>
  76. <tbody>
  77. <?php foreach($groupDate as $productID => $roadmapList):?>
  78. <?php $productLink = $this->createLink('product', 'view', "productID=$productID");?>
  79. <tr>
  80. <td class='text-center' title="<?php echo zget($products, $productID);?>"><?php echo common::hasPriv('product', 'view') ? html::a($productLink, zget($products, $productID)) : zget($products, $productID);?></td>
  81. <td>
  82. <div class="flex">
  83. <?php foreach($roadmapList as $roadmap):?>
  84. <?php $roadmapLink = $this->createLink('roadmap', 'view', "roadmapID=$roadmap->id");?>
  85. <div class="clip" title="<?php echo $roadmap->name;?>">
  86. <?php echo common::hasPriv('roadmap', 'view') ? html::a($roadmapLink, $roadmap->name) : $roadmap->name;?>
  87. </div>
  88. <?php endForeach;?>
  89. <div>
  90. </td>
  91. </tr>
  92. <?php endForeach;?>
  93. </tbody>
  94. </table>
  95. <?php endif;?>
  96. </div>
  97. </div>
  98. </div>
  99. <?php if($lang->charter->charterList):?>
  100. <div class="cell">
  101. <div class="detail">
  102. <h2 class="detail-title"><?php echo $lang->charter->charterFiles;?></h2>
  103. </div>
  104. <div class="detail">
  105. <div class="detail-content">
  106. <table class="table table-data data-basic">
  107. <tbody>
  108. <?php $charterFiles = $charter->charterFiles;?>
  109. <?php foreach($lang->charter->charterList as $key => $name):?>
  110. <tr>
  111. <th><?php echo $name;?></th>
  112. <td>
  113. <?php
  114. if(isset($charterFiles[$key]))
  115. {
  116. $fileID = $charterFiles[$key]['id'];
  117. $files = array($fileID => $charter->files[$fileID]);
  118. echo $this->fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'false', 'object' => $charter, 'method' => 'view', 'showDelete' => false));
  119. unset($charterFiles[$key]);
  120. }
  121. ?>
  122. </td>
  123. </tr>
  124. <?php endForeach;?>
  125. <?php if($charterFiles):?>
  126. <?php foreach($charterFiles as $key => $file):?>
  127. <tr>
  128. <th><?php echo $key;?></th>
  129. <td>
  130. <?php
  131. if(isset($charterFiles[$key]))
  132. {
  133. $fileID = $charterFiles[$key]['id'];
  134. $files = array($fileID => $charter->files[$fileID]);
  135. echo $this->fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'false', 'object' => $charter, 'method' => 'view', 'showDelete' => false));
  136. }
  137. ?>
  138. </td>
  139. </tr>
  140. <?php endForeach;?>
  141. <?php endif;?>
  142. </tbody>
  143. </table>
  144. </div>
  145. </div>
  146. </div>
  147. <?php endif;?>
  148. <?php if($charter->status != 'wait'):?>
  149. <div class="cell">
  150. <div class="detail">
  151. <h2 class="detail-title"><?php echo $lang->charter->review;?></h2>
  152. </div>
  153. <div class="detail">
  154. <div class="detail-content">
  155. <table class="table table-data data-basic">
  156. <tbody>
  157. <tr>
  158. <th><?php echo $lang->charter->review;?></th>
  159. <td class='<?php echo $charter->status;?>'><strong><?php echo zget($lang->charter->reviewResultList, $charter->reviewedResult);?></strong></td>
  160. </tr>
  161. <tr>
  162. <th><?php echo $lang->charter->reviewer;?></th>
  163. <td>
  164. <strong>
  165. <?php
  166. if(!empty($charter->reviewedBy))
  167. {
  168. foreach(explode(',', $charter->reviewedBy) as $account)
  169. {
  170. if(empty($account)) continue;
  171. echo "<span>" . zget($users, trim($account)) . '</span> &nbsp;';
  172. }
  173. }
  174. ?>
  175. </strong>
  176. </td>
  177. </tr>
  178. <?php if(!helper::isZeroDate($charter->meetingDate)):?>
  179. <tr>
  180. <th><?php echo $lang->charter->meetingDate;?></th>
  181. <td><strong><?php echo helper::isZeroDate($charter->meetingDate) ? '' : $charter->meetingDate;?></strong></td>
  182. </tr>
  183. <?php endif;?>
  184. <?php if($charter->meetingLocation):?>
  185. <tr>
  186. <th><?php echo $lang->charter->meetingLocation;?></th>
  187. <td><strong><?php echo $charter->meetingLocation;?></strong></td>
  188. </tr>
  189. <?php endif;?>
  190. <?php if($charter->meetingMinutes):?>
  191. <tr>
  192. <th><?php echo $lang->charter->meetingMinutes;?></th>
  193. <td><strong><?php echo $charter->meetingMinutes;?></strong></td>
  194. </tr>
  195. <?php endif;?>
  196. </tbody>
  197. </table>
  198. </div>
  199. </div>
  200. </div>
  201. <?php endif;?>
  202. <div class="cell">
  203. <div class="detail">
  204. <h2 class="detail-title"><?php echo $lang->charter->roadmapStory;?></h2>
  205. </div>
  206. <div class="detail">
  207. <div class="detail-content article-content">
  208. <?php if(empty($stories)):?>
  209. <div class="table-empty-tip">
  210. <p>
  211. <span class="text-muted"><?php echo $lang->charter->noData;?></span>
  212. </p>
  213. </div>
  214. <?php else:?>
  215. <table class="table table-hover table-fixed">
  216. <thead>
  217. <tr class='text-center'>
  218. <th class='w-80px' title=<?php echo $lang->story->id;?>><?php echo $lang->idAB;?></th>
  219. <th class='w-100px' title=<?php echo $lang->story->pri;?>><?php echo $lang->priAB;?></th>
  220. <th><?php echo $lang->story->requirement . $lang->nameAB;?></th>
  221. <th class='w-150px'><?php echo $lang->story->roadmap;?></th>
  222. <th class='w-150px'><?php echo $lang->story->module;?></th>
  223. <th class='w-150px'> <?php echo $lang->story->status;?></th>
  224. </tr>
  225. </thead>
  226. <tbody>
  227. <?php foreach($stories as $story):?>
  228. <?php $storyLink = $this->createLink('story', 'storyView', "storyID=$story->id&version=$story->version&param=0&storyType=requirement", '', true);?>
  229. <tr>
  230. <td class='text-center'><?php echo $story->id;?></td>
  231. <?php $priClass = $story->pri ? "label-pri label-pri-{$story->pri}" : '';?>
  232. <td class='text-center'><span class='<?php echo $priClass;?>'><?php if($story->pri) echo $story->pri;?></span></td>
  233. <td class='text-left nobr c-name' title="<?php echo $story->title?>">
  234. <span class='label gray-pale'><?php echo $storyGrades["$story->type-$story->grade"]; ?></span>
  235. <?php echo common::hasPriv('story', 'view') ? html::a($storyLink, $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'") : $story->title;?>
  236. </td>
  237. <td class='text-center' title="<?php echo zget($roadmaps, $story->roadmap);?>"><?php echo zget($roadmaps, $story->roadmap);?></td>
  238. <td class='text-center' title="<?php echo zget($modules, $story->module);?>"><?php echo zget($modules, $story->module);?></td>
  239. <td class='text-center'><?php echo zget($lang->story->statusList, $story->status);?></td>
  240. </tr>
  241. <?php endForeach;?>
  242. </tbody>
  243. </table>
  244. <?php endif;?>
  245. </div>
  246. </div>
  247. </div>
  248. <?php $actionFormLink = $this->createLink('action', 'comment', "objectType=charter&objectID=$charter->id");?>
  249. <div class="cell"><?php include $app->getModuleRoot() . 'common/view/action.html.php';?></div>
  250. </div>
  251. </div>
  252. <div class='main-actions'>
  253. <div class="btn-toolbar">
  254. <?php
  255. $browseLink = $this->session->charterList ? $this->session->charterList : inlink('browse');
  256. common::printBack($browseLink);
  257. if(!$charter->deleted) echo $this->charter->buildOperateMenu($charter, 'view');
  258. ?>
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <div id="mainActions" class='main-actions'>
  264. <nav class="container"></nav>
  265. </div>
  266. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>