Skip to content

Commit

Permalink
photos instead of picture to refer to user picture
Browse files Browse the repository at this point in the history
This fixes the display of user pictures in the users view.
  • Loading branch information
andreaceccanti committed Dec 21, 2016
1 parent b71e4ed commit eea57a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ function UsersController($scope, $rootScope, $uibModal, $state, $filter, $q, fil
angular.forEach(response.data.Resources, function(user){
users.list.push(user);
});
}
};

var handleError = function(error) {
users.loadingModal.dismiss("Error");
$scope.operationResult = Utils.buildErrorOperationResult(error);
}
};

var handleFirstResponse = function(response){
var totalResults = response.data.totalResults;
Expand All @@ -114,7 +114,7 @@ function UsersController($scope, $rootScope, $uibModal, $state, $filter, $q, fil
users.rebuildFilteredList();
users.loadingModal.dismiss("Cancel");
}, handleError);
}
};

$rootScope.pageLoadingProgress = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,19 @@ <h1>
<tr
ng-repeat="user in users.filtered | startFrom:(users.currentPage-1)*users.entryLimit | limitTo:users.entryLimit">
<td class="uuid" id="{{user.id}}">{{$index + (users.currentPage-1)*users.entryLimit + 1}}</td>
<td><img class="img-circle" width="22"
ng-src="{{user.picture}}" alt="User profile picture"
ng-show="user.picture"> <img class="img-circle"
width="22" ng-src="resources/iam/img/default-avatar.png"
alt="User profile picture" ng-show="!user.picture"></td>
<td>
<img
class="img-circle" width="22"
ng-src="{{user.photos[0].value}}"
alt="User profile picture"
ng-if="user.photos[0].value">

<img class="img-circle"
width="22"
ng-src="resources/iam/img/default-avatar.png"
alt="User profile picture"
ng-if="!user.photos">
</td>
<td><a ui-sref="user({id: user.id})">{{user.name.formatted}}</a></td>
<td class="hidden-xs text-center"><i
class="fa fa-circle text-success" ng-show="user.active"></i> <i
Expand Down

0 comments on commit eea57a6

Please sign in to comment.