m.browse.html.php 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * The browse mobile view file of testcase 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 testcase
  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('testcase', 'browse', 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. <th class='w-80px text-center'><?php echo $lang->testcase->result;?></th>
  28. </tr>
  29. </thead>
  30. <?php foreach($cases as $case):?>
  31. <tr class='text-center' data-url='<?php echo $this->createLink('testcase', 'view', "caseID={$case->id}")?>' data-id='<?php echo$case->id;?>'>
  32. <td class='text-left'>
  33. <?php if($case->branch) echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>{$branches[$case->branch]}</span> "?>
  34. <?php if($modulePairs and $case->module) echo "<span title='{$lang->testcase->module}' class='label label-info label-badge'>{$modulePairs[$case->module]}</span> "?>
  35. <?php echo "<span style='color:$case->color'>" . $case->title . '</span>';?>
  36. </td>
  37. <?php $caseStatus = $case->needconfirm ? 'changed' : $case->status?>
  38. <td class='testcase-<?php echo $caseStatus;?>'><?php echo $case->needconfirm ? $lang->story->changed : zget($lang->testcase->statusList, $case->status);?></td>
  39. <td class='<?php echo $case->lastRunResult;?>'><?php echo zget($lang->testcase->resultList, $case->lastRunResult);?></td>
  40. </tr>
  41. <?php endforeach;?>
  42. </table>
  43. </div>
  44. <nav class='nav justified pager'>
  45. <?php $pager->show($align = 'justify');?>
  46. </nav>
  47. </section>
  48. <div class='list sort-panel hidden affix enter-from-bottom layer' id='sortPanel'>
  49. <?php
  50. $vars = "productID=$productID&branch=$branch&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
  51. $sortOrders = array('id', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'type', 'lastRunner', 'lastRunDate', 'lastRunResult');
  52. foreach ($sortOrders as $order)
  53. {
  54. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . ($lang->testcase->{$order}));
  55. }
  56. ?>
  57. </div>
  58. <script>
  59. $(function()
  60. {
  61. $('#<?php echo $browseType;?>Tab').addClass('active');
  62. <?php if($config->global->flow != 'full'):?>
  63. $('#appnav a').removeClass('active');
  64. $("#appnav a[href*='<?php echo $browseType?>']").addClass('active');
  65. <?php endif;?>
  66. })
  67. </script>
  68. <?php include '../../common/view/m.footer.html.php';?>