groupcase.html.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * The groupcase view file of testcase module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Yuting Wang <wangyuting@easycorp.ltd>
  7. * @package testcase
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('allTestcases', $lang->testcase->allTestcases);
  12. include 'header.html.php';
  13. $cols = $config->testcase->group->dtable->fieldList;
  14. if(!empty($cols['actions']['list']))
  15. {
  16. $executionID = ($app->tab == 'project' || $app->tab == 'execution') ? $this->session->{$app->tab} : '0';
  17. foreach($cols['actions']['list'] as $method => $methodParams)
  18. {
  19. if(!isset($methodParams['url'])) continue;
  20. $cols['actions']['list'][$method]['url'] = str_replace('%executionID%', (string)$executionID, $methodParams['url']);
  21. }
  22. }
  23. foreach($cols as $colName => $col) $cols[$colName]['sortType'] = false;
  24. $cases = initTableData(array_values($cases), $cols);
  25. dtable
  26. (
  27. setID('groupCaseTable'),
  28. set::cols($cols),
  29. set::data($cases),
  30. set::userMap($users),
  31. set::plugins(array('cellspan')),
  32. set::onRenderCell(jsRaw('window.onRenderCell')),
  33. set::getCellSpan(jsRaw('window.getCellSpan'))
  34. );
  35. render();