execution.html.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * The execution view file of user 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 Wang Yidong <yidong@easycorp.ltd>
  7. * @package user
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. include './featurebar.html.php';
  12. $app->loadLang('execution');
  13. $app->loadModuleConfig('execution');
  14. jsVar('delayed', $lang->execution->delayed);
  15. jsVar('executionTypeList', $lang->user->executionTypeList);
  16. jsVar('edition', $config->edition);
  17. $cols = array();
  18. foreach($config->user->defaultFields['execution'] as $field) $cols[$field] = zget($config->execution->dtable->fieldList, $field, array());
  19. $cols['name']['nestedToggle'] = false;
  20. $cols['name']['type'] = 'text';
  21. $cols['name']['link'] = $config->user->execution->dtable->name['link'];
  22. $cols['name']['name'] = 'name';
  23. $cols['name']['title'] = $lang->execution->name;
  24. $cols['name']['data-app'] = 'execution';
  25. $cols['status']['title'] = $lang->statusAB;
  26. $cols['id'] = array('type' => 'checkID', 'title' => $lang->idAB, 'checkbox' => false);
  27. $cols['role'] = array('type' => 'user', 'title' => $lang->team->role, 'sortType' => false);
  28. $cols['join'] = array('type' => 'date', 'title' => $lang->team->join, 'sortType' => false);
  29. $cols['hours'] = array('type' => 'number', 'width' => 100, 'title' => $lang->team->hours, 'sortType' => false);
  30. $cols = array_map(function($col)
  31. {
  32. unset($col['fixed'], $col['group']);
  33. return $col;
  34. }, $cols);
  35. panel
  36. (
  37. setClass('list'),
  38. set::title(null),
  39. dtable
  40. (
  41. set::bordered(true),
  42. set::cols($cols),
  43. set::data(array_values($executions)),
  44. set::orderBy($orderBy),
  45. set::sortLink(inlink('execution', "userID={$user->id}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),
  46. set::onRenderCell(jsRaw('window.renderCell')),
  47. set::footPager(usePager())
  48. )
  49. );
  50. render();