summaryrefslogtreecommitdiffstats
path: root/settings/templates/users
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-02-20 11:35:31 +0100
committerArthur Schiwon <blizzz@owncloud.com>2014-06-02 12:53:52 +0200
commitf7903e92beda140cdc07927620bf2e13c8d9c741 (patch)
tree3303b3ea1663c00de658d97a55b6f9192c1b9359 /settings/templates/users
parent86d3cf53d1a7b894a91f1191b461ec4dcbb749e8 (diff)
downloadnextcloud-server-f7903e92beda140cdc07927620bf2e13c8d9c741.tar.gz
nextcloud-server-f7903e92beda140cdc07927620bf2e13c8d9c741.zip
do not forget to pass parameters to subtemplate
Diffstat (limited to 'settings/templates/users')
-rw-r--r--settings/templates/users/main.php10
-rw-r--r--settings/templates/users/part.userlist.php2
2 files changed, 7 insertions, 5 deletions
diff --git a/settings/templates/users/main.php b/settings/templates/users/main.php
index 99c6848d2ec..23148def2df 100644
--- a/settings/templates/users/main.php
+++ b/settings/templates/users/main.php
@@ -4,14 +4,16 @@
* 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'];
}
-$_['subadmingroups'] = $allGroups;
-$items = array_flip($_['subadmingroups']);
+$userlistParams['subadmingroups'] = $allGroups;
+$userlistParams['allGroups'] = json_encode($allGroups);
+$items = array_flip($userlistParams['subadmingroups']);
unset($items['admin']);
-$_['subadmingroups'] = array_flip($items);
+$userlistParams['subadmingroups'] = array_flip($items);
?>
<script type="text/javascript" src="<?php print_unescaped(OC_Helper::linkToRoute('isadmin'));?>"></script>
@@ -25,5 +27,5 @@ $_['subadmingroups'] = array_flip($items);
<div id="app-content">
<?php print_unescaped($this->inc('users/part.createuser')); ?>
- <?php print_unescaped($this->inc('users/part.userlist')); ?>
+ <?php print_unescaped($this->inc('users/part.userlist', $userlistParams)); ?>
</div> \ No newline at end of file
diff --git a/settings/templates/users/part.userlist.php b/settings/templates/users/part.userlist.php
index 9df069364d4..989d5f362c4 100644
--- a/settings/templates/users/part.userlist.php
+++ b/settings/templates/users/part.userlist.php
@@ -1,4 +1,4 @@
-<table class="hascontrols grid" data-groups="<?php p(json_encode($allGroups));?>">
+<table class="hascontrols grid" data-groups="<?php p($_['allGroups']);?>">
<thead>
<tr>
<?php if ($_['enableAvatars']): ?>