view.html.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?php
  2. /**
  3. * The view view of product 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 product
  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. <?php $style = isonlybody() ? 'style="margin-top: 0px;"' : '';?>
  16. <div id='mainContent' class="main-row" <?php echo $style;?>>
  17. <div class="col-8 main-col">
  18. <div class="row">
  19. <div class="col-sm-12">
  20. <div class="cell">
  21. <div class="detail">
  22. <?php $hiddenCode = (!isset($config->setCode) or $config->setCode == 0) ? 'hidden' : '';?>
  23. <h2 class="detail-title"><span class="label-id"><?php echo $product->id;?></span> <span class="label label-light label-outline <?php echo $hiddenCode;?>"><?php echo $product->code;?></span> <?php echo $product->name;?></h2>
  24. <div class="detail-content article-content">
  25. <p><?php echo $product->desc;?></p>
  26. </div>
  27. </div>
  28. <?php if($product->type == 'platform'):?>
  29. <div class="detail">
  30. <div class="detail-title"><strong><?php echo $lang->product->branchName['platform'];?></strong><a class="btn btn-link pull-right muted" href="<?php echo $this->createLink('branch', 'manage', "productID={$product->id}")?>"><i class="icon icon-more icon-sm"></i></a></div>
  31. <div class="detail-content">
  32. <ul class="clearfix branch-list">
  33. <?php foreach($branches as $branchName):?>
  34. <li><?php echo $branchName;?></li>
  35. <?php endforeach;?>
  36. <li><a class="text-muted" href="<?php echo $this->createLink('branch', 'manage', "productID={$product->id}")?>"><i class="icon icon-plus hl-primary text-primary"></i> &nbsp;<?php echo $lang->branch->add;?></a></li>
  37. </ul>
  38. </div>
  39. </div>
  40. <?php endif;?>
  41. <div class="detail pm-detail">
  42. <div class="detail-title"><strong><?php echo $lang->product->manager;?></strong></div>
  43. <div class="detail-content">
  44. <table class="table table-data">
  45. <tbody>
  46. <?php if($this->config->edition != 'open'):?>
  47. <tr>
  48. <th><i class="icon icon-person icon-sm"></i> <?php echo $lang->product->PO;?></th>
  49. <td colspan="2"><strong><?php echo zget($users, $product->PO) . "&nbsp;";?></strong></td>
  50. </tr>
  51. <tr>
  52. <th><i class="icon icon-person icon-sm"></i> <?php echo $lang->product->PMT;?></th>
  53. <td colspan="2"><strong><?php foreach(explode(',', $product->PMT) as $PMT) echo zget($users, $PMT) . "&nbsp;";?></strong></td>
  54. </tr>
  55. <tr>
  56. <th><i class="icon icon-person icon-sm"></i> <?php echo $lang->product->reviewer;?></th>
  57. <td><strong><?php foreach($reviewers as $reviewer) echo zget($users, $reviewer) . "&nbsp;";?></strong></td>
  58. </tr>
  59. <?php endif;?>
  60. </tbody>
  61. </table>
  62. </div>
  63. </div>
  64. <div class="detail">
  65. <div class="detail-title"><strong><?php echo $lang->product->basicInfo;?></strong></div>
  66. <div class="detail-content">
  67. <table class="table table-data data-basic">
  68. <tbody>
  69. <?php if(!$hiddenCode):?>
  70. <tr>
  71. <th class="c-code"><?php echo $lang->product->code;?></th>
  72. <td><strong><?php echo $product->code;?></strong></td>
  73. <th class="c-openedBy"><?php echo $lang->story->openedBy?></th>
  74. <td colspan="2"><strong><?php echo zget($users, $product->createdBy);?></strong></td>
  75. </tr>
  76. <tr>
  77. <th><?php echo $lang->product->type;?></th>
  78. <td><strong><?php echo zget($lang->product->typeList, $product->type);?></strong></td>
  79. <th><?php echo $lang->story->openedDate?></th>
  80. <td colspan="2"><strong><?php echo formatTime($product->createdDate, DT_DATE1);?></strong></td>
  81. </tr>
  82. <tr>
  83. <th class="c-type"><?php echo $lang->productCommon . $lang->product->status;?></th>
  84. <td class="<?php echo $product->status;?>"><strong><?php echo zget($lang->product->statusList, $product->status);?></strong></td>
  85. <th class="c-acl"><?php echo $lang->product->acl;?></th>
  86. <td <?php echo empty($product->code) ? "colspan='4'" : "colspan='2'";?>><strong><?php echo $lang->product->aclList[$product->acl];?></strong></td>
  87. </tr>
  88. <?php else:?>
  89. <tr>
  90. <th><?php echo $lang->product->type;?></th>
  91. <td><strong><?php echo zget($lang->product->typeList, $product->type);?></strong></td>
  92. <th class="c-openedBy"><?php echo $lang->story->openedBy?></th>
  93. <td colspan="2"><strong><?php echo zget($users, $product->createdBy);?></strong></td>
  94. </tr>
  95. <tr>
  96. <th class="c-type"><?php echo $lang->productCommon . $lang->product->status;?></th>
  97. <td class="<?php echo $product->status;?>"><strong><?php echo zget($lang->product->statusList, $product->status);?></strong></td>
  98. <th><?php echo $lang->story->openedDate?></th>
  99. <td colspan="2"><strong><?php echo formatTime($product->createdDate, DT_DATE1);?></strong></td>
  100. </tr>
  101. <tr>
  102. <th class="c-acl"><?php echo $lang->product->acl;?></th>
  103. <td colspan='4'><strong><?php echo $lang->product->aclList[$product->acl];?></strong></td>
  104. </tr>
  105. <?php endif;?>
  106. <?php if($product->acl == 'custom'):?>
  107. <tr>
  108. <th><?php echo $lang->product->whitelist;?></th>
  109. <td>
  110. <strong>
  111. <?php
  112. $whitelist = explode(',', $product->whitelist);
  113. foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . '&nbsp;';
  114. ?>
  115. </strong>
  116. </td>
  117. </tr>
  118. <?php endif;?>
  119. </tbody>
  120. </table>
  121. </div>
  122. </div>
  123. <div class="detail">
  124. <div class="detail-title"><strong><?php echo $lang->product->otherInfo;?></strong></div>
  125. <div class="detail-content">
  126. <table class="table table-data data-basic">
  127. <tbody>
  128. <?php $space = common::checkNotCN() ? ' ' : '';?>
  129. <?php $lang->URCommon = common::checkNotCN() ? ' URs' : $lang->URCommon;?>
  130. <?php if($config->vision == 'or'):?>
  131. <?php $product = $this->product->getStatByID($product->id, 'requirement');?>
  132. <tr>
  133. <th><?php echo $lang->story->statusList['draft'] . $space . $lang->URCommon;?></th>
  134. <td><strong><?php echo $product->stories['draft']?></strong></td>
  135. <th class="c-common"><?php echo $lang->story->statusList['active'] . $space . $lang->URCommon;?></th>
  136. <td colspan="2"><strong><?php echo $product->stories['active']?></strong></td>
  137. </tr>
  138. <tr>
  139. <th><?php echo $lang->story->statusList['reviewing'] . $space . $lang->URCommon;?></th>
  140. <td><strong><?php echo $product->stories['reviewing']?></strong></td>
  141. <th><?php echo $lang->story->statusList['changing'] . $space . $lang->URCommon;?></th>
  142. <td colspan="2"><strong><?php echo $product->stories['changing']?></strong></td>
  143. </tr>
  144. <?php else:?>
  145. <tr>
  146. <th class="c-common"><?php echo $lang->story->statusList['active'] . $space . $lang->story->common;?></th>
  147. <td><strong><?php echo $product->stories['active']?></strong></td>
  148. <th><?php echo $lang->product->plans?></th>
  149. <td><strong><?php echo $product->plans?></strong></td>
  150. <th class='c-bugs'><?php echo $lang->product->bugs?></th>
  151. <td><strong><?php echo $product->bugs?></strong></td>
  152. </tr>
  153. <tr>
  154. <th><?php echo $lang->story->statusList['draft'] . $space . $lang->story->common;?></th>
  155. <td><strong><?php echo $product->stories['draft']?></strong></td>
  156. <th><?php echo $lang->product->builds?></th>
  157. <td><strong><?php echo $product->builds?></strong></td>
  158. <th><?php echo $lang->product->docs?></th>
  159. <td><strong><?php echo $product->docs?></strong></td>
  160. </tr>
  161. <tr>
  162. <th><?php echo $lang->story->statusList['changing'] . $space . $lang->story->common;?></th>
  163. <td><strong><?php echo $product->stories['changing']?></strong></td>
  164. <th><?php echo $lang->product->releases?></th>
  165. <td><strong><?php echo $product->releases?></strong></td>
  166. <th><?php echo $lang->product->cases?></th>
  167. <td><strong><?php echo $product->cases?></strong></td>
  168. </tr>
  169. <tr>
  170. <th><?php echo $lang->story->statusList['reviewing'] . $space . $lang->story->common;?></th>
  171. <td><strong><?php echo $product->stories['reviewing']?></strong></td>
  172. <th><?php echo $lang->product->projects?></th>
  173. <td><strong><?php echo $product->projects?></strong></td>
  174. <th><?php echo $lang->product->executions?></th>
  175. <td><strong><?php echo $product->executions?></strong></td>
  176. </tr>
  177. <?php endif;?>
  178. </tbody>
  179. </table>
  180. </div>
  181. </div>
  182. <?php $this->printExtendFields($product, 'div', "position=left&inForm=0&inCell=1");?>
  183. </div>
  184. </div>
  185. </div>
  186. <div class='main-actions'>
  187. <div class="btn-toolbar">
  188. <?php
  189. $browseLink = $this->session->productList ? $this->session->productList : inlink('browse', "productID=$product->id");
  190. common::printBack($browseLink);
  191. if(!$product->deleted) echo $this->product->buildOperateMenu($product, 'view');
  192. ?>
  193. </div>
  194. </div>
  195. </div>
  196. <div class="col-4 side-col">
  197. <div class="row">
  198. <div class="col-sm-12">
  199. <?php $this->printExtendFields($product, 'div', "position=right&inForm=0&inCell=1");?>
  200. <?php $blockHistory = true;?>
  201. <?php $actionFormLink = $this->createLink('action', 'comment', "objectType=product&objectID=$product->id");?>
  202. <?php include $app->getModuleRoot() . 'common/view/action.html.php';?>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. <div id="mainActions" class='main-actions'>
  208. <nav class="container"></nav>
  209. </div>
  210. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>