m.view.html.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <?php
  2. /**
  3. * The view mobile view file of productplan 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 productplan
  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 $plan->id;?></strong></span>
  18. <strong><?php echo $plan->title;?></strong>
  19. <?php if($product->type !== 'normal') echo "<span class='label label-branchlabel-badge'>" . $branches[$branch] . '</span>';?>
  20. <span class='label label-info label-badge'><?php echo $plan->begin . '~' . $plan->end;?></span>
  21. </div>
  22. <nav class='nav'>
  23. <a href='javascript:history.go(-1);' class='btn primary'><?php echo $lang->goback;?></a>
  24. </nav>
  25. </div>
  26. <div class='section no-margin'>
  27. <div class="outline">
  28. <nav class="nav" data-display="" data-selector="a" data-show-single="true" data-active-class="active" data-animate="false">
  29. <a class='<?php if($type == 'story') echo 'active'?>' data-target="#stories"><?php echo $lang->productplan->linkedStories?></a>
  30. <a class='<?php if($type == 'bug') echo 'active'?>' data-target="#bugs"><?php echo $lang->productplan->linkedBugs?></a>
  31. <a data-target="#planInfo"><?php echo $lang->productplan->view?></a>
  32. </nav>
  33. <div>
  34. <div class="display <?php echo $type == 'story' ? 'in' : 'hidden'?>" id="stories">
  35. <div class='heading gray'>
  36. <div class='title'>
  37. <a id='storySortTrigger' class='text-right sort-trigger' data-display data-target='#storySortPanel' data-backdrop='true'><i class='icon icon-sort'></i>&nbsp;<span class='sort-name'><?php echo $lang->sort ?></span></a>
  38. </div>
  39. </div>
  40. <table class='table bordered'>
  41. <thead>
  42. <tr>
  43. <th class='w-50px' > <?php echo $lang->idAB;?></th>
  44. <th class='w-30px'> <?php echo $lang->priAB;?></th>
  45. <th> <?php echo $lang->story->title;?></th>
  46. <th class='w-70px'> <?php echo $lang->statusAB;?></th>
  47. <th class='w-70px'> <?php echo $lang->story->stageAB;?></th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. <?php foreach($planStories as $story):?>
  52. <?php $viewLink = $this->createLink('story', 'view', "storyID=$story->id");?>
  53. <tr class='text-center' data-url='<?php echo $viewLink?>'>
  54. <td><?php echo $story->id;?></td>
  55. <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>
  56. <td class='text-left'>
  57. <?php if($modulePairs and $story->module) echo "<span title='{$lang->story->module}' class='label label-info label-badge'>{$modulePairs[$story->module]}</span> "?>
  58. <?php echo $story->title;?>
  59. </td>
  60. <td class='story-<?php echo $story->status?>'><?php echo $lang->story->statusList[$story->status];?></td>
  61. <td><?php echo $lang->story->stageList[$story->stage];?></td>
  62. </tr>
  63. <?php endforeach;?>
  64. </tbody>
  65. <tfoot>
  66. <tr>
  67. <td colspan='5'><div class='text'><?php echo $summary;?></div></td>
  68. </tr>
  69. </tfoot>
  70. </table>
  71. <nav class='nav justified pager'>
  72. <?php
  73. $this->app->rawParams['type'] = 'story';
  74. $storyPager->show($align = 'justify');
  75. $this->app->rawParams['type'] = $type;
  76. ?>
  77. </nav>
  78. </div>
  79. <div class="display <?php echo $type == 'bug' ? 'in' : 'hidden'?>" id="bugs">
  80. <div class='heading gray'>
  81. <div class='title'>
  82. <a id='bugSortTrigger' class='text-right sort-trigger' data-display data-target='#bugSortPanel' data-backdrop='true'><i class='icon icon-sort'></i>&nbsp;<span class='sort-name'><?php echo $lang->sort ?></span></a>
  83. </div>
  84. </div>
  85. <table class='table bordered'>
  86. <thead>
  87. <tr>
  88. <th class='w-50px'><?php echo $lang->idAB;?></th>
  89. <th class='w-30px'><?php echo $lang->priAB;?></th>
  90. <th > <?php echo $lang->bug->title;?></th>
  91. <th class='w-80px'><?php echo $lang->assignedToAB;?></th>
  92. <th class='w-70px'><?php echo $lang->statusAB;?></th>
  93. </tr>
  94. </thead>
  95. <tbody>
  96. <?php foreach($planBugs as $bug):?>
  97. <tr class='text-center' data-url='<?php echo $this->createLink('bug', 'view', "bugID=$bug->id")?>'>
  98. <td><?php echo $bug->id;?></td>
  99. <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>
  100. <td class='text-left'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
  101. <td><?php echo zget($users, $bug->assignedTo);?></td>
  102. <td class='bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status];?></td>
  103. </tr>
  104. <?php endforeach;?>
  105. </tbody>
  106. <tfoot>
  107. <tr>
  108. <td colspan='5'>
  109. <div class='text'><?php echo sprintf($lang->productplan->bugSummary, count($planBugs));?> </div>
  110. </td>
  111. </tr>
  112. </tfoot>
  113. </table>
  114. <nav class='nav justified pager'>
  115. <?php
  116. $this->app->rawParams['type'] = 'bug';
  117. $bugPager->show($align = 'justify');
  118. $this->app->rawParams['type'] = $type;
  119. ?>
  120. </nav>
  121. </div>
  122. <div class="display hidden" id="planInfo">
  123. <div class='heading gray'>
  124. <div class='title'><strong><?php echo $lang->productplan->basicInfo?></strong></div>
  125. </div>
  126. <table class='table bordered table-detail'>
  127. <tr>
  128. <th class='w-80px strong'><?php echo $lang->productplan->title;?></th>
  129. <td><?php echo $plan->title;?></td>
  130. </tr>
  131. <?php if($product->type != 'normal'):?>
  132. <tr>
  133. <th><?php echo $lang->product->branch;?></th>
  134. <td><?php echo $branches[$plan->branch];?></td>
  135. </tr>
  136. <?php endif;?>
  137. <tr>
  138. <th><?php echo $lang->productplan->begin;?></th>
  139. <td><?php echo $plan->begin;?></td>
  140. </tr>
  141. <tr>
  142. <th><?php echo $lang->productplan->end;?></th>
  143. <td><?php echo $plan->end;?></td>
  144. </tr>
  145. </table>
  146. <?php if($plan->desc):?>
  147. <div class='heading gray'>
  148. <div class='title'><strong><?php echo $lang->productplan->desc;?></strong></div>
  149. </div>
  150. <div class='article'><?php echo $plan->desc;?></div>
  151. <?php endif;?>
  152. <?php include '../../common/view/m.action.html.php';?>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. <div class='list sort-panel hidden affix enter-from-bottom layer' id='storySortPanel'>
  159. <?php
  160. $vars = "planID={$plan->id}&type=story&orderBy=%s&link=$link&param=$param";
  161. $sortOrders = array('id', 'pri', 'title', 'status', 'stage');
  162. foreach ($sortOrders as $order)
  163. {
  164. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . ($lang->story->{$order}));
  165. }
  166. ?>
  167. </div>
  168. <div class='list sort-panel hidden affix enter-from-bottom layer' id='bugSortPanel'>
  169. <?php
  170. $vars = "planID={$plan->id}&type=bug&orderBy=%s&link=$link&param=$param";
  171. $sortOrders = array('id', 'pri', 'title', 'assignedTo', 'status');
  172. foreach ($sortOrders as $order)
  173. {
  174. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . ($lang->bug->{$order}));
  175. }
  176. ?>
  177. </div>
  178. <?php include '../../common/view/m.footer.html.php';?>