browse.html.php 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * The browse view file of approval flow 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 Guangming Sun <sunguangming@easycorp.ltd>
  7. * @package approvalflow
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. include $app->getModuleRoot() . 'custom/ui/sidebar.html.php';
  12. featureBar();
  13. $canCreate = common::hasPriv('approvalflow', 'create') && in_array($config->edition, array('max', 'ipd'));
  14. $createItem = array('text' => $lang->approvalflow->create, 'url' => createLink('approvalflow', 'create'));
  15. toolbar($canCreate ? item(set($createItem + array('class' => 'btn primary', 'icon' => 'plus', 'data-toggle' => 'modal'))) : null);
  16. foreach($flows as $flow) $flow->workflow = zget($workflows, $flow->workflow, '');
  17. $cols = $config->approvalflow->dtable->browse->fieldList;
  18. $data = initTableData($flows, $cols, $this->approvalflow);
  19. dtable
  20. (
  21. set::cols($cols),
  22. set::data($data),
  23. set::userMap($users),
  24. set::checkable(false),
  25. set::footPager(usePager())
  26. );