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 31ffb9b96ff5cd48c15c7c77f93b5cdeb3bee76b Author: Yannick Martel <martel@©odelutin.com> Date: Mon Feb 2 16:03:06 2015 +0100 fixes #6577 Display "no result" instead of nothing in search results --- coselmar-ui/src/main/webapp/i18n/en.js | 3 +++ coselmar-ui/src/main/webapp/i18n/fr.js | 3 +++ coselmar-ui/src/main/webapp/js/coselmar-controllers.js | 2 +- coselmar-ui/src/main/webapp/views/documents/documents.html | 1 + .../src/main/webapp/views/documents/modalDocumentSearch.html | 1 + .../src/main/webapp/views/questions/modalQuestionSearch.html | 1 + coselmar-ui/src/main/webapp/views/questions/questions.html | 1 + coselmar-ui/src/main/webapp/views/referential/referential.html | 9 +++++++++ coselmar-ui/src/main/webapp/views/users/users.html | 1 + 9 files changed, 21 insertions(+), 1 deletion(-) diff --git a/coselmar-ui/src/main/webapp/i18n/en.js b/coselmar-ui/src/main/webapp/i18n/en.js index 449e58a..457b4cd 100644 --- a/coselmar-ui/src/main/webapp/i18n/en.js +++ b/coselmar-ui/src/main/webapp/i18n/en.js @@ -233,6 +233,8 @@ var translateEN = { "referential.search.multipleDocumentsFound" : "documents found.", "referential.search.singleQuestionFound" : "project found.", "referential.search.multipleQuestionsFound" : "projects found.", +"referential.search.noDocumentFound" : "No document found.", +"referential.search.noQuestionFound" : "No project found.", //Admin part @@ -261,6 +263,7 @@ var translateEN = { "common.message.notYetAvailable" : "Not yet available.", "common.message.mandatoryFieldsInfo" : "Field with <strong><big>*</big></strong> are mandatory.", "common.message.internalError" : "Error during process. If this problem persist, please contact application admin", +"common.search.noResult" : "No result.", "OPEN" : "Opened", "IN_PROGRESS" : "In progress", diff --git a/coselmar-ui/src/main/webapp/i18n/fr.js b/coselmar-ui/src/main/webapp/i18n/fr.js index b09568b..170d3da 100644 --- a/coselmar-ui/src/main/webapp/i18n/fr.js +++ b/coselmar-ui/src/main/webapp/i18n/fr.js @@ -233,6 +233,8 @@ var translateFR = { "referential.search.multipleDocumentsFound" : "documents trouvés.", "referential.search.singleQuestionFound" : "projet trouvé.", "referential.search.multipleQuestionsFound" : "projets trouvés.", +"referential.search.noDocumentFound" : "Aucun document trouvés.", +"referential.search.noQuestionFound" : "Aucun projet trouvés.", //Admin part @@ -261,6 +263,7 @@ var translateFR = { "common.message.notYetAvailable" : "Pas encore disponible.", "common.message.mandatoryFieldsInfo" : "Les champs avec un <strong><big>*</big></strong> sont obligatoires.", "common.message.internalError" : "Erreur durant le traitement. Si le problème persiste, veuillez contacter l'administrateur de l'application.", +"common.search.noResult" : "Aucun résultat.", "OPEN" : "Ouverte", "IN_PROGRESS" : "En cours", diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index a25407e..86e2cf7 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -1094,7 +1094,7 @@ coselmarControllers.controller('ModalCreateDocumentsCtrl', function ($scope, $mo coselmarControllers.controller("ReferentialCtrl", ['$scope', '$routeParams', '$location', 'questionsService', 'documentService', function($scope, $routeParams, $location, questionsService, documentService){ - $scope.result = { questions : [], documents : []}; + $scope.result = { questions : undefined, documents : undefined}; var remoteSearchInReferential = function() { if ($scope.search.onQuestions && $scope.search.keywords.length > 0) { diff --git a/coselmar-ui/src/main/webapp/views/documents/documents.html b/coselmar-ui/src/main/webapp/views/documents/documents.html index 9a59b4d..b36686b 100644 --- a/coselmar-ui/src/main/webapp/views/documents/documents.html +++ b/coselmar-ui/src/main/webapp/views/documents/documents.html @@ -73,5 +73,6 @@ </tr> </tbody> </table> + <p ng-if="documents && documents.length == 0" translate="common.search.noResult" class="info"/> </div> </div> \ No newline at end of file diff --git a/coselmar-ui/src/main/webapp/views/documents/modalDocumentSearch.html b/coselmar-ui/src/main/webapp/views/documents/modalDocumentSearch.html index 9730d1d..1620e5c 100644 --- a/coselmar-ui/src/main/webapp/views/documents/modalDocumentSearch.html +++ b/coselmar-ui/src/main/webapp/views/documents/modalDocumentSearch.html @@ -63,6 +63,7 @@ <a class="btn fa fa-plus" title="Add Document" ng-click="select(document)"/></td> </tr> </table> + <p ng-if="documents && documents.length == 0" translate="common.search.noResult" class="info"/> </div> <div class="modal-footer"> <button class="btn btn-warning" ng-click="cancel()">{{ 'common.button.cancel' | translate }}</button> diff --git a/coselmar-ui/src/main/webapp/views/questions/modalQuestionSearch.html b/coselmar-ui/src/main/webapp/views/questions/modalQuestionSearch.html index a67d6eb..0f98263 100644 --- a/coselmar-ui/src/main/webapp/views/questions/modalQuestionSearch.html +++ b/coselmar-ui/src/main/webapp/views/questions/modalQuestionSearch.html @@ -64,6 +64,7 @@ ng-click="select(question)" ng-if="currentQuestionId != question.id"/></td> </tr> </table> + <p ng-if="questions && questions.length == 0" translate="common.search.noResult" class="info"/> </div> <div class="modal-footer"> <button class="btn btn-warning" ng-click="cancel()">{{ 'common.button.cancel' | translate }}</button> diff --git a/coselmar-ui/src/main/webapp/views/questions/questions.html b/coselmar-ui/src/main/webapp/views/questions/questions.html index fccdd68..478a0e5 100644 --- a/coselmar-ui/src/main/webapp/views/questions/questions.html +++ b/coselmar-ui/src/main/webapp/views/questions/questions.html @@ -106,5 +106,6 @@ </tr> </tbody> </table> + <p ng-if="questions && questions.length == 0" translate="common.search.noResult" class="info"/> </div> </div> \ No newline at end of file diff --git a/coselmar-ui/src/main/webapp/views/referential/referential.html b/coselmar-ui/src/main/webapp/views/referential/referential.html index 00b1554..cf0d79c 100644 --- a/coselmar-ui/src/main/webapp/views/referential/referential.html +++ b/coselmar-ui/src/main/webapp/views/referential/referential.html @@ -63,6 +63,11 @@ <hr/> <!-- Documents Table --> + <div class="" ng-if="result.documents && result.documents.length == 0"> + + <p translate="referential.search.noDocumentFound" class="info" /> + </div> + <div class="" ng-if="result.documents && result.documents.length > 0"> <p ng-if="result.documents.length > 1">{{result.documents.length}} {{ 'referential.search.multipleDocumentsFound' | translate }}</p> @@ -95,6 +100,10 @@ <!-- Questions Table --> + <div class="" ng-if="result.questions && result.questions.length == 0"> + + <p translate="referential.search.noQuestionFound" class="info" /> + </div> <div class="" ng-if="result.questions && result.questions.length > 0"> <p ng-if="result.questions.length > 1">{{result.questions.length}} {{ 'referential.search.multipleQuestionsFound' | translate }}</p> diff --git a/coselmar-ui/src/main/webapp/views/users/users.html b/coselmar-ui/src/main/webapp/views/users/users.html index 84baf0b..71babd0 100644 --- a/coselmar-ui/src/main/webapp/views/users/users.html +++ b/coselmar-ui/src/main/webapp/views/users/users.html @@ -31,5 +31,6 @@ <div ng-include="src='views/users/adminUsers.html'" ng-if="currentUser.role == 'ADMIN'"></div> <div ng-include="src='views/users/supervisorUsers.html'" ng-if="currentUser.role == 'SUPERVISOR'"></div> + <p ng-if="users && users.length == 0" translate="common.search.noResult" class="info"/> </div> \ No newline at end of file -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.