browse.html.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * The browse view file of group 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 Shujie Tian<tianshujie@easycorp.ltd>
  7. * @package group
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. /* zin: Define the set::module('group') feature bar on main menu. */
  12. featureBar(set::current('all'));
  13. /* zin: Define the toolbar on main menu. */
  14. $canManagePriv = hasPriv('group', 'managePriv');
  15. $canCreateGroup = hasPriv('group', 'create');
  16. if($canManagePriv) $managePrivItem = array('class' => 'btn ghost', 'text' => $lang->group->managePrivByModule, 'url' => inLink('managePriv', 'type=byModule'), 'data-toggle' => 'modal');
  17. if($canCreateGroup) $createItem = array('icon' => 'plus', 'class' => 'primary group-create-btn', 'text' => $lang->group->create, 'url' => inLink('create', '', '', true), 'data-toggle' => 'modal');
  18. toolbar
  19. (
  20. $canManagePriv ? item(set($managePrivItem)) : null,
  21. $canCreateGroup ? item(set($createItem)) : null
  22. );
  23. jsVar('confirmDelete', $lang->group->confirmDelete);
  24. $tableData = initTableData($groups, $config->group->dtable->fieldList, $this->group);
  25. dtable
  26. (
  27. set::cols(array_values($config->group->dtable->fieldList)),
  28. set::data($tableData)
  29. );
  30. /* ====== Render page ====== */
  31. render();