branch develop updated (395eb60 -> 5ec2cbc)
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 from 395eb60 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 0865a71 refs-60 #7911 add citation in document - persistence & services part new c02daaf fixes #7911 add citation in documents new 5ec2cbc Merge branch 'feature/7911-add-citations-field-on-document' into develop The 3 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 5ec2cbc3532c9343225f7cc391e9a1a55a1649d3 Merge: 395eb60 c02daaf Author: Yannick Martel <martel@©odelutin.com> Date: Mon Jan 18 19:17:57 2016 +0100 Merge branch 'feature/7911-add-citations-field-on-document' into develop commit c02daaf159f6df6352758ffc1a3bd116b91f1294 Author: Yannick Martel <martel@©odelutin.com> Date: Mon Jan 18 19:17:51 2016 +0100 fixes #7911 add citation in documents commit 0865a71a454e4a386a0c33a046e346a8526b4a9d Author: Yannick Martel <martel@©odelutin.com> Date: Mon Jan 18 18:38:11 2016 +0100 refs-60 #7911 add citation in document - persistence & services part Summary of changes: ...=> V1_4_0_1__7911_add_citation_in_documents.sql} | 13 +------------ .../src/main/xmi/coselmar-model.properties | 1 + .../src/main/xmi/coselmar-model.zargo | Bin 10955 -> 11007 bytes .../fr/ifremer/coselmar/beans/DocumentBean.java | 13 ++++++++++++- .../ifremer/coselmar/beans/DocumentSearchBean.java | 4 ++-- .../coselmar/converter/BeanEntityConverter.java | 6 +++++- .../coselmar/services/v1/DocumentsWebService.java | 5 ++++- .../indexation/DocumentsIndexationServiceTest.java | 16 ++++++++-------- coselmar-ui/src/main/webapp/i18n/en.js | 1 + coselmar-ui/src/main/webapp/i18n/fr.js | 1 + .../main/webapp/views/documents/editDocument.html | 11 +++++++++++ .../webapp/views/documents/modalDocumentEdit.html | 12 ++++++++++++ .../main/webapp/views/documents/newdocument.html | 11 +++++++++++ .../main/webapp/views/documents/viewDocument.html | 4 ++++ 14 files changed, 73 insertions(+), 25 deletions(-) copy coselmar-persistence/src/main/resources/db/migration/{V1_2_0_1__7867_add_list_links_in_projects.sql => V1_4_0_1__7911_add_citation_in_documents.sql} (68%) -- 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 0865a71a454e4a386a0c33a046e346a8526b4a9d Author: Yannick Martel <martel@©odelutin.com> Date: Mon Jan 18 18:38:11 2016 +0100 refs-60 #7911 add citation in document - persistence & services part --- .../V1_4_0_1__7911_add_citation_in_documents.sql | 23 +++++++++++++++++++++ .../src/main/xmi/coselmar-model.properties | 1 + .../src/main/xmi/coselmar-model.zargo | Bin 10955 -> 11007 bytes .../fr/ifremer/coselmar/beans/DocumentBean.java | 13 +++++++++++- .../ifremer/coselmar/beans/DocumentSearchBean.java | 4 ++-- .../coselmar/converter/BeanEntityConverter.java | 6 +++++- .../indexation/DocumentsIndexationServiceTest.java | 16 +++++++------- 7 files changed, 51 insertions(+), 12 deletions(-) diff --git a/coselmar-persistence/src/main/resources/db/migration/V1_4_0_1__7911_add_citation_in_documents.sql b/coselmar-persistence/src/main/resources/db/migration/V1_4_0_1__7911_add_citation_in_documents.sql new file mode 100644 index 0000000..23d18fa --- /dev/null +++ b/coselmar-persistence/src/main/resources/db/migration/V1_4_0_1__7911_add_citation_in_documents.sql @@ -0,0 +1,23 @@ +--- +-- #%L +-- Coselmar :: Persistence +-- %% +-- Copyright (C) 2014 - 2016 Ifremer, Code Lutin +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- + +ALTER TABLE document ADD citation VARCHAR(255); diff --git a/coselmar-persistence/src/main/xmi/coselmar-model.properties b/coselmar-persistence/src/main/xmi/coselmar-model.properties index 3a95bfc..1ee6952 100644 --- a/coselmar-persistence/src/main/xmi/coselmar-model.properties +++ b/coselmar-persistence/src/main/xmi/coselmar-model.properties @@ -29,6 +29,7 @@ model.tagvalue.useEnumerationName=true # Text fr.ifremer.coselmar.persistence.entity.Document.attribute.summary.tagValue.hibernateAttributeType=text fr.ifremer.coselmar.persistence.entity.Document.attribute.comment.tagValue.hibernateAttributeType=text +fr.ifremer.coselmar.persistence.entity.Document.attribute.citation.tagValue.hibernateAttributeType=text fr.ifremer.coselmar.persistence.entity.Question.attribute.summary.tagValue.hibernateAttributeType=text fr.ifremer.coselmar.persistence.entity.Question.attribute.conclusion.tagValue.hibernateAttributeType=text \ No newline at end of file diff --git a/coselmar-persistence/src/main/xmi/coselmar-model.zargo b/coselmar-persistence/src/main/xmi/coselmar-model.zargo index 1f35409..85a95b3 100644 Binary files a/coselmar-persistence/src/main/xmi/coselmar-model.zargo and b/coselmar-persistence/src/main/xmi/coselmar-model.zargo differ diff --git a/coselmar-rest/src/main/java/fr/ifremer/coselmar/beans/DocumentBean.java b/coselmar-rest/src/main/java/fr/ifremer/coselmar/beans/DocumentBean.java index 390e366..f8c855f 100644 --- a/coselmar-rest/src/main/java/fr/ifremer/coselmar/beans/DocumentBean.java +++ b/coselmar-rest/src/main/java/fr/ifremer/coselmar/beans/DocumentBean.java @@ -52,6 +52,7 @@ public class DocumentBean implements Serializable { protected Date publicationDate; protected String comment; protected String fileName; + protected String citation; // Document could be internal file or external link protected boolean withFile; @@ -68,7 +69,7 @@ public class DocumentBean implements Serializable { String type, String summary, String language, Date publicationDate, String authors, String license, String copyright, boolean withFile, String mimeType, String externalUrl, - String comment, String fileName) { + String comment, String fileName, String citation) { this.id = id; this.name = name; this.ownerName = ownerName; @@ -100,6 +101,8 @@ public class DocumentBean implements Serializable { this.comment = comment; this.authorizedUsers = new HashSet<>(0); + + this.citation = citation; } public String getId() { @@ -302,4 +305,12 @@ public class DocumentBean implements Serializable { } this.authorizedUsers.add(userBean); } + + public String getCitation() { + return citation; + } + + public void setCitation(String citation) { + this.citation = citation; + } } diff --git a/coselmar-rest/src/main/java/fr/ifremer/coselmar/beans/DocumentSearchBean.java b/coselmar-rest/src/main/java/fr/ifremer/coselmar/beans/DocumentSearchBean.java index 27daa5d..0fe4745 100644 --- a/coselmar-rest/src/main/java/fr/ifremer/coselmar/beans/DocumentSearchBean.java +++ b/coselmar-rest/src/main/java/fr/ifremer/coselmar/beans/DocumentSearchBean.java @@ -53,8 +53,8 @@ public class DocumentSearchBean extends DocumentBean { String type, String summary, String language, Date publicationDate, String authors, String license, String copyright, boolean withFile, String mimeType, String externalUrl, - String comment, String fileName) { - super(id, name, ownerName, ownerId, privacy, depositDate, keywords, type, summary, language, publicationDate, authors, license, copyright, withFile, mimeType, externalUrl, comment, fileName); + String comment, String fileName, String citation) { + super(id, name, ownerName, ownerId, privacy, depositDate, keywords, type, summary, language, publicationDate, authors, license, copyright, withFile, mimeType, externalUrl, comment, fileName, citation); } public Integer getLimit() { diff --git a/coselmar-rest/src/main/java/fr/ifremer/coselmar/converter/BeanEntityConverter.java b/coselmar-rest/src/main/java/fr/ifremer/coselmar/converter/BeanEntityConverter.java index defead1..9af8254 100644 --- a/coselmar-rest/src/main/java/fr/ifremer/coselmar/converter/BeanEntityConverter.java +++ b/coselmar-rest/src/main/java/fr/ifremer/coselmar/converter/BeanEntityConverter.java @@ -95,7 +95,9 @@ public class BeanEntityConverter { document.getMimeType(), document.getExternalUrl(), document.getComment(), - document.getFileName() + document.getFileName(), + + document.getCitation() ); } @@ -351,6 +353,8 @@ public class BeanEntityConverter { document.setComment(documentBean.getComment()); document.setFileName(documentBean.getFileName()); + document.setCitation(documentBean.getCitation()); + return document; } diff --git a/coselmar-rest/src/test/java/fr/ifremer/coselmar/services/indexation/DocumentsIndexationServiceTest.java b/coselmar-rest/src/test/java/fr/ifremer/coselmar/services/indexation/DocumentsIndexationServiceTest.java index ee2311b..f1a4cba 100644 --- a/coselmar-rest/src/test/java/fr/ifremer/coselmar/services/indexation/DocumentsIndexationServiceTest.java +++ b/coselmar-rest/src/test/java/fr/ifremer/coselmar/services/indexation/DocumentsIndexationServiceTest.java @@ -65,7 +65,7 @@ public class DocumentsIndexationServiceTest extends AbstractCoselmarServiceTest "Ceci n'est pas un document", "John Doe", "user001", Privacy.PUBLIC.name(), new Date(), Lists.newArrayList("document", "test"), "testDocument", "This is not a fake document used for test", "fr", null, "Jack, Jane", - null, null, false, null, "http://somewhere", "no comment", null); + null, null, false, null, "http://somewhere", "no comment", null, null); documentsIndexationService.indexDocument(documentOne); @@ -122,7 +122,7 @@ public class DocumentsIndexationServiceTest extends AbstractCoselmarServiceTest "Ceci n'est pas un document", "John Doe", "user001", Privacy.PUBLIC.name(), new Date(), Lists.newArrayList("document", "test"), "testDocument", "This is not a fake document used for test", "fr", null, "Jack, Jane", - null, null, false, null, "http://somewhere", "no comment", null); + null, null, false, null, "http://somewhere", "no comment", null, null); documentsIndexationService.indexDocument(documentOne); @@ -147,7 +147,7 @@ public class DocumentsIndexationServiceTest extends AbstractCoselmarServiceTest new Date(), Lists.newArrayList("test", "update"), "testDocument", // "This is a fake doc updated for test", "fr", null, "James, JJ", "This is a faked doct updated for test", "fr", null, "James, JJ", - null, null, false, null, "http://somewhere", "no comment", null); + null, null, false, null, "http://somewhere", "no comment", null, null); documentsIndexationService.updateDocument(documentOne); @@ -220,7 +220,7 @@ public class DocumentsIndexationServiceTest extends AbstractCoselmarServiceTest "Ceci n'est pas un document", "John Doe", "user001", Privacy.PUBLIC.name(), new Date(), Lists.newArrayList("document", "test"), "testDocument", "This is not a fake document used for test", "fr", null, "Jack, Jane", - null, null, false, null, "http://somewhere", "no comment", null); + null, null, false, null, "http://somewhere", "no comment", null, null); documentsIndexationService.indexDocument(documentOne); @@ -230,7 +230,7 @@ public class DocumentsIndexationServiceTest extends AbstractCoselmarServiceTest "Tardis documentation", "The Doctor", "user003", Privacy.PUBLIC.name(), new Date(), Lists.newArrayList("tardis", "documentation", "old", "new", "borrowed", "blue"), "testDocument", "This is part of document about the TARDIS", "fr", null, "The Doctor, Rose, Amy, River, Clara", - null, null, false, null, "http://tardis.wikia.com/wiki/TARDIS", "no comment", null); + null, null, false, null, "http://tardis.wikia.com/wiki/TARDIS", "no comment", null, null); documentsIndexationService.indexDocument(documentTwo); @@ -264,7 +264,7 @@ public class DocumentsIndexationServiceTest extends AbstractCoselmarServiceTest "Ceci n'est pas un document", "John Doe", "user001", Privacy.PUBLIC.name(), new Date(), Lists.newArrayList("document", "test"), "testDocument", "This is not a fake document used for test", "fr", null, "Jack, Jane", - null, null, false, null, "http://somewhere", "no comment", null); + null, null, false, null, "http://somewhere", "no comment", null, null); documentsIndexationService.indexDocument(documentOne); @@ -272,7 +272,7 @@ public class DocumentsIndexationServiceTest extends AbstractCoselmarServiceTest "Another document", "Amy Pond", "user002", Privacy.PUBLIC.name(), new Date(), Lists.newArrayList("document", "test", "fish"), "testDocument", "This is just an other document used for test", "fr", null, "Amy, Rory", - null, null, false, null, "http://somewhere", "no comment", null); + null, null, false, null, "http://somewhere", "no comment", null, null); documentsIndexationService.indexDocument(documentTwo); @@ -280,7 +280,7 @@ public class DocumentsIndexationServiceTest extends AbstractCoselmarServiceTest "Tardis documentation", "The Doctor", "user003", Privacy.PUBLIC.name(), new Date(), Lists.newArrayList("tardis", "documentation", "old", "new", "borrowed", "blue"), "testDocument", "This is part of documentation about the TARDIS", "fr", null, "The Doctor, Rose, Amy, River, Clara", - null, null, false, null, "http://tardis.wikia.com/wiki/TARDIS", "no comment", null); + null, null, false, null, "http://tardis.wikia.com/wiki/TARDIS", "no comment", null, null); documentsIndexationService.indexDocument(documentThree); -- 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 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>.
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 5ec2cbc3532c9343225f7cc391e9a1a55a1649d3 Merge: 395eb60 c02daaf Author: Yannick Martel <martel@©odelutin.com> Date: Mon Jan 18 19:17:57 2016 +0100 Merge branch 'feature/7911-add-citations-field-on-document' into develop .../V1_4_0_1__7911_add_citation_in_documents.sql | 23 +++++++++++++++++++++ .../src/main/xmi/coselmar-model.properties | 1 + .../src/main/xmi/coselmar-model.zargo | Bin 10955 -> 11007 bytes .../fr/ifremer/coselmar/beans/DocumentBean.java | 13 +++++++++++- .../ifremer/coselmar/beans/DocumentSearchBean.java | 4 ++-- .../coselmar/converter/BeanEntityConverter.java | 6 +++++- .../coselmar/services/v1/DocumentsWebService.java | 5 ++++- .../indexation/DocumentsIndexationServiceTest.java | 16 +++++++------- coselmar-ui/src/main/webapp/i18n/en.js | 1 + coselmar-ui/src/main/webapp/i18n/fr.js | 1 + .../main/webapp/views/documents/editDocument.html | 11 ++++++++++ .../webapp/views/documents/modalDocumentEdit.html | 12 +++++++++++ .../main/webapp/views/documents/newdocument.html | 11 ++++++++++ .../main/webapp/views/documents/viewDocument.html | 4 ++++ 14 files changed, 95 insertions(+), 13 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm