* Add company-browse dtable orderby.

This commit is contained in:
songchenxuan
2023-10-18 13:59:11 +08:00
parent ac0f7ff7ac
commit ef92a3da12
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -2357,7 +2357,7 @@ EOF;
'message' => array('ajaxgetmessage'),
);
if(!empty($this->app->user->modifyPassword) and (!isset($beforeValidMethods[$module]) or !in_array($method, $beforeValidMethods[$module]))) return print(js::locate(helper::createLink('my', 'changepassword')));
if(!empty($this->app->user->modifyPassword) and (!isset($beforeValidMethods[$module]) or !in_array($method, $beforeValidMethods[$module]))) return helper::header('location', helper::createLink('my', 'changePassword'));
if(!$this->loadModel('user')->isLogon() and $this->server->php_auth_user) $this->user->identifyByPhpAuth();
if(!$this->loadModel('user')->isLogon() and $this->cookie->za) $this->user->identifyByCookie();
if($this->isOpenMethod($module, $method)) return true;
+1 -1
View File
@@ -46,7 +46,7 @@ class company extends control
* @access public
* @return void
*/
public function browse($browseType = 'inside', $param = 0, $type = 'bydept', $orderBy = 'id', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($browseType = 'inside', $param = 0, $type = 'bydept', $orderBy = 'id_asc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->lang->navGroup->company = 'admin';
+2
View File
@@ -69,6 +69,8 @@ $tableData = initTableData($users, $this->config->company->user->dtable->fieldLi
dtable
(
setID('userList'),
set::orderBy($orderBy),
set::sortLink(createLink('company', 'browse', "browseType={$browseType}&param={$param}&type={$type}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),
set::cols($this->config->company->user->dtable->fieldList),
set::data($tableData),
set::checkable(common::hasPriv('user', 'batchEdit')),