m.browse.html.php 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * The browse mobile view file of testtask 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 testtask
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. $bodyClass = $config->global->flow == 'full' ? 'with-menu-top' : '';
  13. include "../../common/view/m.header.html.php";
  14. $scope = $this->session->testTaskVersionScope;
  15. $status = $this->session->testTaskVersionStatus;
  16. ?>
  17. <?php if($config->global->flow == 'full'):?>
  18. <nav id='menu' class='menu nav affix dock-top canvas'>
  19. <?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,wait"), $lang->testtask->wait, '', "id='waitTab'");?>
  20. <?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,doing"), $lang->testtask->testing, '', "id='doingTab'");?>
  21. <?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,blocked"), $lang->testtask->blocked, '', "id='blockedTab'");?>
  22. <?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,done"), $lang->testtask->done, '', "id='doneTab'");?>
  23. <?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,totalStatus"), $lang->testtask->totalStatus, '', "id='totalStatusTab'");?>
  24. <a class='moreMenu hidden' data-display='dropdown' data-placement='beside-bottom'><?php echo $lang->more;?></a>
  25. <div id='moreMenu' class='list dropdown-menu'></div>
  26. </nav>
  27. <?php endif;?>
  28. <div class='heading'>
  29. <div class='title'>
  30. <a id='sortTrigger' class='text-right sort-trigger' data-display data-target='#sortPanel' data-backdrop='true'><i class='icon icon-sort'></i>&nbsp;<span class='sort-name'><?php echo $lang->sort ?></span></a>
  31. </div>
  32. </div>
  33. <section id='page' class='section list-with-pager'>
  34. <?php $refreshUrl = $this->createLink('testtask', 'browse', http_build_query($this->app->getParams()));?>
  35. <div class='box' data-page='<?php echo $pager->pageID ?>' data-refresh-url='<?php echo $refreshUrl ?>'>
  36. <table class='table bordered no-margin'>
  37. <thead>
  38. <tr>
  39. <th><?php echo $lang->testtask->name;?></th>
  40. <th class='w-100px'><?php echo $lang->testtask->begin;?></th>
  41. <th class='w-100px'><?php echo $lang->testtask->end;?></th>
  42. </tr>
  43. </thead>
  44. <?php foreach($tasks as $task):?>
  45. <tr class='text-center' data-url='<?php echo $this->createLink('testtask', 'cases', "taskID={$task->id}")?>' data-id='<?php echo$task->id;?>'>
  46. <td class='text-left'><?php echo $task->name;?></td>
  47. <td><?php echo $task->begin;?></td>
  48. <td><?php echo $task->end;?></td>
  49. </tr>
  50. <?php endforeach;?>
  51. </table>
  52. </div>
  53. <nav class='nav justified pager'>
  54. <?php $pager->show($align = 'justify');?>
  55. </nav>
  56. </section>
  57. <div class='list sort-panel hidden affix enter-from-bottom layer' id='sortPanel'>
  58. <?php $vars = "productID=$productID&branch=$branch&type=$scope,$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
  59. <?php
  60. $sortOrders = array('id', 'name', 'begin', 'end', 'owner', 'status', 'build');
  61. foreach ($sortOrders as $order)
  62. {
  63. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . ($lang->testtask->{$order}));
  64. }
  65. ?>
  66. </div>
  67. <script>
  68. $(function()
  69. {
  70. $('#<?php echo $status?>Tab').addClass('active')
  71. <?php if($config->global->flow != 'full'):?>
  72. $('#appnav a').removeClass('active');
  73. $("#appnav a[href*='<?php echo $status?>']").addClass('active');
  74. <?php endif;?>
  75. })
  76. </script>
  77. <?php include "../../common/view/m.footer.html.php"; ?>