m.cases.html.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * The cases 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. ?>
  13. <?php include './m.caseheader.html.php';?>
  14. <div class='heading'>
  15. <div class='title'>
  16. <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>
  17. </div>
  18. </div>
  19. <section id='page' class='section list-with-pager'>
  20. <?php $refreshUrl = $this->createLink('testtask', 'cases', http_build_query($this->app->getParams()));?>
  21. <div class='box' data-page='<?php echo $pager->pageID ?>' data-refresh-url='<?php echo $refreshUrl ?>'>
  22. <table class='table bordered no-margin'>
  23. <thead>
  24. <tr>
  25. <th><?php echo $lang->testcase->title;?></th>
  26. <th class='w-80px text-center'><?php echo $lang->testcase->status;?></th>
  27. </tr>
  28. </thead>
  29. <?php foreach($runs as $case):?>
  30. <tr class='text-center' data-url='<?php echo $this->createLink('testcase', 'view', "caseID={$case->id}")?>' data-id='<?php echo$case->id;?>'>
  31. <td class='text-left'>
  32. <?php if($case->branch) echo "<span class='label label-branch label-badge'>{$branches[$case->branch]}</span> "?>
  33. <?php echo "<span style='color:$case->color'>" . $case->title . '</span>';?>
  34. </td>
  35. <?php $caseStatus = $case->version < $case->caseVersion ? 'changed' : $case->status;?>
  36. <td class='testcase-<?php echo $caseStatus;?>'><?php echo ($case->version < $case->caseVersion) ? $lang->testcase->changed : $lang->testcase->statusList[$case->status];?></td>
  37. </tr>
  38. <?php endforeach;?>
  39. </table>
  40. </div>
  41. <nav class='nav justified pager'>
  42. <?php $pager->show($align = 'justify');?>
  43. </nav>
  44. </section>
  45. <div class='list sort-panel hidden affix enter-from-bottom layer' id='sortPanel'>
  46. <?php
  47. $vars = "taskID=$task->id&browseType=$browseType&param=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
  48. $sortOrders = array('id', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'type', 'lastRunner', 'lastRunDate', 'lastRunResult');
  49. foreach ($sortOrders as $order)
  50. {
  51. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . ($lang->testcase->{$order}));
  52. }
  53. ?>
  54. </div>
  55. <script>
  56. $(function()
  57. {
  58. $('#<?php echo $browseType;?>Tab').addClass('active');
  59. })
  60. </script>
  61. <?php include '../../common/view/m.footer.html.php';?>