browse.html.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * The browse view file of compile module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Ke Zhao<zhaoke@easycorp.ltd>
  8. * @package compile
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. if(!empty($repoID)) dropmenu(set::objectID($repoID), set::tab('repo'));
  13. /* zin: Define the set::module('compile') feature bar on main menu. */
  14. $queryMenuLink = createLink('compile', 'browse', "repoID={$repoID}&jobID={$jobID}&browseType=bySearch&param={queryID}");
  15. featureBar
  16. (
  17. set::current('compile'),
  18. set::link(createLink('{key}', 'browse', "repoID=$repoID")),
  19. set::itemLink(array('compile' => createLink('compile', 'browse', "repoID=$repoID&jobID=$jobID"))),
  20. set::queryMenuLinkCallback(array(function ($key) use ($queryMenuLink) {
  21. return str_replace('{queryID}', (string)$key, $queryMenuLink);
  22. })),
  23. li(searchToggle(set::module('compile'), set::open($browseType == 'bySearch')))
  24. );
  25. /* zin: Define the toolbar on main menu. */
  26. toolbar();
  27. $tableData = initTableData($buildList, $config->compile->dtable->fieldList, $this->compile);
  28. dtable
  29. (
  30. set::cols($config->compile->dtable->fieldList),
  31. set::data($tableData),
  32. set::sortLink(createLink('compile', 'browse', "repoID=$repoID&jobID={$jobID}&browseType={$browseType}&param={$param}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),
  33. set::orderBy($orderBy),
  34. set::onRenderCell(jsRaw('window.renderCell')),
  35. set::footPager(usePager())
  36. );
  37. if($repoID || $jobID) h::js("$.getJSON($.createLink('compile', 'ajaxSyncCompile', 'repoID={$repoID}&jobID={$jobID}'));");