m.view.html.php 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <?php
  2. /**
  3. * The view mobile view file of relase 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 Yidong Wang <yidong@cnezsoft.com>
  8. * @package relase
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include '../../common/view/m.header.html.php';?>
  14. <div id='page' class='list-with-actions'>
  15. <div class='heading'>
  16. <div class='title'>
  17. <span class="prefix"> <strong><?php echo $release->id;?></strong></span>
  18. <strong><?php echo $release->name;?></strong>
  19. </div>
  20. <nav class='nav'>
  21. <a href='javascript:history.go(-1);' class='btn primary'><?php echo $lang->goback;?></a>
  22. </nav>
  23. </div>
  24. <div class='section no-margin'>
  25. <div class="outline">
  26. <nav class="nav" data-display="" data-selector="a" data-show-single="true" data-active-class="active" data-animate="false">
  27. <a class='<?php if($type == 'story') echo 'active'?>' data-target="#stories"><?php echo $lang->release->stories?></a>
  28. <a class='<?php if($type == 'bug') echo 'active'?>' data-target="#bugs"><?php echo $lang->release->bugs?></a>
  29. <a class='<?php if($type == 'leftBug') echo 'active'?>' data-target="#leftBugs"><?php echo $lang->release->generatedBugs?></a>
  30. <a data-target="#releaseInfo"><?php echo $lang->release->view?></a>
  31. </nav>
  32. <div>
  33. <div class="display <?php echo $type == 'story' ? 'in' : 'hidden'?>" id="stories">
  34. <table class='table bordered'>
  35. <thead>
  36. <tr>
  37. <th class='w-50px' > <?php echo $lang->idAB;?></th>
  38. <th class='w-30px'> <?php echo $lang->priAB;?></th>
  39. <th> <?php echo $lang->story->title;?></th>
  40. <th class='w-70px'> <?php echo $lang->statusAB;?></th>
  41. <th class='w-70px'> <?php echo $lang->story->stageAB;?></th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. <?php foreach($stories as $storyID => $story):?>
  46. <?php $viewLink = $this->createLink('story', 'view', "storyID=$story->id");?>
  47. <tr class='text-center' data-url='<?php echo $viewLink?>'>
  48. <td><?php echo $story->id;?></td>
  49. <td><span class='<?php echo 'pri' . zget($lang->story->priList, $story->pri, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
  50. <td class='text-left'><?php echo $story->title;?></td>
  51. <td class='story-<?php echo $story->status?>'><?php echo $lang->story->statusList[$story->status];?></td>
  52. <td><?php echo $lang->story->stageList[$story->stage];?></td>
  53. </tr>
  54. <?php endforeach;?>
  55. </tbody>
  56. <tfoot>
  57. <tr>
  58. <td colspan='5'><div class='text'><?php echo sprintf($lang->release->finishStories, count($stories));?></div></td>
  59. </tr>
  60. </tfoot>
  61. </table>
  62. <nav class='nav justified pager'>
  63. <?php
  64. $this->app->rawParams['type'] = 'story';
  65. $storyPager->show($align = 'justify');
  66. $this->app->rawParams['type'] = $type;
  67. ?>
  68. </nav>
  69. </div>
  70. <div class="display <?php echo $type == 'bug' ? 'in' : 'hidden'?>" id="bugs">
  71. <table class='table bordered'>
  72. <thead>
  73. <tr>
  74. <th class='w-50px'><?php echo $lang->idAB;?></th>
  75. <th class='w-30px'><?php echo $lang->priAB;?></th>
  76. <th > <?php echo $lang->bug->title;?></th>
  77. <th class='w-80px'><?php echo $lang->assignedToAB;?></th>
  78. <th class='w-70px'><?php echo $lang->statusAB;?></th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. <?php foreach($bugs as $bug):?>
  83. <tr class='text-center' data-url='<?php echo $this->createLink('bug', 'view', "bugID=$bug->id")?>'>
  84. <td><?php echo $bug->id;?></td>
  85. <td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri);?></span></td>
  86. <td class='text-left'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
  87. <td><?php echo zget($users, $bug->assignedTo);?></td>
  88. <td class='bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status];?></td>
  89. </tr>
  90. <?php endforeach;?>
  91. </tbody>
  92. <tfoot>
  93. <tr>
  94. <td colspan='5'>
  95. <div class='text'><?php echo sprintf($lang->release->resolvedBugs, count($bugs));?> </div>
  96. </td>
  97. </tr>
  98. </tfoot>
  99. </table>
  100. <nav class='nav justified pager'>
  101. <?php
  102. $this->app->rawParams['type'] = 'bug';
  103. $bugPager->show($align = 'justify');
  104. $this->app->rawParams['type'] = $type;
  105. ?>
  106. </nav>
  107. </div>
  108. <div class="display <?php echo $type == 'leftBug' ? 'in' : 'hidden'?>" id="leftBugs">
  109. <table class='table bordered'>
  110. <thead>
  111. <tr>
  112. <th class='w-50px'><?php echo $lang->idAB;?></th>
  113. <th class='w-30px'><?php echo $lang->priAB;?></th>
  114. <th > <?php echo $lang->bug->title;?></th>
  115. <th class='w-80px'><?php echo $lang->assignedToAB;?></th>
  116. <th class='w-70px'><?php echo $lang->statusAB;?></th>
  117. </tr>
  118. </thead>
  119. <tbody>
  120. <?php foreach($leftBugs as $bug):?>
  121. <tr class='text-center' data-url='<?php echo $this->createLink('bug', 'view', "bugID=$bug->id")?>'>
  122. <td><?php echo $bug->id;?></td>
  123. <td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri);?></span></td>
  124. <td class='text-left'><?php echo $bug->title;?></td>
  125. <td><?php echo zget($users, $bug->assignedTo);?></td>
  126. <td class='bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status];?></td>
  127. </tr>
  128. <?php endforeach;?>
  129. </tbody>
  130. <tfoot>
  131. <tr>
  132. <td colspan='5'>
  133. <div class='text'><?php echo sprintf($lang->release->createdBugs, count($leftBugs));?> </div>
  134. </td>
  135. </tr>
  136. </tfoot>
  137. </table>
  138. <nav class='nav justified pager'>
  139. <?php
  140. $this->app->rawParams['type'] = 'leftBug';
  141. $leftBugPager->show($align = 'justify');
  142. $this->app->rawParams['type'] = $type;
  143. ?>
  144. </nav>
  145. </div>
  146. <div class="display hidden" id="releaseInfo">
  147. <div class='heading gray'>
  148. <div class='title'><strong><?php echo $lang->release->basicInfo?></strong></div>
  149. </div>
  150. <table class='table bordered table-detail'>
  151. <tr>
  152. <th class='w-80px'><?php echo $lang->release->product;?></th>
  153. <td><?php echo $release->productName;?></td>
  154. </tr>
  155. <?php if($release->productType != 'normal'):?>
  156. <tr>
  157. <th><?php echo $lang->product->branch;?></th>
  158. <td><?php echo $branchName;?></td>
  159. </tr>
  160. <?php endif;?>
  161. <tr>
  162. <th><?php echo $lang->release->name;?></th>
  163. <td><?php echo $release->name;?></td>
  164. </tr>
  165. <tr>
  166. <th><?php echo $lang->release->build;?></th>
  167. <td><?php echo $release->buildID ? html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName) : $release->buildName;?></td>
  168. </tr>
  169. <tr>
  170. <th><?php echo $lang->release->status;?></th>
  171. <td><?php echo $lang->release->statusList[$release->status];?></td>
  172. </tr>
  173. <tr>
  174. <th><?php echo $lang->release->date;?></th>
  175. <td><?php echo $release->date;?></td>
  176. </tr>
  177. </table>
  178. <?php if($release->desc):?>
  179. <div class='heading gray'>
  180. <div class='title'><strong><?php echo $lang->release->desc;?></strong></div>
  181. </div>
  182. <div class='article'><?php echo $release->desc;?></div>
  183. <?php endif;?>
  184. <div class='heading gray'>
  185. <div class='title'><strong><?php echo $lang->files?></strong></div>
  186. </div>
  187. <div class='article'>
  188. <?php
  189. if($release->files)
  190. {
  191. echo $this->fetch('file', 'printFiles', array('files' => $release->files, 'fieldset' => 'false'));
  192. }
  193. elseif($release->filePath)
  194. {
  195. echo $lang->release->filePath . html::a($release->filePath, $release->filePath, '_blank');
  196. }
  197. elseif($release->scmPath)
  198. {
  199. echo $lang->release->scmPath . html::a($release->scmPath, $release->scmPath, '_blank');
  200. }
  201. ?>
  202. </div>
  203. <?php include '../../common/view/m.action.html.php';?>
  204. </div>
  205. </div>
  206. </div>
  207. </div>
  208. </div>
  209. <?php include '../../common/view/m.footer.html.php';?>