Files
EasySoft-ZenTaoPMS/module/account/ui/browse.html.php
T
2023-09-19 15:28:45 +08:00

47 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
/**
* The browse view file of account module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Ke Zhao<zhaoke@easycorp.ltd>
* @package account
* @link http://www.zentao.net
*/
namespace zin;
$queryMenuLink = createLink('account', 'browse', "browseType=bySearch&param={queryID}");
featureBar
(
set::queryMenuLinkCallback(fn($key) => str_replace('{queryID}', (string)$key, $queryMenuLink)),
li(searchToggle())
);
/* zin: Define the toolbar on main menu. */
$canCreate = hasPriv('account', 'create');
$createLink = $this->createLink('account', 'create');
$createItem = array('text' => $lang->account->create, 'url' => $createLink, 'class' => 'primary', 'icon' => 'plus', 'data-toggle' => 'modal', 'data-size' => 'sm');
$tableData = initTableData($accountList, $config->account->dtable->fieldList, $this->account);
toolbar
(
$canCreate ? item(set($createItem)) : null,
);
jsVar('orderBy', $orderBy);
jsVar('sortLink', helper::createLink('account', 'browse', "browseType=$browseType&param=$param&orderBy={orderBy}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"));
dtable
(
set::userMap($users),
set::cols(array_values($config->account->dtable->fieldList)),
set::data($tableData),
set::sortLink(jsRaw('createSortLink')),
set::footPager(usePager()),
);
render();