diff --git a/module/group/config.php b/module/group/config.php
index dda03629bd..d69da3691a 100644
--- a/module/group/config.php
+++ b/module/group/config.php
@@ -1,5 +1,6 @@
group = new stdclass();
+$config->group->showUsers = 20;
$config->group->create = new stdclass();
$config->group->edit = new stdclass();
$config->group->create->requiredFields = 'name';
diff --git a/module/group/control.php b/module/group/control.php
index 27bf7acb8e..84c500bbbb 100644
--- a/module/group/control.php
+++ b/module/group/control.php
@@ -39,10 +39,13 @@ class group extends control
$position[] = $this->lang->group->browse;
$groups = $this->group->getList($companyID);
+ $groupUsers = array();
+ foreach($groups as $group) $groupUsers[$group->id] = $this->group->getUserPairs($group->id);
- $this->view->title = $title;
- $this->view->position = $position;
- $this->view->groups = $groups;
+ $this->view->title = $title;
+ $this->view->position = $position;
+ $this->view->groups = $groups;
+ $this->view->groupUsers = $groupUsers;
$this->display();
}
diff --git a/module/group/view/browse.html.php b/module/group/view/browse.html.php
index 01f0be8e74..ec78ac53d1 100644
--- a/module/group/view/browse.html.php
+++ b/module/group/view/browse.html.php
@@ -22,6 +22,7 @@
group->id;?> |
group->name;?> |
group->desc;?> |
+ group->users;?> |
actions;?> |
@@ -29,8 +30,14 @@
| id;?> |
- name;?> |
+ name;?> |
desc;?> |
+
+ id] = array_slice($groupUsers[$group->id], 0, $this->config->group->showUsers);
+ foreach($groupUsers[$group->id] as $user) echo $user . ' ';
+ ?>
+ |
group->managepriv = $lang->group->managePrivByGroup;?>
id", '', 'list');?>
diff --git a/module/user/control.php b/module/user/control.php
index a757fa0ce2..987e4d40d1 100644
--- a/module/user/control.php
+++ b/module/user/control.php
@@ -421,12 +421,16 @@ class user extends control
if(dao::isError()) die(js::error(dao::getError()));
die(js::locate($this->createLink('company', 'browse'), 'parent'));
}
+ $groups = $this->loadModel('group')->getList($this->app->company->id);
+ $groupUsers = array();
+ foreach($groups as $group) $groupUsers[$group->id] = $this->group->getUserPairs($group->id);
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->user->editGroup;
$this->view->position[] = $this->lang->user->editGroup;
$this->view->account = $account;
- $this->view->userGroups = $this->loadModel('group')->getByAccount($account);
- $this->view->groups = $this->loadModel('group')->getList($this->app->company->id);
+ $this->view->userGroups = $this->group->getByAccount($account);
+ $this->view->groups = $groups;
+ $this->view->groupUsers = $groupUsers;
$this->display();
}
diff --git a/module/user/view/editgroup.html.php b/module/user/view/editgroup.html.php
index f11450c2ed..39696a336a 100644
--- a/module/user/view/editgroup.html.php
+++ b/module/user/view/editgroup.html.php
@@ -23,15 +23,22 @@
| group->id;?> |
group->name;?> |
group->desc;?> |
+ group->users;?> |
| id => $group->id), isset($userGroups[$group->id]) ? $group->id : '', "class='ml-10px'");?> |
- name;?> |
- desc;?> |
-
+ name;?> |
+ desc;?> |
+
+ id] = array_slice($groupUsers[$group->id], 0, $this->config->group->showUsers);
+ foreach($groupUsers[$group->id] as $user) echo $user . ' ';
+ ?>
+ |
+