testtask.html.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * The testtask view file of my 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 my
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. include 'header.html.php';
  12. featureBar
  13. (
  14. set::current($type),
  15. set::linkParams("mode=testtask&type={key}&param=&orderBy={$orderBy}")
  16. );
  17. foreach($config->my->testtask->dtable->fieldList['actions']['list'] as $actionKey => $action)
  18. {
  19. if(!isset($action['data-toggle']) && !isset($action['data-confirm'])) $config->my->testtask->dtable->fieldList['actions']['list'][$actionKey]['data-app'] = 'qa';
  20. }
  21. $tasks = initTableData($tasks, $config->my->testtask->dtable->fieldList, $this->testtask);
  22. $cols = array_values($config->my->testtask->dtable->fieldList);
  23. $data = array_values($tasks);
  24. $footerHTML = $app->rawMethod == 'work' ? sprintf($lang->testtask->mySummary, count($tasks), $waitCount, $testingCount, $blockedCount) : sprintf($lang->testtask->pageSummary, count($tasks));
  25. dtable
  26. (
  27. set::cols($cols),
  28. set::data($data),
  29. set::fixedLeftWidth('20%'),
  30. set::orderBy($orderBy),
  31. set::sortLink(createLink('my', $app->rawMethod, "mode={$mode}&type={$type}&param={$param}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),
  32. set::footer(array(array('html' => $footerHTML), 'flex', 'pager')),
  33. set::footPager(usePager()),
  34. set::emptyTip($lang->testtask->noTesttask)
  35. );
  36. render();