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 c02daaf159f6df6352758ffc1a3bd116b91f1294 Author: Yannick Martel <martel@©odelutin.com> Date: Mon Jan 18 19:17:51 2016 +0100 fixes #7911 add citation in documents --- .../fr/ifremer/coselmar/services/v1/DocumentsWebService.java | 5 ++++- coselmar-ui/src/main/webapp/i18n/en.js | 1 + coselmar-ui/src/main/webapp/i18n/fr.js | 1 + .../src/main/webapp/views/documents/editDocument.html | 11 +++++++++++ .../src/main/webapp/views/documents/modalDocumentEdit.html | 12 ++++++++++++ coselmar-ui/src/main/webapp/views/documents/newdocument.html | 11 +++++++++++ .../src/main/webapp/views/documents/viewDocument.html | 4 ++++ 7 files changed, 44 insertions(+), 1 deletion(-) diff --git a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java index 118a4fc..943fbf1 100644 --- a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java +++ b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/DocumentsWebService.java @@ -333,6 +333,8 @@ public class DocumentsWebService extends CoselmarWebServiceSupport { documentEntity.setComment(document.getComment()); + documentEntity.setCitation(document.getCitation()); + commit(); DocumentBean result = BeanEntityConverter.toBean(getPersistenceContext().getTopiaIdFactory(), documentEntity); @@ -536,9 +538,10 @@ public class DocumentsWebService extends CoselmarWebServiceSupport { deleteAttachedFile(documentEntity); } - documentEntity.setComment(document.getComment()); + documentEntity.setCitation(document.getCitation()); + commit(); // Update index information for this document diff --git a/coselmar-ui/src/main/webapp/i18n/en.js b/coselmar-ui/src/main/webapp/i18n/en.js index 7d56ce2..7751f48 100644 --- a/coselmar-ui/src/main/webapp/i18n/en.js +++ b/coselmar-ui/src/main/webapp/i18n/en.js @@ -100,6 +100,7 @@ var translateEN = { "document.metadata.comment" : "Comment", "document.metadata.fileName" : "Document File", "document.metadata.externalLink" : "External Link", +"document.metadata.citation" : "Citation", "document.metadata.depositBefore" : "Deposit before", "document.metadata.depositAfter" : "Deposit after", diff --git a/coselmar-ui/src/main/webapp/i18n/fr.js b/coselmar-ui/src/main/webapp/i18n/fr.js index f43ed95..8f2904d 100644 --- a/coselmar-ui/src/main/webapp/i18n/fr.js +++ b/coselmar-ui/src/main/webapp/i18n/fr.js @@ -100,6 +100,7 @@ var translateFR = { "document.metadata.comment" : "Commentaire", "document.metadata.fileName" : "Nom du fichier associé", "document.metadata.externalLink" : "Lien externe", +"document.metadata.citation" : "Citation", "document.metadata.depositBefore" : "Déposé avant le", "document.metadata.depositAfter" : "Déposé après le", diff --git a/coselmar-ui/src/main/webapp/views/documents/editDocument.html b/coselmar-ui/src/main/webapp/views/documents/editDocument.html index ecb198c..80ca12b 100644 --- a/coselmar-ui/src/main/webapp/views/documents/editDocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/editDocument.html @@ -295,6 +295,17 @@ </div> </div> + <!-- Citation --> + <div class="form-group" > + <label class="col-md-2 control-label">{{ 'document.metadata.citation' | translate }}</label> + + <div class="col-md-10"> + <textarea type="text" class="form-control" name="citation" rows="2" + ng-model="document.citation" /> + + </div> + </div> + <div> <div ng-if="hasErrors" class="has-error"> <div class="text-center help-block">{{ 'common.message.missingMandatoryFields' | translate }}</div> diff --git a/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html b/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html index 8cf2001..cdb224a 100644 --- a/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html +++ b/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html @@ -278,6 +278,18 @@ </div> <!-- End Line with Comment --> + <!-- Line with Citation --> + <div class="form-group" > + <label class="col-md-2 control-label">{{ 'document.metadata.citation' | translate }}</label> + + <div class="col-md-10"> + <input type="text" class="form-control" name="citation" + ng-model="document.citation" /> + + </div> + </div> + <!-- End Line with Citation --> + <!-- In case of errors --> <div ng-if="documentForm.$invalid || hasErrors" class="has-error"> <div class="text-center help-block">{{ 'common.message.missingMandatoryFields' | translate }}</div> diff --git a/coselmar-ui/src/main/webapp/views/documents/newdocument.html b/coselmar-ui/src/main/webapp/views/documents/newdocument.html index ebb5b79..9f578c6 100644 --- a/coselmar-ui/src/main/webapp/views/documents/newdocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/newdocument.html @@ -289,6 +289,17 @@ </div> </div> + <!-- Citation --> + <div class="form-group" > + <label class="col-md-2 control-label">{{ 'document.metadata.citation' | translate }}</label> + + <div class="col-md-10"> + <textarea type="text" class="form-control" name="citation" rows="2" + ng-model="document.citation" /> + + </div> + </div> + <div class="form-group actions" ng-if="privacy != 'RESTRICTED'"> <input type="submit" value="{{ 'common.button.validate' | translate}}" class="btn btn-action" ng-disabled="documentForm.$invalid || keywordsError || (!document.externalUrl && !upload.file)"/> diff --git a/coselmar-ui/src/main/webapp/views/documents/viewDocument.html b/coselmar-ui/src/main/webapp/views/documents/viewDocument.html index 8a9b192..47c5453 100644 --- a/coselmar-ui/src/main/webapp/views/documents/viewDocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/viewDocument.html @@ -92,6 +92,10 @@ </table> </dd> </dl> + <dl> + <dt>{{ 'document.metadata.citation' | translate }}</dt> + <dd>{{document.citation}}</dd> + </dl> </div> <div class="form-group col-md-4 aside"> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.