branch develop updated (24eddf0 -> ad46b96)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git discards 24eddf0 Merge branch 'feature/7927-user-projects-list' into develop discards 7bf16cd fixes-40 #7927 Add list of projects by users on user page new 878015d fixes #7927 Add list of projects by users on user page new ad46b96 Merge branch 'feature/7927-user-projects-list' into develop This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (24eddf0) \ N -- N -- N refs/heads/develop (ad46b96) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit ad46b966c2247e8d27b32de7a0186a208367e3f1 Merge: 194cc6b 878015d Author: Yannick Martel <martel@©odelutin.com> Date: Wed Jan 20 12:20:46 2016 +0100 Merge branch 'feature/7927-user-projects-list' into develop commit 878015df2116b5bf5fea3bb950d78a1d676f839d Author: Yannick Martel <martel@©odelutin.com> Date: Wed Jan 20 12:20:41 2016 +0100 fixes #7927 Add list of projects by users on user page Summary of changes: -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git commit 878015df2116b5bf5fea3bb950d78a1d676f839d Author: Yannick Martel <martel@©odelutin.com> Date: Wed Jan 20 12:20:41 2016 +0100 fixes #7927 Add list of projects by users on user page --- coselmar-ui/src/main/webapp/i18n/en.js | 9 +++ coselmar-ui/src/main/webapp/i18n/fr.js | 9 +++ .../src/main/webapp/js/coselmar-constants.js | 1 - .../src/main/webapp/js/coselmar-controllers.js | 16 ++++++ .../src/main/webapp/js/coselmar-user-services.js | 7 +++ coselmar-ui/src/main/webapp/views/users/user.html | 64 ++++++++++++++++++++++ 6 files changed, 105 insertions(+), 1 deletion(-) diff --git a/coselmar-ui/src/main/webapp/i18n/en.js b/coselmar-ui/src/main/webapp/i18n/en.js index d465081..b1a37b1 100644 --- a/coselmar-ui/src/main/webapp/i18n/en.js +++ b/coselmar-ui/src/main/webapp/i18n/en.js @@ -230,6 +230,8 @@ var translateEN = { </ul>", "user.create.client.info" : "Create new user with Client role", "user.password.title" : "Send a new password", +"user.info.title" : "User infos", +"user.projects.title" : "User projects", "user.metadata.name" : "Name", "user.metadata.firstName" : "First name", @@ -251,6 +253,12 @@ var translateEN = { "user.metadata.role.member" : "Member", "user.metadata.role.client" : "Client", +"user.metadata.projects" : "Projects list", +"user.metadata.projects.asSupervisor" : "Projects as supervisorr", +"user.metadata.projects.asParticipant" : "Projects as expert", +"user.metadata.projects.asContributor" : "Projects as contributor", +"user.metadata.projects.asClient" : "Projects as client", + "user.message.disable" : "Do you really want to disable this user ?", "user.message.delete" : "Do you really want to delete this user ?", "user.message.requiredFirsName" : "First name is required.", @@ -276,6 +284,7 @@ var translateEN = { "user.message.enable" : "User well enable.", "user.message.mail.alreadyExisting" : "The provided mail (or login) already exists.", "user.message.login.fail" : "Fail to login, please try again.", +"user.message.noProject" : "This user has no project", "user.button.add" : "Add an user", "user.button.add.client" : "Add a client", diff --git a/coselmar-ui/src/main/webapp/i18n/fr.js b/coselmar-ui/src/main/webapp/i18n/fr.js index e689c44..beb7166 100644 --- a/coselmar-ui/src/main/webapp/i18n/fr.js +++ b/coselmar-ui/src/main/webapp/i18n/fr.js @@ -220,6 +220,8 @@ var translateFR = { //Users part "user.list.title" : "Liste des utilisateurs", +"user.info.title" : "Données de l'utilisateur", +"user.projects.title" : "Projets de l'utilisateur", "user.create.title" : "Ajouter un utilisateur", "user.create.info" : "Créer un nouvel utilisateur, avec l'un des rôles suivants :\ <ul>\ @@ -251,6 +253,12 @@ var translateFR = { "user.metadata.role.member" : "Membre", "user.metadata.role.client" : "Client", +"user.metadata.projects" : "Liste des projets", +"user.metadata.projects.asSupervisor" : "Projets en tant que superviseur", +"user.metadata.projects.asParticipant" : "Projets en tant qu'expert", +"user.metadata.projects.asContributor" : "Projets en tant que contributeur", +"user.metadata.projects.asClient" : "Projets en tant que client", + "user.message.disable" : "Êtes vous sûr de vouloir désactiver cet utilisateur ?", "user.message.delete" : "Êtes vous sûr de vouloir supprimer cet utilisateur ", "user.message.requiredFirsName" : "Le prénom est obligatoire.", @@ -276,6 +284,7 @@ var translateFR = { "user.message.enable" : "Utilisateur réactivé.", "user.message.mail.alreadyExisting" : "Le courriel (ou identifiant) saisi est déjà attribué.", "user.message.login.fail" : "La connexion a échoué, veuillez réessayer.", +"user.message.noProject" : "Cet utilisateur n'a pas de projet", "user.button.add" : "Ajouter un utilisateur", "user.button.add.client" : "Ajouter un client", diff --git a/coselmar-ui/src/main/webapp/js/coselmar-constants.js b/coselmar-ui/src/main/webapp/js/coselmar-constants.js index b3894d6..a8386c2 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-constants.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-constants.js @@ -35,6 +35,5 @@ coselmarApp.config(function($sceDelegateProvider, coselmarConfig) { // Allow loading from our assets domain. Notice the difference between * and **. coselmarConfig.BASE_URL+'/**' ]); - console.log(coselmarConfig.BASE_URL+'/**'); }); \ No newline at end of file diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index 76b6688..778da6a 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -796,6 +796,22 @@ coselmarControllers.controller("UserViewCtrl", $scope.$emit('dataLoaded'); }); + userService.getUserProjects({userId : $routeParams.userId, role : 'SUPERVISOR'}, function(projects) { + $scope.supervisorProjects = projects; + }); + + userService.getUserProjects({userId : $routeParams.userId, role : 'PARTICIPANT'}, function(projects) { + $scope.participantProjects = projects; + }); + + userService.getUserProjects({userId : $routeParams.userId, role : 'CONTRIBUTOR'}, function(projects) { + $scope.contributorProjects = projects; + }); + + userService.getUserProjects({userId : $routeParams.userId, role : 'CLIENT'}, function(projects) { + $scope.clientProjects = projects; + }); + $scope.deleteUser = function(userId){ userService.deleteUser(userId, $scope, function() { diff --git a/coselmar-ui/src/main/webapp/js/coselmar-user-services.js b/coselmar-ui/src/main/webapp/js/coselmar-user-services.js index d200bde..8af4222 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-user-services.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-user-services.js @@ -111,4 +111,11 @@ function User(resource, config){ return exportURL; }; + this.getUserProjects = function(params, successFunction){ + + var userResource = resource(baseURL + '/:userId/projects', {userId: params.userId, userRole : params.role}); + + userResource.query(successFunction); + }; + }; \ No newline at end of file diff --git a/coselmar-ui/src/main/webapp/views/users/user.html b/coselmar-ui/src/main/webapp/views/users/user.html index b0e926c..07e7e8a 100644 --- a/coselmar-ui/src/main/webapp/views/users/user.html +++ b/coselmar-ui/src/main/webapp/views/users/user.html @@ -28,6 +28,9 @@ </h1> </div> <div ng-if="!editMode" > + <uib-tabset> + <uib-tab heading="{{'user.info.title' | translate}}"> + <table class="table table-striped"> <tr> <td>{{ 'user.metadata.mail' | translate }}</td> @@ -73,6 +76,67 @@ ng-confirm-click="deleteUser(user.id)" ng-if="context.currentUser.role == 'ADMIN'">Delete</a> </div> + + </uib-tab> + <uib-tab heading="{{ 'user.projects.title' | translate}}"> + + <dl ng-if="supervisorProjects && supervisorProjects.length > 0"> + <dt>{{'user.metadata.projects.asSupervisor' | translate}}</dt> + + <dd> + <ul> + <li ng-repeat="project in supervisorProjects"> + <a href="#/questions/{{project.id}}" target="_blank">{{project.title}}</a> + </li> + </ul> + </dd> + </dl> + + <dl ng-if="participantProjects && participantProjects.length > 0"> + <dt>{{'user.metadata.projects.asParticipant' | translate}}</dt> + + <dd> + <ul> + <li ng-repeat="project in participantProjects"> + <a href="#/questions/{{project.id}}" target="_blank">{{project.title}}</a> + </li> + </ul> + </dd> + </dl> + + <dl ng-if="contributorProjects && contributorProjects.length > 0"> + <dt>{{'user.metadata.projects.asContributor' | translate}}</dt> + + <dd> + <ul> + <li ng-repeat="project in contributorProjects"> + <a href="#/questions/{{project.id}}" target="_blank">{{project.title}}</a> + </li> + </ul> + </dd> + </dl> + + <dl ng-if="clientProjects && clientProjects.length > 0"> + <dt>{{'user.metadata.projects.asClient' | translate}}</dt> + + <dd> + <ul> + <li ng-repeat="project in clientProjects"> + <a href="#/questions/{{project.id}}" target="_blank">{{project.title}}</a> + </li> + </ul> + </dd> + </dl> + + <div ng-if="(!supervisorProjects || supervisorProjects.length == 0) + && (!participantProjects || participantProjects.length == 0) + && (!contributorProjects || contributorProjects.length == 0) + && (!clientProjects || clientProjects.length == 0)"> + {{'user.message.noProject' | translate }} + </div> + + </uib-tab> + </uib-tabset> </div> <div ng-if="editMode" style="padding: 30px 0px 50px 0px"> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git commit ad46b966c2247e8d27b32de7a0186a208367e3f1 Merge: 194cc6b 878015d Author: Yannick Martel <martel@©odelutin.com> Date: Wed Jan 20 12:20:46 2016 +0100 Merge branch 'feature/7927-user-projects-list' into develop .../coselmar/beans/QuestionSearchExample.java | 11 ++ .../persistence/entity/QuestionTopiaDao.java | 21 +++ .../ifremer/coselmar/beans/QuestionSearchBean.java | 38 +++++ .../ifremer/coselmar/beans/QuestionUserRole.java | 11 ++ .../coselmar/services/v1/QuestionsWebService.java | 72 +++++++++ coselmar-rest/src/main/resources/mapping | 1 + .../coselmar/services/QuestionsWebServiceTest.java | 161 +++++++++++++++++++++ coselmar-ui/src/main/webapp/i18n/en.js | 9 ++ coselmar-ui/src/main/webapp/i18n/fr.js | 9 ++ .../src/main/webapp/js/coselmar-constants.js | 1 - .../src/main/webapp/js/coselmar-controllers.js | 16 ++ .../src/main/webapp/js/coselmar-user-services.js | 7 + coselmar-ui/src/main/webapp/views/users/user.html | 64 ++++++++ 13 files changed, 420 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm