From d7a4f2ed7fec3640aea68c5280548470d6c53108 Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Tue, 19 Aug 2014 09:37:10 +0200 Subject: Fill user page with avatar, display name and matrix id --- webclient/user/user-controller.js | 19 ++++++++++++++++--- webclient/user/user.html | 22 ++++++++++++++++++++-- 2 files changed, 36 insertions(+), 5 deletions(-) (limited to 'webclient/user') diff --git a/webclient/user/user-controller.js b/webclient/user/user-controller.js index 4b7aa62d42..620230561c 100644 --- a/webclient/user/user-controller.js +++ b/webclient/user/user-controller.js @@ -17,9 +17,22 @@ limitations under the License. 'use strict'; angular.module('UserController', ['matrixService']) -.controller('UserController', ['$scope', '$routeParams', - function($scope, $routeParams) { +.controller('UserController', ['$scope', '$routeParams', 'matrixService', + function($scope, $routeParams, matrixService) { $scope.user = { - id: $routeParams.user_matrix_id + id: $routeParams.user_matrix_id, + displayname: "", + avatar_url: undefined }; + + matrixService.getDisplayName($scope.user.id).then( + function(response) { + $scope.user.displayname = response.data.displayname; + } + ); + matrixService.getProfilePictureUrl($scope.user.id).then( + function(response) { + $scope.user.avatar_url = response.data.avatar_url; + } + ); }]); \ No newline at end of file diff --git a/webclient/user/user.html b/webclient/user/user.html index f548e05a71..47db09d1ee 100644 --- a/webclient/user/user.html +++ b/webclient/user/user.html @@ -3,8 +3,26 @@
-
{{ user.id }}
- +
+
+ + + + + +
+
+ +
+
+
+
{{ user.displayname }}
+
{{ user.id }}
+
+
+
+
+ {{ feedback }}
-- cgit 1.4.1