browse.html.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * The browse view file of deploy 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 Yang Li <liyang@easycorp.ltd>
  7. * @package deploy
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('deployLang', $this->lang->deploy);
  12. $queryMenuLink = inLink('browse', "productID={$productID}&status=bySearch&param={queryID}");
  13. featureBar
  14. (
  15. set::current($status == 'bySearch' ? 'all' : $status),
  16. set::linkParams("productID={$productID}&status={key}&param={$param}&orderBy={$orderBy}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"),
  17. set::queryMenuLinkCallback(array(function ($key) use ($queryMenuLink) {
  18. return str_replace('{queryID}', (string)$key, $queryMenuLink);
  19. })),
  20. li(searchToggle(set::module('deploy'), set::open($status == 'bySearch')))
  21. );
  22. toolBar
  23. (
  24. common::hasPriv('deploy', 'create') ? item
  25. (
  26. set::type('primary'),
  27. set::url(createLink('deploy', 'create')),
  28. set::icon('plus'),
  29. set::text($this->lang->deploy->create)
  30. ) : null
  31. );
  32. $config->deploy->dtable->fieldList['product']['map'] = $products;
  33. $config->deploy->dtable->fieldList['system']['map'] = $systems;
  34. if(!common::hasPriv('deploy', 'steps') && common::hasPriv('deploy', 'view'))
  35. {
  36. $config->deploy->dtable->fieldList['name']['link'] = array('module' => 'deploy', 'method' => 'view', 'params' => 'deployID={id}');
  37. }
  38. $cols = $this->loadModel('datatable')->getSetting('deploy');
  39. $plans = initTableData($plans, $cols, $this->deploy);
  40. dtable
  41. (
  42. set::customCols(true),
  43. set::userMap($users),
  44. set::cols($cols),
  45. set::data($plans),
  46. set::sortLink(inLink('browse', "productID={$productID}&status={$status}&param={$param}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),
  47. set::orderBy($orderBy),
  48. set::actionItemCreator(jsRaw('window.renderActions')),
  49. set::footPager(usePager())
  50. );