Display group name instead of id
This commit is contained in:
@@ -315,7 +315,11 @@
|
||||
<span class="text-muted" uib-tooltip="User is not activated yet">{{ user.alternateEmail || user.email }}</span>
|
||||
</td>
|
||||
<td class="text-left hand elide-table-cell hidden-xs hidden-sm" ng-click="useredit.show(user)">
|
||||
<span class="group-badge" ng-repeat="groupId in user.groupIds | ignoreAdminGroup">{{ groupId }}</span>
|
||||
<span class="group-badge" ng-repeat="groupId in user.groupIds | ignoreAdminGroup">
|
||||
{{ groupsById[groupId].name }}
|
||||
</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 Invite"><i class="fa fa-paper-plane-o"></i></button>
|
||||
|
||||
@@ -6,6 +6,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
$scope.ready = false;
|
||||
$scope.users = [];
|
||||
$scope.groups = [];
|
||||
$scope.groupsById = { };
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.userInfo = Client.getUserInfo();
|
||||
$scope.mailConfig = {};
|
||||
@@ -405,6 +406,10 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
if (error) return console.error('Unable to get group listing.', error);
|
||||
|
||||
$scope.groups = result;
|
||||
$scope.groupsById = { };
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
$scope.groupsById[result[i].id] = result[i];
|
||||
}
|
||||
|
||||
Client.getUsers(function (error, result) {
|
||||
if (error) return console.error('Unable to get user listing.', error);
|
||||
|
||||
Reference in New Issue
Block a user