Fixes to user search
This commit is contained in:
parent
57987c9ae7
commit
f80522c6a5
2 changed files with 8 additions and 5 deletions
|
@ -119,10 +119,13 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
|
|||
module.controller('UserListCtrl', function($scope, realm, User) {
|
||||
$scope.realm = realm;
|
||||
$scope.searchQuery = function() {
|
||||
$scope.currentSearch = $scope.search;
|
||||
$scope.searchLoaded = false;
|
||||
if ($scope.search) {
|
||||
$scope.users = User.query({ realm: realm.id, search : $scope.search }, function() {
|
||||
$scope.searchLoaded = true;
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr data-ng-show="users.length > 0">
|
||||
<tr data-ng-show="searchLoaded && users.length > 0">
|
||||
<th>Username</th>
|
||||
<th>Last Name</th>
|
||||
<th>First Name</th>
|
||||
|
@ -66,7 +66,7 @@
|
|||
<div class="feedback warning inline" data-ng-show="searchLoaded && users.length == 0">
|
||||
<p><strong>Your search returned no results.</strong><br>Try modifying the query and try again.</p>
|
||||
</div>
|
||||
<div class="feedback info inline" data-ng-show="!search">
|
||||
<div class="feedback info inline" data-ng-show="!currentSearch">
|
||||
<br/>
|
||||
<p><strong>Search for users.</strong><br>Please enter a search to display users.</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue