Show group members

This commit is contained in:
Girish Ramakrishnan
2018-07-26 23:58:25 -07:00
parent fb85770fd3
commit a9e46c64b1
2 changed files with 8 additions and 1 deletions

View File

@@ -323,7 +323,6 @@
</span>
</td>
</td>
<td class="text-right no-wrap" style="vertical-align: bottom">
<button ng-show="!isMe(user)" class="btn btn-xs btn-default" ng-click="sendInvite(user)" title="Send invitation email"><i class="fa fa-paper-plane-o"></i></button>
<button class="btn btn-xs btn-default" ng-click="useredit.show(user)" title="Edit User"><i class="fa fa-pencil"></i></button>
@@ -359,6 +358,7 @@
<thead>
<tr>
<th>Name</th>
<th>Users</th>
<th style="width: 300px" class="text-right">Actions</th>
</tr>
</thead>
@@ -367,6 +367,9 @@
<td class="hand elide-table-cell" style="text-overflow: ellipsis; white-space: nowrap;" ng-click="groupEdit.show(group)">
{{ group.name }}
</td>
<td class="hand elide-table-cell" style="text-overflow: ellipsis; white-space: nowrap;" ng-click="groupEdit.show(group)">
{{ groupMembers(group) }}
</td>
<td class="text-right" style="vertical-align: bottom">
<button class="btn btn-xs btn-default" ng-click="groupEdit.show(group)" title="Edit Group"><i class="fa fa-pencil"></i></button>
<button class="btn btn-xs btn-danger" ng-click="groupRemove.show(group)" title="Remove Group"><i class="fa fa-trash-o"></i></button>

View File

@@ -14,6 +14,10 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.config = Client.getConfig();
$scope.userInfo = Client.getUserInfo();
$scope.groupMembers = function (group) {
return group.userIds.map(function (uid) { return $scope.usersById[uid].username || $scope.usersById[uid].email; }).join(', ');
};
$scope.userremove = {
busy: false,
error: {},