m.groupcase.html.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * The groupcase 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. <section id='page' class='section list-with-pager'>
  15. <?php $refreshUrl = $this->createLink('testcase', 'groupcase', http_build_query($this->app->getParams()));?>
  16. <div class='box' data-refresh-url='<?php echo $refreshUrl ?>'>
  17. <table class='table bordered no-margin'>
  18. <thead>
  19. <tr>
  20. <th class='w-50px'></th>
  21. <th class='w-40px'><?php echo $lang->priAB;?></th>
  22. <th><?php echo $lang->testcase->title;?></th>
  23. <th class='w-80px text-center'><?php echo $lang->testcase->status;?></th>
  24. </tr>
  25. </thead>
  26. <?php foreach($cases as $groupKey => $groupTasks):?>
  27. <tr id='node-<?php echo $groupKey;?>' class='actie-disabled group-title'>
  28. <td class='text-right strong group-name'><i class='icon-caret-down'></i><?php echo $groupKey;?></td>
  29. <td colspan='3' class='text-left'><?php if($groupByList) echo $groupByList[$groupKey];?></td>
  30. </tr>
  31. <?php foreach($groupTasks as $case):?>
  32. <tr class='text-center child-of-node-<?php echo $groupKey;?>' data-url='<?php echo $this->createLink('testcase', 'view', "caseID={$case->id}")?>' data-id='<?php echo$case->id;?>'>
  33. <td></td>
  34. <td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri)?></span></td>
  35. <td class='text-left'>
  36. <?php echo "<span style='color:$case->color'>" . $case->title . '</span>';?>
  37. </td>
  38. <td class='testcase-<?php echo $case->status;?>'><?php echo zget($lang->testcase->statusList, $case->status);?></td>
  39. </tr>
  40. <?php endforeach;?>
  41. <?php endforeach;?>
  42. </table>
  43. </div>
  44. </section>
  45. <script>
  46. $(function()
  47. {
  48. $('tr[id^="node-"]').click(function()
  49. {
  50. var groupKey = $(this).attr('id').replace('node-', '');
  51. if($(this).hasClass('hidden-child'))
  52. {
  53. $(this).removeClass('hidden-child');
  54. $(this).find('.icon-caret-right').removeClass('icon-caret-right').addClass('icon-caret-down');
  55. $('tr.child-of-node-' + groupKey).show();
  56. }
  57. else
  58. {
  59. $(this).addClass('hidden-child');
  60. $(this).find('.icon-caret-down').removeClass('icon-caret-down').addClass('icon-caret-right');
  61. $('tr.child-of-node-' + groupKey).hide();
  62. }
  63. });
  64. $('#groupcaseTab').addClass('active');
  65. })
  66. </script>
  67. <?php include '../../common/view/m.footer.html.php';?>