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 d8448436787384f0c3cd4626ce52bbb889e5f284 Author: Yannick Martel <martel@©odelutin.com> Date: Tue Jan 27 14:51:32 2015 +0100 manage new predefined document type --- coselmar-ui/src/main/webapp/i18n/en.js | 1 + coselmar-ui/src/main/webapp/i18n/fr.js | 1 + .../src/main/webapp/js/coselmar-controllers.js | 4 ++-- .../src/main/webapp/views/documents/editDocument.html | 19 +++++++++++++------ .../webapp/views/documents/modalDocumentEdit.html | 16 ++++++++++++++-- .../src/main/webapp/views/documents/newdocument.html | 2 +- .../src/main/webapp/views/documents/viewDocument.html | 16 ++++++++++++++-- 7 files changed, 46 insertions(+), 13 deletions(-) diff --git a/coselmar-ui/src/main/webapp/i18n/en.js b/coselmar-ui/src/main/webapp/i18n/en.js index ba11b59..2d07673 100644 --- a/coselmar-ui/src/main/webapp/i18n/en.js +++ b/coselmar-ui/src/main/webapp/i18n/en.js @@ -87,6 +87,7 @@ var translateEN = { "document.metadata.type.conferenceArticle" : "Conference article", "document.metadata.type.conferenceSummary" : "Conference summary", "document.metadata.file" : "File", +"document.metadata.mimetype" : "Mime Type", "document.metadata.externalUrl" : "External URL", "document.metadata.copyright" : "Copyright", "document.metadata.licence" : "Licence", diff --git a/coselmar-ui/src/main/webapp/i18n/fr.js b/coselmar-ui/src/main/webapp/i18n/fr.js index 62b4204..ff664f6 100644 --- a/coselmar-ui/src/main/webapp/i18n/fr.js +++ b/coselmar-ui/src/main/webapp/i18n/fr.js @@ -87,6 +87,7 @@ var translateFR = { "document.metadata.type.conferenceArticle" : "Acte de colloque", "document.metadata.type.conferenceSummary" : "Communication sans actes", "document.metadata.file" : "Fichier", +"document.metadata.mimetype" : "Type Mime", "document.metadata.externalUrl" : "URL externe", "document.metadata.copyright" : "Copyright", "document.metadata.licence" : "License", diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index 154fd7e..ca3aff5 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -134,7 +134,7 @@ coselmarControllers.controller("DocumentsCtrl", ['$scope', '$route', '$routePara // Controller for new document View coselmarControllers.controller("NewDocumentCtrl", ['$scope', '$location', 'documentService', function($scope, $location, documentService){ - $scope.document = {'privacy': 'PUBLIC', 'keywords': []}; + $scope.document = {'type' : 'PERIODICAL_PUBLICATION', 'privacy': 'PUBLIC', 'keywords': []}; $scope.upload = {}; $scope.existing = {'types' : [], 'keywords' : []}; @@ -955,7 +955,7 @@ coselmarControllers.controller('ModalSearchDocumentsCtrl', function ($scope, $mo coselmarControllers.controller('ModalSearchQuestionsCtrl', function ($scope, $modalInstance, currentQuestionId, questionsService) { $scope.searchKeywords = []; - $scope.searchOptions = { 'privacy' : '', 'status' : '', 'keywords' : []}; + $scope.searchOptions = { 'type' : 'PERIODICAL_PUBLICATION', 'privacy' : '', 'status' : '', 'keywords' : []}; $scope.currentQuestionId = currentQuestionId; questionsService.getQuestions($scope.searchOptions, function(questions) { diff --git a/coselmar-ui/src/main/webapp/views/documents/editDocument.html b/coselmar-ui/src/main/webapp/views/documents/editDocument.html index daed34c..64c296b 100644 --- a/coselmar-ui/src/main/webapp/views/documents/editDocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/editDocument.html @@ -50,13 +50,20 @@ ng-class="{'has-error' : documentForm.type.$invalid && !documentForm.type.$pristine}"> <label class="col-md-1 control-label">{{ 'document.metadata.type' | translate }} *</label> + <div class="col-md-2"> <select class="form-control" name="type" ng-model="document.type" required> - <option value="Publication">{{ 'document.metadata.type.publication' | translate }}</option> - <option value="Report">{{ 'document.metadata.type.report' | translate }}</option> - <option value="Scientific report">{{ 'document.metadata.type.scientificReport' | translate }}</option> - <option value="Contract report">{{ 'document.metadata.type.contractReport' | translate }}</option> - <option value="Poster">{{ 'document.metadata.type.poster' | translate }}</option> - <option value="Conference Article">{{ 'document.metadata.type.conferenceArticle' | translate }}</option> + <option value="PERIODICAL_PUBLICATION">{{ 'document.metadata.type.periodicalPublication' | translate }}</option> + <option value="MEETING_PUBLICATION">{{ 'document.metadata.type.meetingPublication' | translate }}</option> + <option value="THESIS">{{ 'document.metadata.type.thesis' | translate }}</option> + <option value="REPORT">{{ 'document.metadata.type.report' | translate }}</option> + <option value="SCIENTIFIC_REPORT">{{ 'document.metadata.type.scientificReport' | translate }}</option> + <option value="SCIENTIFIC_WORK">{{ 'document.metadata.type.scientificWork' | translate }}</option> + <option value="CHAPTER_WORK">{{ 'document.metadata.type.chapterWork' | translate }}</option> + <option value="CONTRACT_REPORT">{{ 'document.metadata.type.contractReport' | translate }}</option> + <option value="EXPERTISE">{{ 'document.metadata.type.expertise' | translate }}</option> + <option value="POSTER">{{ 'document.metadata.type.poster' | translate }}</option> + <option value="CONFERENCE_ARTICLE">{{ 'document.metadata.type.conferenceArticle' | translate }}</option> + <option value="CONFERENCE_SUMMARY">{{ 'document.metadata.type.conferenceSummary' | translate }}</option> </select> <p ng-show="documentForm.type.$invalid && !documentForm.type.$pristine" diff --git a/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html b/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html index 668f4bc..71a85fb 100644 --- a/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html +++ b/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html @@ -55,8 +55,20 @@ <label class="col-md-2 control-label">{{ 'document.metadata.type' | translate }} *</label> <div class="col-md-4"> - <input type="text" class="form-control" name="type" - data-ng-model="document.type" list="modalExistingTypes" required/> + <select class="form-control" name="type" ng-model="document.type" required> + <option value="PERIODICAL_PUBLICATION">{{ 'document.metadata.type.periodicalPublication' | translate }}</option> + <option value="MEETING_PUBLICATION">{{ 'document.metadata.type.meetingPublication' | translate }}</option> + <option value="THESIS">{{ 'document.metadata.type.thesis' | translate }}</option> + <option value="REPORT">{{ 'document.metadata.type.report' | translate }}</option> + <option value="SCIENTIFIC_REPORT">{{ 'document.metadata.type.scientificReport' | translate }}</option> + <option value="SCIENTIFIC_WORK">{{ 'document.metadata.type.scientificWork' | translate }}</option> + <option value="CHAPTER_WORK">{{ 'document.metadata.type.chapterWork' | translate }}</option> + <option value="CONTRACT_REPORT">{{ 'document.metadata.type.contractReport' | translate }}</option> + <option value="EXPERTISE">{{ 'document.metadata.type.expertise' | translate }}</option> + <option value="POSTER">{{ 'document.metadata.type.poster' | translate }}</option> + <option value="CONFERENCE_ARTICLE">{{ 'document.metadata.type.conferenceArticle' | translate }}</option> + <option value="CONFERENCE_SUMMARY">{{ 'document.metadata.type.conferenceSummary' | translate }}</option> + </select> <p ng-show="documentForm.type.$invalid && !documentForm.type.$pristine" class="help-block">{{ 'document.message.requiredType' | translate }}</p> diff --git a/coselmar-ui/src/main/webapp/views/documents/newdocument.html b/coselmar-ui/src/main/webapp/views/documents/newdocument.html index 1334a3b..3fd948f 100644 --- a/coselmar-ui/src/main/webapp/views/documents/newdocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/newdocument.html @@ -60,8 +60,8 @@ <div class="col-md-2"> <select class="form-control" name="type" ng-model="document.type" required> - <option value="MEETING_PUBLICATION">{{ 'document.metadata.type.meetingPublication' | translate }}</option> <option value="PERIODICAL_PUBLICATION">{{ 'document.metadata.type.periodicalPublication' | translate }}</option> + <option value="MEETING_PUBLICATION">{{ 'document.metadata.type.meetingPublication' | translate }}</option> <option value="THESIS">{{ 'document.metadata.type.thesis' | translate }}</option> <option value="REPORT">{{ 'document.metadata.type.report' | translate }}</option> <option value="SCIENTIFIC_REPORT">{{ 'document.metadata.type.scientificReport' | translate }}</option> diff --git a/coselmar-ui/src/main/webapp/views/documents/viewDocument.html b/coselmar-ui/src/main/webapp/views/documents/viewDocument.html index 8f36a0b..7287fbb 100644 --- a/coselmar-ui/src/main/webapp/views/documents/viewDocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/viewDocument.html @@ -40,7 +40,19 @@ </tr> <tr> <td>{{ 'document.metadata.type' | translate }}</td> - <td>{{document.type}}</td> + <!-- Manage translation of document type --> + <td ng-if="document.type == 'PERIODICAL_PUBLICATION'">{{ 'document.metadata.type.periodicalPublication' | translate }}</td> + <td ng-if="document.type == 'MEETING_PUBLICATION'">{{ 'document.metadata.type.meetingPublication' | translate }}</td> + <td ng-if="document.type == 'THESIS'">{{ 'document.metadata.type.thesis' | translate }}</td> + <td ng-if="document.type == 'REPORT'">{{ 'document.metadata.type.report' | translate }}</td> + <td ng-if="document.type == 'SCIENTIFIC_REPORT'">{{ 'document.metadata.type.scientificReport' | translate }}</td> + <td ng-if="document.type == 'SCIENTIFIC_WORK'">{{ 'document.metadata.type.scientificWork' | translate }}</td> + <td ng-if="document.type == 'CHAPTER_WORK'">{{ 'document.metadata.type.chapterWork' | translate }}</td> + <td ng-if="document.type == 'CONTRACT_REPORT'">{{ 'document.metadata.type.contractReport' | translate }}</td> + <td ng-if="document.type == 'EXPERTISE'">{{ 'document.metadata.type.expertise' | translate }}</td> + <td ng-if="document.type == 'POSTER'">{{ 'document.metadata.type.poster' | translate }}</td> + <td ng-if="document.type == 'CONFERENCE_ARTICLE'">{{ 'document.metadata.type.conferenceArticle' | translate }}</td> + <td ng-if="document.type == 'CONFERENCE_SUMMARY'">{{ 'document.metadata.type.conferenceSummary' | translate }}</td> </tr> <tr> <td>{{ 'document.metadata.keywords' | translate }}</td> @@ -79,7 +91,7 @@ <td>{{document.publicationDate | date:'mediumDate'}}</td> </tr> <tr> - <td>{{ 'document.metadata.type' | translate }}</td> + <td>{{ 'document.metadata.mimetype' | translate }}</td> <td ng-if="document.withFile">{{document.mimeType}}</td> <td ng-if="!document.withFile">{{ 'document.metadata.externalLink' | translate }}</td> </tr> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.