m.testcase.html.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * The testcase browse mobile view file of my module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2016 禅道软件(青岛)有限公司(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 my
  9. * @version $Id: index.html.php 3830 2016-05-18 09:34:17Z liugang $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php
  14. $bodyClass = 'with-menu-top';
  15. include "../../common/view/m.header.html.php";
  16. ?>
  17. <nav id='menu' class='menu nav affix dock-top canvas'>
  18. <?php
  19. echo html::a($this->createLink('my', 'testtask', 'type=wait'), $lang->testtask->wait);
  20. echo html::a($this->createLink('my', 'testtask', 'type=done'), $lang->testtask->done);
  21. echo html::a($this->createLink('my', 'testcase', "type=assigntome"), $lang->testcase->assignToMe);
  22. echo html::a($this->createLink('my', 'testcase', "type=openedbyme"), $lang->testcase->openedByMe);
  23. ?>
  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. <div class='heading'>
  28. <div class='title'>
  29. <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>
  30. </div>
  31. </div>
  32. <section id='page' class='section list-with-actions list-with-pager'>
  33. <?php $refreshUrl = $this->createLink('my', 'testcase', "type={$type}&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}");?>
  34. <div class='box' data-page='<?php echo $pager->pageID;?>' data-refresh-url='<?php echo $refreshUrl;?>'>
  35. <table class='table bordered'>
  36. <thead>
  37. <tr>
  38. <th><?php echo $lang->testcase->title;?> </th>
  39. <th class='text-center w-80px'><?php echo $lang->testcase->type;?> </th>
  40. <th class='text-center w-80px'><?php echo $lang->testcase->status;?> </th>
  41. </tr>
  42. </thead>
  43. <?php foreach($cases as $case):?>
  44. <tr class='text-center' data-url='<?php echo $this->createLink('testcase', 'view', "caseID={$case->id}");?>' data-id='<?php echo $case->id;?>'>
  45. <td class='text-left'><?php echo $case->title;?></td>
  46. <td><?php echo zget($lang->testcase->typeList, $case->type);?></td>
  47. <td class='testcase-<?php echo $case->status?>'><?php echo zget($lang->testcase->statusList, $case->status);?></td>
  48. </tr>
  49. <?php endforeach;?>
  50. </table>
  51. </div>
  52. <nav class='nav justify pager'>
  53. <?php $pager->show($align = 'justify');?>
  54. </nav>
  55. </section>
  56. <div class='list sort-panel hidden affix enter-from-bottom layer' id='sortPanel'>
  57. <?php
  58. $vars = "type={$type}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";
  59. $sortOrders = array('id', 'pri', 'title', 'type', 'openedDate', 'openedBy');
  60. if($type != 'assigntome') $sortOrders[] = 'status';
  61. foreach ($sortOrders as $sortOrder)
  62. {
  63. commonModel::printOrderLink($sortOrder, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . ($lang->testcase->{$sortOrder}));
  64. }
  65. ?>
  66. </div>
  67. <script>
  68. $('#menu > a').removeClass('active').filter('[href*="<?php echo $type ?>"]').addClass('active');
  69. </script>
  70. <?php include "../../common/view/m.footer.html.php"; ?>