m.view.html.php 9.3 KB

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