* Admin - fix group list filter & sort

- Remove created & modified columns since they're not stored for groups
- Fix email sort
- Fix search returned all results
This commit is contained in:
nathangray 2018-01-30 11:27:42 -07:00
parent b1275c4d1e
commit cf2b759054
3 changed files with 6 additions and 13 deletions

View File

@ -355,6 +355,7 @@ class admin_ui
{ {
$groups = $GLOBALS['egw']->accounts->search(array( $groups = $GLOBALS['egw']->accounts->search(array(
'type' => 'groups', 'type' => 'groups',
'query' => $query['search'],
'order' => $query['order'], 'order' => $query['order'],
'sort' => $query['sort'], 'sort' => $query['sort'],
'start' => (int)$query['start'], 'start' => (int)$query['start'],

View File

@ -53,7 +53,6 @@
<column width="15%"/> <column width="15%"/>
<column width="25%"/> <column width="25%"/>
<column width="25%"/> <column width="25%"/>
<column width="120"/>
</columns> </columns>
<rows> <rows>
<row> <row>
@ -61,13 +60,9 @@
<nextmatch-sortheader label="Group name" id="account_lid"/> <nextmatch-sortheader label="Group name" id="account_lid"/>
<nextmatch-sortheader label="Description" id="account_description"/> <nextmatch-sortheader label="Description" id="account_description"/>
</vbox> </vbox>
<nextmatch-sortheader label="EMail" id="account_email"/> <nextmatch-sortheader label="EMail" id="email"/>
<nextmatch-sortheader label="Members" id="account_members"/> <nextmatch-header label="Members" id="account_members"/>
<nextmatch-sortheader label="Applications" id="apps"/> <nextmatch-header label="Applications" id="apps"/>
<vbox>
<nextmatch-sortheader label="Created" id="account_created"/>
<nextmatch-sortheader label="Modified" id="account_modified"/>
</vbox>
</row> </row>
<row class="$row_cont[status_class]"> <row class="$row_cont[status_class]">
<vbox> <vbox>
@ -77,10 +72,6 @@
<url-email id="${row}[account_email]" readonly="true" no_lang="1" class="adminOverflowEllipsis"/> <url-email id="${row}[account_email]" readonly="true" no_lang="1" class="adminOverflowEllipsis"/>
<select-account id="${row}[members]" no_lang="1" readonly="true"/> <select-account id="${row}[members]" no_lang="1" readonly="true"/>
<select-app id="${row}[apps]" tags="true" readonly="true"/> <select-app id="${row}[apps]" tags="true" readonly="true"/>
<vbox>
<date id="${row}[account_created]" readonly="true"/>
<date id="${row}[account_modified]" readonly="true"/>
</vbox>
</row> </row>
</rows> </rows>
</grid> </grid>

View File

@ -412,7 +412,8 @@ class Sql
Api\Accounts::format_username('account_lid','account_firstname','account_lastname'))), $param['order']); Api\Accounts::format_username('account_lid','account_firstname','account_lastname'))), $param['order']);
} }
$order = str_replace(array_keys($order2contact),array_values($order2contact),$param['order']); $order = str_replace(array_keys($order2contact),array_values($order2contact),$param['order']);
// allways add 'account_lid', as it is only valid one for groups
// allways add 'account_lid'
if (strpos($order, 'account_lid') === false) if (strpos($order, 'account_lid') === false)
{ {
$order .= ($order?',':'').'account_lid'; $order .= ($order?',':'').'account_lid';