branch develop updated (469fdf0 -> ef7f274)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 469fdf0 affichage du Qrcode pour facitlé le partage du vote new ef7f274 plus d'information dans les mail d'invitation 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 ef7f274fe3021035a06dcae37fb3173e2f99c156 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Apr 12 08:51:06 2017 +0200 plus d'information dans les mail d'invitation Summary of changes: .../services/service/mail/PollInvitationEmail.java | 20 ++++++++++++++++++++ .../pollen/services/service/mail/PollenMail.java | 7 +++++++ .../service/mail/RestrictedPollInvitationEmail.java | 20 ++++++++++++++++++++ .../resources/email/PollInvitationEmail.mustache | 9 ++++++++- .../resources/email/PollInvitationEmail_fr.mustache | 10 ++++++++-- .../email/RestrictedPollInvitationEmail.mustache | 9 ++++++++- .../email/RestrictedPollInvitationEmail_fr.mustache | 10 +++++++++- 7 files changed, 80 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit ef7f274fe3021035a06dcae37fb3173e2f99c156 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Apr 12 08:51:06 2017 +0200 plus d'information dans les mail d'invitation --- .../services/service/mail/PollInvitationEmail.java | 20 ++++++++++++++++++++ .../pollen/services/service/mail/PollenMail.java | 7 +++++++ .../service/mail/RestrictedPollInvitationEmail.java | 20 ++++++++++++++++++++ .../resources/email/PollInvitationEmail.mustache | 9 ++++++++- .../resources/email/PollInvitationEmail_fr.mustache | 10 ++++++++-- .../email/RestrictedPollInvitationEmail.mustache | 9 ++++++++- .../email/RestrictedPollInvitationEmail_fr.mustache | 10 +++++++++- 7 files changed, 80 insertions(+), 5 deletions(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/PollInvitationEmail.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/PollInvitationEmail.java index 71928ec..acca667 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/PollInvitationEmail.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/PollInvitationEmail.java @@ -61,4 +61,24 @@ public class PollInvitationEmail extends PollenMail { public String getVoteUrl() { return voteUrl; } + + public String getCreationDate() { + return formatDate(poll.getTopiaCreateDate()); + } + + public String getBeginDate() { + return formatDate(poll.getBeginDate()); + } + + public String getEndDate() { + return formatDate(poll.getEndDate()); + } + + public String getBeginChoiceDate() { + return formatDate(poll.getBeginChoiceDate()); + } + + public String getEndChoiceDate() { + return formatDate(poll.getEndChoiceDate()); + } } diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/PollenMail.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/PollenMail.java index 6aa2789..7593e0e 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/PollenMail.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/PollenMail.java @@ -25,6 +25,8 @@ import com.google.common.collect.Sets; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import java.text.DateFormat; +import java.util.Date; import java.util.Locale; import java.util.Set; @@ -84,4 +86,9 @@ public abstract class PollenMail { || CollectionUtils.isNotEmpty(getTos()); } + protected String formatDate(Date date) { + DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.SHORT, locale); + return formatter.format(date); + } + } diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/RestrictedPollInvitationEmail.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/RestrictedPollInvitationEmail.java index ac4ca08..32b1579 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/RestrictedPollInvitationEmail.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/RestrictedPollInvitationEmail.java @@ -81,4 +81,24 @@ public class RestrictedPollInvitationEmail extends PollenMail { public String getToken() { return token; } + + public String getCreationDate() { + return formatDate(poll.getTopiaCreateDate()); + } + + public String getBeginDate() { + return formatDate(poll.getBeginDate()); + } + + public String getEndDate() { + return formatDate(poll.getEndDate()); + } + + public String getBeginChoiceDate() { + return formatDate(poll.getBeginChoiceDate()); + } + + public String getEndChoiceDate() { + return formatDate(poll.getEndChoiceDate()); + } } diff --git a/pollen-services/src/main/resources/email/PollInvitationEmail.mustache b/pollen-services/src/main/resources/email/PollInvitationEmail.mustache index baf964d..39c5437 100644 --- a/pollen-services/src/main/resources/email/PollInvitationEmail.mustache +++ b/pollen-services/src/main/resources/email/PollInvitationEmail.mustache @@ -1,6 +1,6 @@ Welcome, -New poll has been created : {{poll.title}} +{{poll.creator.name }} invites you to participate in the poll "{{poll.title}}" created {{creationDate}}. {{#poll.description}} @@ -11,4 +11,11 @@ New poll has been created : {{poll.title}} ------------------------------------- {{/poll.description}} +{{#poll.choiceAddAllowed}} +{{#beginChoiceDate}}You can add choices {{#endChoiceDate}}from {{beginChoiceDate}} to {{endChoiceDate}}{{/endChoiceDate}}{{^endChoiceDate}}from {{beginChoiceDate}}{{/endChoiceDate}}.{{/beginChoiceDate}} +{{^beginChoiceDate}}{{#endChoiceDate}}You can add choices to {{endChoiceDate}}{{/endChoiceDate}}{{/beginChoiceDate}} +{{/poll.choiceAddAllowed}} + +{{#beginDate}}Poll is open {{#endDate}}from {{beginDate}} to {{endDate}}{{/endDate}}{{^endDate}}from {{beginDate}}{{/endDate}}.{{/beginDate}} +{{^beginDate}}{{#endDate}}Poll is open to {{endDate}}{{/endDate}}{{/beginDate}} You must participate on this url <a href="{{voteUrl}}">{{voteUrl}}</a> diff --git a/pollen-services/src/main/resources/email/PollInvitationEmail_fr.mustache b/pollen-services/src/main/resources/email/PollInvitationEmail_fr.mustache index a1a7c35..4eee9d4 100644 --- a/pollen-services/src/main/resources/email/PollInvitationEmail_fr.mustache +++ b/pollen-services/src/main/resources/email/PollInvitationEmail_fr.mustache @@ -1,7 +1,6 @@ Bonjour, -Un nouveau sondage a été créé : {{poll.title}} - +{{poll.creator.name }} vous invite à participer à son nouveau sondage "{{poll.title}}" créé le {{creationDate}}. {{#poll.description}} ------------------------------------- @@ -11,4 +10,11 @@ Un nouveau sondage a été créé : {{poll.title}} ------------------------------------- {{/poll.description}} +{{#poll.choiceAddAllowed}} +{{#beginChoiceDate}}Vous pouvez ajouter des choix {{#endChoiceDate}}du {{beginChoiceDate}} au {{endChoiceDate}}{{/endChoiceDate}}{{^endChoiceDate}}à partir du {{beginChoiceDate}}{{/endChoiceDate}}.{{/beginChoiceDate}} +{{^beginChoiceDate}}{{#endChoiceDate}}Les votes sont ouverts jusqu'au {{endChoiceDate}}{{/endChoiceDate}}{{/beginChoiceDate}} +{{/poll.choiceAddAllowed}} +{{#beginDate}}Les votes sont ouverts {{#endDate}}du {{beginDate}} au {{endDate}}{{/endDate}}{{^endDate}}à partir du {{beginDate}}{{/endDate}}.{{/beginDate}} +{{^beginDate}}{{#endDate}}Les votes sont ouverts jusqu'au {{endDate}}{{/endDate}}{{/beginDate}} + Vous pouvez y participer avec l'adresse <a href="{{voteUrl}}">{{voteUrl}}</a> diff --git a/pollen-services/src/main/resources/email/RestrictedPollInvitationEmail.mustache b/pollen-services/src/main/resources/email/RestrictedPollInvitationEmail.mustache index 66b9d53..287e41e 100644 --- a/pollen-services/src/main/resources/email/RestrictedPollInvitationEmail.mustache +++ b/pollen-services/src/main/resources/email/RestrictedPollInvitationEmail.mustache @@ -1,6 +1,6 @@ Welcom {{principal.name}}, -New poll has been created : {{poll.title}} +{{poll.creator.name }} invites you to participate in the poll "{{poll.title}}" created {{creationDate}}. {{#poll.description}} @@ -11,4 +11,11 @@ New poll has been created : {{poll.title}} ------------------------------------- {{/poll.description}} +{{#poll.choiceAddAllowed}} +{{#beginChoiceDate}}You can add choices {{#endChoiceDate}}from {{beginChoiceDate}} to {{endChoiceDate}}{{/endChoiceDate}}{{^endChoiceDate}}from {{beginChoiceDate}}{{/endChoiceDate}}.{{/beginChoiceDate}} +{{^beginChoiceDate}}{{#endChoiceDate}}You can add choices to {{endChoiceDate}}{{/endChoiceDate}}{{/beginChoiceDate}} +{{/poll.choiceAddAllowed}} + +{{#beginDate}}Poll is open {{#endDate}}from {{beginDate}} to {{endDate}}{{/endDate}}{{^endDate}}from {{beginDate}}{{/endDate}}.{{/beginDate}} +{{^beginDate}}{{#endDate}}Poll is open to {{endDate}}{{/endDate}}{{/beginDate}} You must participate on this url <a href="{{voteUrl}}">{{voteUrl}}</a> diff --git a/pollen-services/src/main/resources/email/RestrictedPollInvitationEmail_fr.mustache b/pollen-services/src/main/resources/email/RestrictedPollInvitationEmail_fr.mustache index 8f88021..df18a42 100644 --- a/pollen-services/src/main/resources/email/RestrictedPollInvitationEmail_fr.mustache +++ b/pollen-services/src/main/resources/email/RestrictedPollInvitationEmail_fr.mustache @@ -1,6 +1,6 @@ Bonjour {{principal.name}}, -Un nouveau sondage a été créé : {{poll.title}} +{{poll.creator.name }} vous invite à participer à son nouveau sondage "{{poll.title}}" créé le {{creationDate}}. {{#poll.description}} @@ -11,4 +11,12 @@ Un nouveau sondage a été créé : {{poll.title}} ------------------------------------- {{/poll.description}} +{{#poll.choiceAddAllowed}} +{{#beginChoiceDate}}Vous pouvez ajouter des choix {{#endChoiceDate}}du {{beginChoiceDate}} au {{endChoiceDate}}{{/endChoiceDate}}{{^endChoiceDate}}à partir du {{beginChoiceDate}}{{/endChoiceDate}}.{{/beginChoiceDate}} +{{^beginChoiceDate}}{{#endChoiceDate}}Les votes sont ouverts jusqu'au {{endChoiceDate}}{{/endChoiceDate}}{{/beginChoiceDate}} +{{/poll.choiceAddAllowed}} + +{{#beginDate}}Les votes sont ouverts {{#endDate}}du {{beginDate}} au {{endDate}}{{/endDate}}{{^endDate}}à partir du {{beginDate}}{{/endDate}}.{{/beginDate}} +{{^beginDate}}{{#endDate}}Les votes sont ouverts jusqu'au {{endDate}}{{/endDate}}{{/beginDate}} + Vous pouvez y participer avec l'adresse <a href="{{voteUrl}}">{{voteUrl}}</a> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm