server/settings/templates/users/main.php
ringmaster 097887a659 Add the admin group to the group list data.
Fixes the admin group disappearing from the list when updating the display as the result of a search.

This group data should probably be managed on the page entirely by the javascript GroupList object, but this seems like the interim method.
2014-06-02 12:53:58 +02:00

32 lines
No EOL
989 B
PHP

<?php
/**
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
$userlistParams = array();
$allGroups=array();
foreach($_["groups"] as $group) {
$allGroups[] = $group['name'];
}
foreach($_["adminGroup"] as $group) {
$allGroups[] = $group['name'];
}
$userlistParams['subadmingroups'] = $allGroups;
$userlistParams['allGroups'] = json_encode($allGroups);
$items = array_flip($userlistParams['subadmingroups']);
unset($items['admin']);
$userlistParams['subadmingroups'] = array_flip($items);
?>
<div id="app-navigation">
<?php print_unescaped($this->inc('users/part.grouplist')); ?>
<div id="app-settings">
<?php print_unescaped($this->inc('users/part.setquota')); ?>
</div>
</div>
<div id="app-content">
<?php print_unescaped($this->inc('users/part.createuser')); ?>
<?php print_unescaped($this->inc('users/part.userlist', $userlistParams)); ?>
</div>