m.groupcase.html.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * The groupcase 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. <section id='page' class='section list-with-pager'>
  15. <?php $refreshUrl = $this->createLink('testtask', '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. <?php if(!isset($case->pri)) continue;?>
  33. <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;?>'>
  34. <td></td>
  35. <td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri)?></span></td>
  36. <td class='text-left'>
  37. <?php echo "<span style='color:$case->color'>" . $case->title . '</span>';?>
  38. </td>
  39. <td class='testcase-<?php echo $case->status;?>'><?php echo zget($lang->testcase->statusList, $case->status);?></td>
  40. </tr>
  41. <?php endforeach;?>
  42. <?php endforeach;?>
  43. </table>
  44. </div>
  45. </section>
  46. <script>
  47. $(function()
  48. {
  49. $('tr[id^="node-"]').click(function()
  50. {
  51. var groupKey = $(this).attr('id').replace('node-', '');
  52. if($(this).hasClass('hidden-child'))
  53. {
  54. $(this).removeClass('hidden-child');
  55. $(this).find('.icon-caret-right').removeClass('icon-caret-right').addClass('icon-caret-down');
  56. $('tr.child-of-node-' + groupKey).show();
  57. }
  58. else
  59. {
  60. $(this).addClass('hidden-child');
  61. $(this).find('.icon-caret-down').removeClass('icon-caret-down').addClass('icon-caret-right');
  62. $('tr.child-of-node-' + groupKey).hide();
  63. }
  64. });
  65. $('#groupcaseTab').addClass('active');
  66. })
  67. </script>
  68. <?php include '../../common/view/m.footer.html.php';?>