Author: fdesbois Date: 2012-04-18 16:51:12 +0200 (Wed, 18 Apr 2012) New Revision: 3296 Url: http://chorem.org/repositories/revision/pollen/3296 Log: fixes #526 : use isRunning method instead of isClosed Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java =================================================================== --- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java 2012-04-18 14:51:06 UTC (rev 3295) +++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java 2012-04-18 14:51:12 UTC (rev 3296) @@ -186,11 +186,12 @@ if (!userAllowed) { addActionError(_("pollen.error.userNotAllowed")); - } else if (!poll.isClosed()) { - addActionMessage(_("pollen.error.pollNotClosed")); + + } else if (poll.isRunning(serviceContext.getCurrentTime())) { + addActionMessage(_("pollen.information.pollRunning")); loadResults(); + } else { - loadResults(); } } Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-04-18 14:51:06 UTC (rev 3295) +++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-04-18 14:51:12 UTC (rev 3296) @@ -42,6 +42,7 @@ pollen.action.register=Register pollen.action.send=Send pollen.action.validate=Submit +pollen.banner.newVersion=New version\! pollen.common.aboutPoll=About the poll pollen.common.addingChoices=Adding choices pollen.common.administrator=Admin @@ -169,7 +170,6 @@ pollen.error.poll.votingList.weight.not.valid=The group's weight is not valid (must be greater than 0) pollen.error.pollAccount.not.found=Poll account not found pollen.error.pollAccount.votingId.required=Name mandatory -pollen.error.pollNotClosed=The poll is not closed. Results may change. pollen.error.pollNotFound=The poll you want to count does not exist. pollen.error.pollTabErrorFound=Some errors were found on this tab, please fix them to finalize the poll creation. pollen.error.user.alreadyVoted=Someone has already used the name %s to vote. @@ -221,6 +221,7 @@ pollen.information.pollClosed=This poll is closed. You can not vote anymore. pollen.information.pollFinished=This poll is finished. You can not vote anymore. pollen.information.pollNotStarted=This poll has not started yet. +pollen.information.pollRunning=The poll is not finished. Results may change. pollen.information.user.created=User %s created. pollen.information.user.deleted=User %s deleted. pollen.information.user.updated=User %s updated. @@ -272,4 +273,3 @@ pollen.title.selectPersonListToCreateVotingList=Select a favorite list to import in a new voting list pollen.title.usersList=Users administration vote.anonymous=Anonymous vote -pollen.banner.newVersion=New version! \ No newline at end of file Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties =================================================================== --- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-04-18 14:51:06 UTC (rev 3295) +++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-04-18 14:51:12 UTC (rev 3296) @@ -47,6 +47,7 @@ pollen.action.register=S'enregistrer pollen.action.send=Envoyer pollen.action.validate=Valider +pollen.banner.newVersion=Nouvelle version \! pollen.common.aboutPoll=A propos du sondage pollen.common.addingChoices=Ajout des choix pollen.common.administrator=Admin @@ -175,7 +176,6 @@ pollen.error.poll.votingList.weight.not.valid=Poids du groupe votant non valide (doit être une nombre supérieur à 0). pollen.error.pollAccount.not.found=Membre non trouvé pollen.error.pollAccount.votingId.required=Nom obliqatoire -pollen.error.pollNotClosed=Ce sondage n'est pas clos. Les résultats peuvent encore changer. pollen.error.pollNotFound=Le sondage que vous voulez dépouiller n'existe pas. pollen.error.pollTabErrorFound=Des erreurs ont été detectées dans cet onglet, veuillez les corriger pour valider la création du sondage. pollen.error.user.alreadyVoted=Une personne a déjà voté sous le nom %s. @@ -228,6 +228,7 @@ pollen.information.pollClosed=Ce sondage est clos. Vous ne pouvez plus voter. pollen.information.pollFinished=Ce sondage est terminé. Vous ne pouvez plus voter. pollen.information.pollNotStarted=Ce sondage n'a pas encore commencé. +pollen.information.pollRunning=Ce sondage n'est pas terminé. Les résultats peuvent encore changer. pollen.information.user.created=L'utilisateur %s a été créé. pollen.information.user.deleted=L'utilisateur %s a été supprimé. pollen.information.user.updated=L'utilisateur %s a été mis à jour. @@ -280,4 +281,3 @@ pollen.title.usersList=Gestion des utilisateurs title=Création d'un sondage vote.anonymous=Vote anonyme -pollen.banner.newVersion=Nouvelle version !