diff --git a/README.md b/README.md index 9eba89a874f012c02b7173fce28a796c52b38b59..d60331bf3904476820289de8e90622403eb884a7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ The API documentation is available at `<BASE URL>/swagger-ui.html`. A JSON versi ## TODO * Fix bugs; -* Add author's view if needed; * Implement delete methods if needed; * Externalize configuration (DB parameters, security enabled/disabled, ...); * Implement SoapUI tests; @@ -23,7 +22,6 @@ The API documentation is available at `<BASE URL>/swagger-ui.html`. A JSON versi ## BUGS -* In the profile view, we shouldn't see the '+' between firstname and lastname; * Export PDF; ### Maintenance diff --git a/src/main/resources/static/frontend/app/scripts/app/profile/profile.controller.js b/src/main/resources/static/frontend/app/scripts/app/profile/profile.controller.js index b4b5011c004666dd271f277ca945bfa920b10f4a..db3d879f04b066dae5d6d93d9386bea10e20183c 100644 --- a/src/main/resources/static/frontend/app/scripts/app/profile/profile.controller.js +++ b/src/main/resources/static/frontend/app/scripts/app/profile/profile.controller.js @@ -1,9 +1,9 @@ -/** - * Created by Michael DESIGAUD on 09/09/2015. - */ -angular.module('chuvApp.profile').controller('ProfileController', ['$scope', '$translatePartialLoader', '$translate', '$stateParams','User', - function ($scope, $translatePartialLoader, $translate, $stateParams, User) { - - $scope.user = User.current(); - -}]); +/** + * Created by Michael DESIGAUD on 09/09/2015. + */ +angular.module('chuvApp.profile').controller('ProfileController', ['$scope', '$translatePartialLoader', '$translate', '$stateParams','User','$http', + function ($scope, $translatePartialLoader, $translate, $stateParams, User, $http) { + + $http.get("/users/"+User.current().username).success(function(data) {$scope.user = data;}); + +}]); diff --git a/src/main/resources/static/frontend/app/scripts/app/users/users.controller.js b/src/main/resources/static/frontend/app/scripts/app/users/users.controller.js index de1c4fb76f3e0e88fdc8d509ceec51e7cc78a716..5fdc12e0062187b6346ee81e2e8b7e570aeb5bb7 100644 --- a/src/main/resources/static/frontend/app/scripts/app/users/users.controller.js +++ b/src/main/resources/static/frontend/app/scripts/app/users/users.controller.js @@ -1,9 +1,9 @@ -/** - * Created by Michael DESIGAUD on 09/09/2015. - */ -angular.module('chuvApp.users').controller('UserController', ['$scope', '$translatePartialLoader', '$translate', '$stateParams','User', - function ($scope, $translatePartialLoader, $translate, $stateParams, User) { - - $scope.user = User.get($stateParams.login); - -}]); +/** + * Created by Michael DESIGAUD on 09/09/2015. + */ +angular.module('chuvApp.users').controller('UserController', ['$scope', '$translatePartialLoader', '$translate', '$stateParams','User','$http', + function ($scope, $translatePartialLoader, $translate, $stateParams, User, $http) { + + $http.get("/users/"+$stateParams.username).success(function(data) {$scope.user = data;}); + +}]); diff --git a/src/main/resources/static/frontend/app/scripts/app/users/users.module.js b/src/main/resources/static/frontend/app/scripts/app/users/users.module.js index 75439ff934bb3c387aa62ef5afdfbca77b6d0516..bdf4ff0033846d1024187273836e02ba5fcc152d 100644 --- a/src/main/resources/static/frontend/app/scripts/app/users/users.module.js +++ b/src/main/resources/static/frontend/app/scripts/app/users/users.module.js @@ -1,20 +1,20 @@ -/** - * Created by Florent PERINEL on 14/08/2015. - */ -'use strict'; - -angular.module('chuvApp.users', - - // Module requirements - ['ngResource', 'pascalprecht.translate', 'ui.router']) - - // Module configuration - .config(['$stateProvider', function ($stateProvider) { - $stateProvider - .state('user-show', { - url: '/users/:login', - templateUrl: 'scripts/app/profile/profile.html', - controller: 'UserController' - }) - }]); - +/** + * Created by Florent PERINEL on 14/08/2015. + */ +'use strict'; + +angular.module('chuvApp.users', + + // Module requirements + ['ngResource', 'pascalprecht.translate', 'ui.router']) + + // Module configuration + .config(['$stateProvider', function ($stateProvider) { + $stateProvider + .state('user-show', { + url: '/users/:username', + templateUrl: 'scripts/app/profile/profile.html', + controller: 'UserController' + }) + }]); +