branch develop updated (5f62d82 -> 0361f5b)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository coselmar. See http://git.forge.codelutin.com/coselmar.git from 5f62d82 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 0361f5b fixes #8030 authors and copyright no more mandatory The 1 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 0361f5bb6a197705034f3a78bf41970bb0ada85a Author: Yannick Martel <martel@©odelutin.com> Date: Tue Mar 1 11:41:55 2016 +0100 fixes #8030 authors and copyright no more mandatory Summary of changes: .../indexation/DocumentsIndexationService.java | 9 +++++++-- coselmar-ui/src/main/webapp/js/coselmar-controllers.js | 2 -- .../src/main/webapp/views/documents/editDocument.html | 18 ++++++------------ .../main/webapp/views/documents/modalDocumentEdit.html | 15 ++++----------- .../src/main/webapp/views/documents/newdocument.html | 18 ++++++------------ 5 files changed, 23 insertions(+), 39 deletions(-) -- 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.forge.codelutin.com/coselmar.git commit 0361f5bb6a197705034f3a78bf41970bb0ada85a Author: Yannick Martel <martel@©odelutin.com> Date: Tue Mar 1 11:41:55 2016 +0100 fixes #8030 authors and copyright no more mandatory --- .../indexation/DocumentsIndexationService.java | 9 +++++++-- coselmar-ui/src/main/webapp/js/coselmar-controllers.js | 2 -- .../src/main/webapp/views/documents/editDocument.html | 18 ++++++------------ .../main/webapp/views/documents/modalDocumentEdit.html | 15 ++++----------- .../src/main/webapp/views/documents/newdocument.html | 18 ++++++------------ 5 files changed, 23 insertions(+), 39 deletions(-) diff --git a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/indexation/DocumentsIndexationService.java b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/indexation/DocumentsIndexationService.java index ba708f4..16bca16 100644 --- a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/indexation/DocumentsIndexationService.java +++ b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/indexation/DocumentsIndexationService.java @@ -31,6 +31,7 @@ import java.util.Set; import fr.ifremer.coselmar.beans.DocumentBean; import fr.ifremer.coselmar.services.CoselmarSimpleServiceSupport; +import org.apache.commons.lang3.StringUtils; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.StringField; @@ -80,7 +81,9 @@ public class DocumentsIndexationService extends CoselmarSimpleServiceSupport { String documentSummary = document.getSummary(); doc.add(new TextField(DOCUMENT_NAME_INDEX_PROPERTY, documentName, Field.Store.YES)); - doc.add(new TextField(DOCUMENT_AUTHORS_INDEX_PROPERTY, document.getAuthors(), Field.Store.YES)); + if (StringUtils.isNotBlank(document.getAuthors())) { + doc.add(new TextField(DOCUMENT_AUTHORS_INDEX_PROPERTY, document.getAuthors(), Field.Store.YES)); + } doc.add(new TextField(DOCUMENT_SUMMARY_INDEX_PROPERTY, documentSummary, Field.Store.YES)); doc.add(new Field("type", DOCUMENT_TYPE, TextField.TYPE_STORED)); @@ -226,7 +229,9 @@ public class DocumentsIndexationService extends CoselmarSimpleServiceSupport { String documentName = document.getName(); String documentSummary = document.getSummary(); doc.add(new TextField(DOCUMENT_NAME_INDEX_PROPERTY, documentName, Field.Store.YES)); - doc.add(new TextField(DOCUMENT_AUTHORS_INDEX_PROPERTY, document.getAuthors(), Field.Store.YES)); + if (StringUtils.isNotBlank(document.getAuthors())) { + doc.add(new TextField(DOCUMENT_AUTHORS_INDEX_PROPERTY, document.getAuthors(), Field.Store.YES)); + } doc.add(new TextField(DOCUMENT_SUMMARY_INDEX_PROPERTY, documentSummary, Field.Store.YES)); // Cloud Tag management diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index dfbccf3..ece2c6a 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -549,8 +549,6 @@ coselmarControllers.controller("DocumentViewCtrl", var isValid = $scope.document.name && $scope.document.name.length > 0; isValid = isValid && $scope.document.type && $scope.document.type.length > 0; isValid = isValid && $scope.document.keywords && $scope.document.keywords.length > 0; - isValid = isValid && $scope.document.authors && $scope.document.authors.length > 0; - isValid = isValid && $scope.document.copyright && $scope.document.copyright.length > 0; isValid = isValid && $scope.document.summary && $scope.document.summary.length > 0; if (!$scope.document.fileName && $scope.context.currentUser.role != 'ADMIN') { isValid = isValid && (($scope.document.externalUrl && $scope.document.externalUrl.length > 0) || $scope.upload.file); diff --git a/coselmar-ui/src/main/webapp/views/documents/editDocument.html b/coselmar-ui/src/main/webapp/views/documents/editDocument.html index 7794c5f..f34baa3 100644 --- a/coselmar-ui/src/main/webapp/views/documents/editDocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/editDocument.html @@ -51,17 +51,14 @@ class="help-block">{{ 'document.message.requiredName' | translate }}</p> </div> </div> - <div ng-class="{'has-error' : documentForm.authors.$invalid - && !documentForm.authors.$pristine}"> - <label class="col-md-2 control-label">{{ 'document.metadata.authors' | translate }} *</label> + <div > + <label class="col-md-2 control-label">{{ 'document.metadata.authors' | translate }}</label> <div class="col-md-4"> <input type="text" class="form-control" name="authors" placeholder="{{ 'placeholder.fullname' | translate }}" - ng-model="document.authors" required/> + ng-model="document.authors" /> - <p ng-show="documentForm.authors.$invalid && !documentForm.authors.$pristine" - class="help-block">{{ 'document.message.requiredAuthors' | translate }}</p> </div> </div> </div> @@ -232,18 +229,15 @@ <!-- Line with copyright & License --> <div class="form-group"> - <div ng-class="{'has-error' : documentForm.copyright.$invalid - && !documentForm.copyright.$pristine}"> + <div > - <label class="col-md-2 control-label">{{ 'document.metadata.copyright' | translate }} *</label> + <label class="col-md-2 control-label">{{ 'document.metadata.copyright' | translate }}</label> <div class="col-md-4"> <input type="text" class="form-control" name="copyright" placeholder="{{ 'placeholder.document.copyright' | translate }}" - ng-model="document.copyright" required/> + ng-model="document.copyright" /> - <p ng-show="documentForm.copyright.$invalid && !documentForm.copyright.$pristine" - class="help-block">{{ 'document.message.requiredCopyright' | translate }}</p> </div> </div> <div > diff --git a/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html b/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html index 14c6e11..bfd8287 100644 --- a/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html +++ b/coselmar-ui/src/main/webapp/views/documents/modalDocumentEdit.html @@ -50,17 +50,13 @@ </div> </div> - <div class="" - ng-class="{'has-error' : documentForm.authors.$invalid && !documentForm.authors.$pristine}"> + <div class="" > <label class="col-md-2 control-label">{{ 'document.metadata.authors' | translate }} *</label> <div class="col-md-4"> <input type="text" class="form-control" name="authors" placeholder="{{ 'placeholder.fullname' | translate }}" - ng-model="document.authors" required/> - - <p ng-show="documentForm.authors.$invalid && !documentForm.authors.$pristine" - class="help-block">{{ 'document.message.requiredAuthors' | translate }}</p> + ng-model="document.authors" /> </div> </div> @@ -185,17 +181,14 @@ <!-- Line with Copyright and Licence --> <div class="form-group"> - <div - ng-class="{'has-error' : documentForm.copyright.$invalid && !documentForm.copyright.$pristine}"> + <div > <label class="col-md-2 control-label">{{ 'document.metadata.copyright' | translate }} *</label> <div class="col-md-4"> <input type="text" class="form-control" name="copyright" placeholder="{{ 'placeholder.document.copyright' | translate }}" - ng-model="document.copyright" required/> + ng-model="document.copyright" /> - <p ng-show="documentForm.copyright.$invalid && !documentForm.copyright.$pristine" - class="help-block">{{ 'document.message.requiredCopyright' | translate }}</p> </div> </div> diff --git a/coselmar-ui/src/main/webapp/views/documents/newdocument.html b/coselmar-ui/src/main/webapp/views/documents/newdocument.html index 2481379..8fcee7f 100644 --- a/coselmar-ui/src/main/webapp/views/documents/newdocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/newdocument.html @@ -60,17 +60,14 @@ </div> </div> - <div ng-class="{'has-error' : documentForm.authors.$invalid - && !documentForm.authors.$pristine}"> - <label class="col-md-2 control-label">{{ 'document.metadata.authors' | translate }} *</label> + <div> + <label class="col-md-2 control-label">{{ 'document.metadata.authors' | translate }}</label> <div class="col-md-4"> <input type="text" class="form-control" name="authors" placeholder="{{ 'placeholder.fullname' | translate }}" - ng-model="document.authors" required/> + ng-model="document.authors" /> - <p ng-show="documentForm.authors.$invalid && !documentForm.authors.$pristine" - class="help-block">{{ 'document.message.requiredAuthors' | translate }}</p> </div> </div> </div> @@ -226,18 +223,15 @@ <!-- Line with copyright & License --> <div class="form-group"> - <div ng-class="{'has-error' : documentForm.copyright.$invalid - && !documentForm.copyright.$pristine}"> + <div > - <label class="col-md-2 control-label">{{ 'document.metadata.copyright' | translate }} *</label> + <label class="col-md-2 control-label">{{ 'document.metadata.copyright' | translate }}</label> <div class="col-md-4"> <input type="text" class="form-control" name="copyright" placeholder="{{ 'placeholder.document.copyright' | translate }}" - ng-model="document.copyright" required/> + ng-model="document.copyright" /> - <p ng-show="documentForm.copyright.$invalid && !documentForm.copyright.$pristine" - class="help-block">{{ 'document.message.requiredCopyright' | translate }}</p> </div> </div> <div > -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm