unitgroup.html.php 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php if(empty($groupCases)):?>
  2. <div class="table-empty-tip">
  3. <p>
  4. <span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
  5. </p>
  6. </div>
  7. <?php else:?>
  8. <table class="table table-grouped text-center">
  9. <thead>
  10. <tr class="divider">
  11. <th class="c-side text-left has-btn group-menu">
  12. <div class="table-group-btns">
  13. <button type="button" class="btn btn-block btn-link group-collapse-all"><?php echo $lang->execution->treeLevel['root'];?> <i class="icon-caret-down"></i></button>
  14. <button type="button" class="btn btn-block btn-link group-expand-all"><?php echo $lang->execution->treeLevel['all'];?> <i class="icon-caret-up"></i></button>
  15. </div>
  16. </th>
  17. <th class='c-id-sm'><?php echo $lang->idAB;?></th>
  18. <th class='w-pri' title='<?php echo $lang->pri;?>'> <?php echo $lang->priAB;?></th>
  19. <th><?php echo $lang->testcase->title;?></th>
  20. <th class='w-80px'> <?php echo $lang->testtask->lastRunAccount;?></th>
  21. <th class='w-120px'><?php echo $lang->testtask->lastRunTime;?></th>
  22. <th class='w-80px'> <?php echo $lang->testtask->lastRunResult;?></th>
  23. <th class='w-30px' title='<?php echo $lang->testcase->bugs?>'><?php echo $lang->testcase->bugsAB;?></th>
  24. <th class='w-30px' title='<?php echo $lang->testcase->results?>'><?php echo $lang->testcase->resultsAB;?></th>
  25. <th class='w-30px' title='<?php echo $lang->testcase->stepNumber?>'><?php echo $lang->testcase->stepNumberAB;?></th>
  26. <th class='c-actions-1'> <?php echo $lang->actions;?></th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <?php foreach($groupCases as $suiteID => $cases):?>
  31. <?php
  32. $i = 0;
  33. $suite = zget($suites, $suiteID, '');
  34. $groupName = $suite ? $suite->name : '';
  35. ?>
  36. <?php foreach($cases as $caseID => $case):?>
  37. <tr data-id='<?php echo $suiteID;?>' <?php if($i == 0) echo "class='divider-top'";?>>
  38. <?php if($i == 0):?>
  39. <td rowspan='<?php echo count($cases);?>' class='c-side text-left group-toggle text-top'>
  40. <div class='group-header'><?php echo html::a('###', "<i class='icon-caret-down'></i> $groupName", '', "class='text-primary'");?></div>
  41. <?php echo $summary[$suiteID];?>
  42. </td>
  43. <?php endif;?>
  44. <td class='c-id-sm'><?php echo sprintf('%03d', $caseID);?></td>
  45. <td><span class='label-pri <?php echo 'label-pri-' . $case->pri;?>' title='<?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
  46. <td class='text-left title' title='<?php echo $case->title . "\n" . htmlSpecialString($case->xml)?>'><?php if(!common::printLink('testcase', 'view', "case=$case->case&version={$case->version}&from=testtask&task=$taskID", $case->title)) echo $case->title;?></td>
  47. <td><?php echo zget($users, $case->lastRunner);?></td>
  48. <td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
  49. <td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
  50. <td><?php echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a($this->createLink('testcase', 'bugs', "runID={$case->id}&caseID={$case->case}"), $case->bugs, '', "class='iframe'") : $case->bugs;?></td>
  51. <td><?php echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a($this->createLink('testtask', 'results', "runID={$case->id}&caseID={$case->case}"), $case->results, '', "class='iframe'") : $case->results;?></td>
  52. <td><?php echo $case->stepNumber;?></td>
  53. <td class='c-actions'>
  54. <?php common::printIcon('testtask', 'results', "runID=$case->id&caseID=$case->case", $case, 'list', '', '', 'iframe', true, "data-width='95%'");?>
  55. </td>
  56. </tr>
  57. <?php $i++;?>
  58. <?php endforeach;?>
  59. <tr data-id='<?php echo $suiteID;?>' class='group-toggle group-summary hidden divider-top'>
  60. <td class='c-side text-left'><?php echo html::a('###', "<i class='icon-caret-right'></i> $groupName");?></td>
  61. <td colspan='10' class="text-left">
  62. <div class="small with-padding"><?php echo $summary[$suiteID];?></div>
  63. </td>
  64. </tr>
  65. <?php endforeach;?>
  66. </tbody>
  67. </table>
  68. <?php endif;?>