r3012 - in trunk: pollen-business/src/main/java/org/chorem/pollen pollen-business/src/main/java/org/chorem/pollen/entity pollen-business/src/main/java/org/chorem/pollen/service pollen-business/src/main/resources/i18n pollen-business/src/main/xmi pollen-ui/src/main/java/org/chorem/pollen/ui/components pollen-ui/src/main/java/org/chorem/pollen/ui/data pollen-ui/src/main/java/org/chorem/pollen/ui/models pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll pollen-ui/src/main/java/org/chorem/
Author: fdesbois Date: 2010-05-25 14:40:47 +0200 (Tue, 25 May 2010) New Revision: 3012 Url: http://chorem.org/repositories/revision/pollen/3012 Log: - Create component ChoiceImage (not tested) - Vote page is ok to render from now - Add test of name nullity on addChoice for saving new poll Added: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ChoiceImage.java Removed: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/VoteModel.java Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/PollenQueryBuilder.java trunk/pollen-business/src/main/java/org/chorem/pollen/entity/ChoiceImpl.java trunk/pollen-business/src/main/java/org/chorem/pollen/service/ServiceVoteImpl.java trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties trunk/pollen-business/src/main/xmi/pollen.zargo trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Border.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/data/ChoiceField.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/data/PollUri.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/PollFormModel.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/UserAccountDataSource.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ServiceImage.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ServiceImageImpl.java trunk/pollen-ui/src/main/webapp/poll/VoteForPoll.tml Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/PollenQueryBuilder.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/PollenQueryBuilder.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/PollenQueryBuilder.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -4,6 +4,7 @@ import org.chorem.pollen.bean.Filter; import org.chorem.pollen.entity.FavoriteList; import org.chorem.pollen.entity.FavoriteParticipant; +import org.chorem.pollen.entity.Poll; import org.chorem.pollen.entity.PollAccount; import org.nuiton.topia.framework.TopiaQuery; import org.nuiton.topia.persistence.TopiaDAO; @@ -34,11 +35,15 @@ return getEntityProperty(FavoriteParticipant.class, alias); } - public EntityQueryProperty getPollCreatorProperty( + public EntityQueryProperty getPollAccountProperty( String alias) { return getEntityProperty(PollAccount.class, alias); } + public EntityQueryProperty getPollProperty(String alias) { + return getEntityProperty(Poll.class, alias); + } + public TopiaQuery createQueryFindFavoriteParticipantsByFavoriteList( Filter filter) { @@ -56,4 +61,19 @@ return query; } + public TopiaQuery createQueryFindVotesByPoll(Filter filter) { + + EntityQueryProperty accountProperty = getPollAccountProperty("A"); + + EntityQueryProperty pollProperty = getPollProperty("P"); + pollProperty.setPropertyJoin(Poll.POLL_ACCOUNT); + + createQueryFindElementsByCollection( + accountProperty, pollProperty, filter); + + query.addNotNull(accountProperty.nameProperty(PollAccount.VOTE_DATE)); + + return query; + } + } Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/entity/ChoiceImpl.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/entity/ChoiceImpl.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/entity/ChoiceImpl.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -1,6 +1,7 @@ package org.chorem.pollen.entity; +import org.apache.commons.lang.StringUtils; import org.chorem.pollen.common.ChoiceType; import org.chorem.pollen.votecounting.business.NumberMethod; @@ -30,13 +31,14 @@ } @Override - public boolean getHidden() { - return getName().startsWith(NumberMethod.HIDDEN_PREFIX); + public boolean isHidden() { + return StringUtils.isNotEmpty(name) && + name.startsWith(NumberMethod.HIDDEN_PREFIX); } @Override public void setHidden(boolean hidden) { - boolean previous = getHidden(); + boolean previous = isHidden(); if (hidden && !previous) { setName(NumberMethod.HIDDEN_PREFIX + name); } else if (!hidden && previous) { Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/service/ServiceVoteImpl.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/service/ServiceVoteImpl.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/service/ServiceVoteImpl.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -1,13 +1,20 @@ package org.chorem.pollen.service; +import org.chorem.pollen.EntityQueryProperty; import org.chorem.pollen.PollenContext; +import org.chorem.pollen.PollenDAOHelper; import org.chorem.pollen.PollenException; +import org.chorem.pollen.PollenQueryBuilder; +import org.chorem.pollen.bean.Filter; import org.chorem.pollen.entity.Poll; import org.chorem.pollen.entity.PollAccount; +import org.chorem.pollen.entity.PollAccountDAO; import org.chorem.pollen.entity.PollAccountImpl; import org.chorem.pollen.entity.UserAccount; +import org.chorem.pollen.entity.VoteDAO; import org.nuiton.topia.TopiaContext; import org.nuiton.topia.TopiaException; +import org.nuiton.topia.framework.TopiaQuery; import java.util.List; @@ -58,11 +65,35 @@ } @Override - protected List<PollAccount> executeGetVotes(TopiaContext transaction, Poll poll, int startIndex, int endIndex) throws Exception { - return null; + protected List<PollAccount> executeGetVotes(TopiaContext transaction, + Filter filter) + throws Exception { + + PollenQueryBuilder builder = context.newQueryBuilder(null); + + TopiaQuery query = builder.createQueryFindVotesByPoll(filter); + + PollAccountDAO dao = PollenDAOHelper.getPollAccountDAO(transaction); + + query.addLoad(PollAccount.CHOICE_VOTE); + + List<PollAccount> results = dao.findAllByQuery(query); + return results; } @Override + protected int executeGetNbVotes(TopiaContext transaction, Filter filter) + throws TopiaException { + + PollenQueryBuilder builder = context.newQueryBuilder(null); + + TopiaQuery query = builder.createQueryFindVotesByPoll(filter); + + int result = query.executeCount(transaction); + return result; + } + + @Override protected void executeDeleteVote(TopiaContext transaction, Poll poll, PollAccount participant) throws Exception { } } Modified: trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties =================================================================== --- trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties 2010-05-25 12:40:47 UTC (rev 3012) @@ -77,6 +77,7 @@ pollen.error.serviceUser.updateUser= pollen.error.serviceVote.canVote= pollen.error.serviceVote.deleteVote= +pollen.error.serviceVote.getNbVotes= pollen.error.serviceVote.getNewPollAccount= pollen.error.serviceVote.getPollAccount= pollen.error.serviceVote.getVote= Modified: trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties =================================================================== --- trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties 2010-05-25 12:40:47 UTC (rev 3012) @@ -76,6 +76,7 @@ pollen.error.serviceUser.updateUser= pollen.error.serviceVote.canVote= pollen.error.serviceVote.deleteVote= +pollen.error.serviceVote.getNbVotes= pollen.error.serviceVote.getNewPollAccount= pollen.error.serviceVote.getPollAccount= pollen.error.serviceVote.getVote= Modified: trunk/pollen-business/src/main/xmi/pollen.zargo =================================================================== (Binary files differ) Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Border.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Border.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Border.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -218,8 +218,7 @@ public String getServerPath() { if (serverPath == null) { - serverPath = "http://" + request.getHeader("host") + - request.getContextPath(); + serverPath = "http://" + request.getHeader("host"); if (logger.isDebugEnabled()) { logger.debug("URL : " + serverPath); } Added: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ChoiceImage.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ChoiceImage.java (rev 0) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ChoiceImage.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -0,0 +1,66 @@ +package org.chorem.pollen.ui.components; + +import org.apache.tapestry5.ClientElement; +import org.apache.tapestry5.ComponentResources; +import org.apache.tapestry5.Link; +import org.apache.tapestry5.MarkupWriter; +import org.apache.tapestry5.StreamResponse; +import org.apache.tapestry5.annotations.Log; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.annotations.SupportsInformalParameters; +import org.apache.tapestry5.corelib.base.AbstractLink; +import org.apache.tapestry5.dom.Element; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.chorem.pollen.ui.data.ChoiceField; +import org.chorem.pollen.ui.services.ServiceImage; +import org.slf4j.Logger; + +/** + * Created: 25 mai 2010 + * + * @author fdesbois <fdesbois@codelutin.com> + * @version $Id$ + */ +@SupportsInformalParameters +public class ChoiceImage extends AbstractLink { + + @Parameter(required = true) + private ChoiceField source; + + @Inject + private Logger logger; + + @Inject + private ComponentResources resources; + + @Inject + private ServiceImage serviceImage; + + void beginRender(MarkupWriter writer) { + + Link link = resources.createEventLink("showImage", + source.getImageFileName(), source.getImageDir(), false); + + Link thumbLink = resources.createEventLink("showImage", + source.getImageFileName(), source.getImageDir(), true); + + writeLink(writer, link, "rel", "lightbox[pollChoiceImages]"); + writer.element("img", "src", thumbLink, "alt", source.getDescription()); + writer.end(); + } + + /** + * Event for showing image. + * + * @param src of the image + * @param imageDir directory of the image + * @param thumb to show the thumb image or not + * @return the streamResponse to display + * @see ServiceImage#createImageStream(String, String, boolean) + */ + @Log + public StreamResponse onShowImage(String src, String imageDir, + boolean thumb) { + return serviceImage.createImageStream(src, imageDir, thumb); + } +} Property changes on: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ChoiceImage.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/data/ChoiceField.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/data/ChoiceField.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/data/ChoiceField.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -93,7 +93,7 @@ * Instantiate a new choiceField for a Date ChoiceType. * * @return the ChoiceField which is date typed - * @see #setDateType(java.lang.String) + * @see #setDateType() */ public static ChoiceField getChoiceDate() { ChoiceField result = new ChoiceField(); @@ -131,7 +131,7 @@ * Change type of the choice to date type. The date type need a {@code * pattern} to format the date when saving the choice. * - * @see #saveName() + * @see #saveName(ServiceImage) */ public void setDateType() { setChoiceType(ChoiceType.DATE); @@ -143,7 +143,7 @@ * of the choice as saving folder for the resulting image file. * * @param pollUId used as saving folder - * @see #saveName() + * @see #saveName(ServiceImage) */ public void setImageType(String pollUId) { setChoiceType(ChoiceType.IMAGE); @@ -262,5 +262,7 @@ return getChoice().getChoiceType(); } - + public boolean isHidden() { + return choice.isHidden(); + } } Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/data/PollUri.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/data/PollUri.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/data/PollUri.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -1,6 +1,8 @@ package org.chorem.pollen.ui.data; +import org.apache.commons.lang.StringUtils; + /** * PollUri * @@ -64,4 +66,8 @@ return uri; } + public boolean hasAccountUid() { + return StringUtils.isNotEmpty(accountUid); + } + } Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/PollFormModel.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/PollFormModel.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/PollFormModel.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -322,7 +322,10 @@ poll.clearChoice(); for (ChoiceField choiceField : getChoices()) { choiceField.saveName(serviceImage); - poll.addChoice(choiceField.getChoice()); + Choice choice = choiceField.getChoice(); + if (StringUtils.isNotEmpty(choice.getName())) { + poll.addChoice(choice); + } } poll = servicePoll.createPoll(poll, getLists()); } Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/UserAccountDataSource.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/UserAccountDataSource.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/UserAccountDataSource.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -15,10 +15,7 @@ * Created: 23 avr. 2010 * * @author fdesbois - * @version $Revision$ - * <p/> - * Mise a jour: $Date$ - * par : $Author$ + * @version $Id$ */ public class UserAccountDataSource extends AbstractMappedGridDataSource<String, UserAccount> { @@ -33,7 +30,8 @@ @Override protected Map<String, UserAccount> execute(int startIndex, int endIndex, - SortConstraint orderBy) throws PollenException { + SortConstraint orderBy) + throws PollenException { filter.setStartIndex(startIndex); filter.setEndIndex(endIndex); filter.setOrderBy(resolveOrderBy(orderBy)); Deleted: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/VoteModel.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/VoteModel.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/models/VoteModel.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -1,61 +0,0 @@ -package org.chorem.pollen.ui.models; - -import org.chorem.pollen.PollenBusinessException; -import org.chorem.pollen.entity.Poll; -import org.chorem.pollen.entity.PollAccount; -import org.chorem.pollen.entity.UserAccount; -import org.chorem.pollen.service.ServicePoll; -import org.chorem.pollen.service.ServiceVote; -import org.chorem.pollen.ui.data.PollUri; - -/** - * Created: 21 mai 2010 - * - * @author fdesbois <fdesbois@codelutin.com> - * @version $Id$ - */ -public class VoteModel { - - protected Poll poll; - - protected PollAccount account; - - protected ServicePoll servicePoll; - - protected ServiceVote serviceVote; - - public VoteModel(ServicePoll servicePoll, ServiceVote serviceVote) { - this.servicePoll = servicePoll; - } - - public void init(PollUri uri) - throws PollenBusinessException { - poll = servicePoll.getPoll(uri.getPollUid()); - account = serviceVote.getPollAccount(uri.getAccountUid()); - } - - public Poll getPoll() { - return poll; - } - - public boolean isCreatorUser(UserAccount user) { - return user.equals(poll.getCreator().getUserAccount()); - } - - public PollAccount getPollAccount() { - if (account == null) { - account = serviceVote.getNewPollAccount(); - } - return account; - } - - public boolean isAllowedToVote() { - if (poll.isFinished()) { - return false; - } - if (poll.getPollType().isRestrictedOrGroup() || poll.getAnonymous()) { - return serviceVote.canVote(poll, account); - } - return true; - } -} Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -28,7 +28,6 @@ import org.apache.tapestry5.EventContext; import org.apache.tapestry5.Link; import org.apache.tapestry5.StreamResponse; -import org.apache.tapestry5.annotations.Component; import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; import org.apache.tapestry5.annotations.IncludeStylesheet; import org.apache.tapestry5.annotations.InjectComponent; @@ -36,17 +35,15 @@ import org.apache.tapestry5.annotations.Parameter; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; -import org.apache.tapestry5.corelib.components.Zone; import org.apache.tapestry5.ioc.Messages; import org.apache.tapestry5.ioc.annotations.Inject; import org.chorem.pollen.PollenBusinessException; -import org.chorem.pollen.PollenBusinessException.PollenExceptionType; import org.chorem.pollen.PollenProperty; +import org.chorem.pollen.bean.Filter; import org.chorem.pollen.entity.Choice; -import org.chorem.pollen.entity.Comment; -import org.chorem.pollen.entity.CommentImpl; import org.chorem.pollen.entity.Poll; import org.chorem.pollen.entity.PollAccount; +import org.chorem.pollen.entity.UserAccount; import org.chorem.pollen.entity.Vote; import org.chorem.pollen.service.ServicePoll; import org.chorem.pollen.service.ServiceUser; @@ -56,11 +53,10 @@ import org.chorem.pollen.ui.components.Pager; import org.chorem.pollen.ui.data.AddressBar; import org.chorem.pollen.ui.data.ChoiceField; +import org.chorem.pollen.ui.data.EvenOdd; import org.chorem.pollen.ui.data.PollUri; -import org.chorem.pollen.ui.models.VoteModel; import org.chorem.pollen.ui.services.PollenManager; import org.chorem.pollen.ui.services.ServiceImage; -import org.nuiton.web.tapestry5.components.FeedBack; import org.slf4j.Logger; /** @@ -82,6 +78,14 @@ return border; } + @Parameter(defaultPrefix = BindingConstants.MESSAGE, value = "title") + @Property + private String title; + + @Property + private PollUri uri; + + /** Services injected */ @Inject private Logger logger; @@ -89,22 +93,10 @@ private Messages messages; @Inject - private PollenManager manager; + private Locale currentLocale; - @Property - private PollUri uri; - - /** TEMP : Affichage des messages pour l'utilisateur */ -// @Component(id = "feedback") -// private FeedBack feedback; - - @Parameter(defaultPrefix = BindingConstants.MESSAGE, value = "title") - @Property - private String title; - - /** Locale courante */ @Inject - private Locale currentLocale; + private PollenManager manager; @Inject private ServicePoll servicePoll; @@ -115,15 +107,13 @@ @Inject private ServiceVote serviceVote; - /** Compte du votant */ + /** Page properties */ + private Poll poll; + private PollAccount pollAccount; - /** Format des dates */ private DateFormat dateFormat; - @Persist - private VoteModel model; - /** * Address bar of the page. Display in Border layout component. * @@ -143,16 +133,15 @@ Object[] onPassivate() { return new Object[]{uri, page}; } - @Log void setupRender() { if (uri == null) { addFatal("Url null"); } else { - model = null; try { - getModel().init(uri); + getPoll(); + //pollAccount = serviceVote.getPollAccount(uri.getAccountUid()); } catch (PollenBusinessException eee) { // Poll not found String message = manager.getErrorMessage(logger, messages, eee); @@ -183,12 +172,7 @@ // } } - public VoteModel getModel() { - if (model != null) { - model = new VoteModel(servicePoll, serviceVote); - } - return model; - } + /************** POLL INFOS ************************************************/ /** * DateFormat used in the page. @@ -203,20 +187,33 @@ return dateFormat; } - public Poll getPoll() { - return getModel().getPoll(); + public Poll getPoll() throws PollenBusinessException { + if (poll == null) { + poll = servicePoll.getPoll(uri.getPollUid(), Poll.CHOICE); + } + return poll; } + public PollAccount getCreator() throws PollenBusinessException { + return getPoll().getCreator(); + } + /** * Use a PollAccount to represent the current session user. - * The existing account is used if accountUid is present in the uri. - * Otherwise a new account is instanciate with user properties - * (for vote name). + * The existing pollAccount is used if accountUid is present in the uri. + * Otherwise a new pollAccount is instanciate. * * @return */ - public PollAccount getPollAccount() throws PollenBusinessException { - return getModel().getPollAccount(); + public PollAccount getPollAccount() { + if (pollAccount == null) { + if (uri.hasAccountUid()) { + pollAccount = serviceVote.getPollAccount(uri.getAccountUid()); + } else { + pollAccount = serviceVote.getNewPollAccount(); + } + } + return pollAccount; } /** @@ -226,63 +223,15 @@ * @throws PollenBusinessException */ public boolean isCreatorUser() throws PollenBusinessException { - return isUserConnected() && getModel().isCreatorUser(getUserConnected()); + UserAccount creatorAccount = poll.getCreator().getUserAccount(); + return isUserConnected() && getUserConnected().equals(creatorAccount); } - /************** PAGER *****************************************************/ - - @InjectComponent - private Pager pager; - - private Integer page; - - @Persist - private Integer nbVotesPerPage; - - public int getPage() { - if (page == null) { - page = pager.getFirstPage(); - } - return page; + public String getHelpMessage() { + // Help message depends on voteCountingType + return ""; } - @Log - public void setPage(int page) { - this.page = page; - } - - /** - * Get the number of votes to display per page from configuration. - * - * @return the number of votes to display per page - */ - public int getNbVotesPerPage() { - if (nbVotesPerPage == null) { - nbVotesPerPage = getPagerRange(); - } - return nbVotesPerPage; - } - - public void setNbVotesPerPage(int nbVotesPerPage) { - this.nbVotesPerPage = nbVotesPerPage; - } - - public int getPagerRange() { - return Integer.parseInt( - manager.getProperty(PollenProperty.NB_VOTES_PER_PAGE)); - } - - public String getNoPagerText() throws PollenBusinessException { - // FIXME : manage nbVotes in Poll - -// if (getPoll().getNbVotes() == 0) { -// return messages.get("pollen.ui.vote.noVote"); -// } -// return messages.format("pollen.ui.vote.noPager", -// getPoll().getNbVotes()); - return ""; - } - /************** CHOICES ***************************************************/ private List<ChoiceField> choices; @@ -298,24 +247,27 @@ @Inject private Block choiceDate; +// +// private ChoiceField newChoice; +// +// @Inject +// private Block newChoiceText; +// +// @Inject +// private Block newChoiceImage; +// +// @Inject +// private Block newChoiceDate; - private ChoiceField newChoice; - @Inject - private Block newChoiceText; - - @Inject - private Block newChoiceImage; - - @Inject - private Block newChoiceDate; - - @Inject private ComponentResources resources; @Inject private ServiceImage serviceImage; + @Property + private EvenOdd evenOdd = new EvenOdd(); + /** * Get choices of the poll. The ChoiceDTO from poll will be converted * to ChoiceField to easily managed different type of choice (image, @@ -359,154 +311,229 @@ } } - /** - * Image link to show the miniature (thumb) of current choice image. - * - * @return the image link for current choice image. - */ - public Link getImageThumb() { - return getImageLink(true); - } +// /** +// * Image link to show the miniature (thumb) of current choice image. +// * +// * @return the image link for current choice image. +// */ +// public Link getImageThumb() { +// return getImageLink(true); +// } +// +// /** +// * Image link to show the normal (not thumb) image of current choice image. +// * +// * @return the image link for current choice image. +// */ +// public Link getImageLink() { +// return getImageLink(false); +// } +// +// private Link getImageLink(boolean thumb) { +// return resources.createEventLink("showImage", +// choice.getImageFileName(), choice.getImageDir(), thumb); +// } +// +// /** +// * Event for showing image. +// * +// * @param src of the image +// * @param imageDir directory of the image +// * @param thumb to show the thumb image or not +// * @return the streamResponse to display +// * @see ServiceImage#createImageStream(String, String, boolean) +// */ +// @Log +// public StreamResponse onShowImage(String src, String imageDir, +// boolean thumb) { +// return serviceImage.createImageStream(src, imageDir, thumb); +// } +// +// /** +// * Delegator : Retrieve the newChoice to create a choice in the poll +// * using the addChoice form. +// * +// * @return a ChoiceField to manage different choice type +// * @throws PollenBusinessException +// */ +// public ChoiceField getNewChoice() throws PollenBusinessException { +// if (newChoice == null) { +// newChoice = new ChoiceField(getPoll()); +//// switch (getPoll().getChoiceType()) { +//// case DATE: +//// newChoice = ChoiceField.getChoiceDate(); +//// break; +//// case IMAGE: +//// newChoice = ChoiceField.getChoiceImage( +//// getPoll().getPollUid()); +//// break; +//// case TEXT: +//// default: +//// newChoice = ChoiceField.getChoiceText(); +//// } +// // Don't know what validate is +//// newChoice.setValidate(true); +// } +// return newChoice; +// } +// +// /** +// * Retrieve the block to display for input choiceName depends on +// * choice type. +// * +// * @return the block to display +// * @throws PollenBusinessException +// */ +//// public Block getNewChoiceBlock() throws PollenBusinessException { +//// switch(getPoll().getChoiceType()) { +//// case IMAGE: +//// return newChoiceImage; +//// case DATE: +//// return newChoiceDate; +//// case TEXT: +//// default: +//// return newChoiceText; +//// } +//// } +// +// public boolean isPollChoiceRunning() throws PollenBusinessException { +// return getPoll().getChoiceAddAllowed() && isPollChoiceStarted(); +// } +// +// /** +// * TODO : whithout DTO, this method can be place in PollEntity +// * +// * @return true if adding choice is started, false otherwise +// * @throws PollenBusinessException +// */ +// public boolean isPollChoiceStarted() throws PollenBusinessException { +// Date now = new Date(); +// boolean started = getPoll().getBeginChoiceDate() == null +// || getPoll().getBeginChoiceDate().before(now); +// boolean ended = getPoll().getEndChoiceDate() != null +// && getPoll().getEndChoiceDate().before(now); +// return started && !ended; +// } +// +// public boolean getCanDeleteChoice() throws PollenBusinessException { +// return isPollChoiceRunning() && isCreatorUser(); +// } +// +// /** +// * ACTION EVENT :: delete selected choice +// */ +// void onActionFromDeleteChoice(String choiceId) +// throws PollenBusinessException { +// if (getCanDeleteChoice()) { +// +//// servicePoll.deleteChoice(getPoll(), choiceId); +// // Reset choices (ChoiceField list) to retrieve the updated one +// // from poll +// choices = null; +// } +// } +// +// public boolean getCanAddChoice() throws PollenBusinessException { +// return isPollChoiceRunning(); +// } +// +// /** +// * SUCCESS EVENT :: add a new choice from addChoice form. +// * +// * @throws PollenBusinessException +// */ +// void onSuccessFromAddChoice() throws PollenBusinessException { +// if (getCanAddChoice()) { +// // No validation done on choice with existing name +// // Save name depends on choice type +// newChoice.saveName(serviceImage); +// //getPoll().addChoice(newChoice.getChoice()); +// } +// } - /** - * Image link to show the normal (not thumb) image of current choice image. - * - * @return the image link for current choice image. - */ - public Link getImageLink() { - return getImageLink(false); - } + /************** PAGER *****************************************************/ - private Link getImageLink(boolean thumb) { - return resources.createEventLink("showImage", - choice.getImageFileName(), choice.getImageDir(), thumb); + @InjectComponent + private Pager pager; + + private Integer page; + + @Persist + private Integer nbVotesPerPage; + + private Integer nbVotes; + + public int getPage() { + if (page == null) { + page = pager.getFirstPage(); + } + return page; } - /** - * Event for showing image. - * - * @param src of the image - * @param imageDir directory of the image - * @param thumb to show the thumb image or not - * @return the streamResponse to display - * @see ServiceImage#createImageStream(String, String, boolean) - */ @Log - public StreamResponse onShowImage(String src, String imageDir, - boolean thumb) { - return serviceImage.createImageStream(src, imageDir, thumb); + public void setPage(int page) { + this.page = page; } - + /** - * Delegator : Retrieve the newChoice to create a choice in the poll - * using the addChoice form. + * Get the number of votes to display per page from configuration. * - * @return a ChoiceField to manage different choice type - * @throws PollenBusinessException + * @return the number of votes to display per page */ - public ChoiceField getNewChoice() throws PollenBusinessException { - if (newChoice == null) { - newChoice = new ChoiceField(getPoll()); -// switch (getPoll().getChoiceType()) { -// case DATE: -// newChoice = ChoiceField.getChoiceDate(); -// break; -// case IMAGE: -// newChoice = ChoiceField.getChoiceImage( -// getPoll().getPollUid()); -// break; -// case TEXT: -// default: -// newChoice = ChoiceField.getChoiceText(); -// } - // Don't know what validate is -// newChoice.setValidate(true); + public int getNbVotesPerPage() { + if (nbVotesPerPage == null) { + nbVotesPerPage = getPagerRange(); } - return newChoice; + return nbVotesPerPage; } - /** - * Retrieve the block to display for input choiceName depends on - * choice type. - * - * @return the block to display - * @throws PollenBusinessException - */ -// public Block getNewChoiceBlock() throws PollenBusinessException { -// switch(getPoll().getChoiceType()) { -// case IMAGE: -// return newChoiceImage; -// case DATE: -// return newChoiceDate; -// case TEXT: -// default: -// return newChoiceText; -// } -// } - - public boolean isPollChoiceRunning() throws PollenBusinessException { - return getPoll().getChoiceAddAllowed() && isPollChoiceStarted(); + public void setNbVotesPerPage(int nbVotesPerPage) { + this.nbVotesPerPage = nbVotesPerPage; } - /** - * TODO : whithout DTO, this method can be place in PollEntity - * - * @return true if adding choice is started, false otherwise - * @throws PollenBusinessException - */ - public boolean isPollChoiceStarted() throws PollenBusinessException { - Date now = new Date(); - boolean started = getPoll().getBeginChoiceDate() == null - || getPoll().getBeginChoiceDate().before(now); - boolean ended = getPoll().getEndChoiceDate() != null - && getPoll().getEndChoiceDate().before(now); - return started && !ended; + public int getPagerRange() { + return Integer.parseInt( + manager.getProperty(PollenProperty.NB_VOTES_PER_PAGE)); } - public boolean getCanDeleteChoice() throws PollenBusinessException { - return isPollChoiceRunning() && isCreatorUser(); - } - - /** - * ACTION EVENT :: delete selected choice - */ - void onActionFromDeleteChoice(String choiceId) - throws PollenBusinessException { - if (getCanDeleteChoice()) { - -// servicePoll.deleteChoice(getPoll(), choiceId); - // Reset choices (ChoiceField list) to retrieve the updated one - // from poll - choices = null; + public int getNbVotes() throws PollenBusinessException { + if (nbVotes == null) { + Filter filter = new Filter(); + filter.setReference(getPoll()); + nbVotes = serviceVote.getNbVotes(filter); } + return nbVotes; } - public boolean getCanAddChoice() throws PollenBusinessException { - return isPollChoiceRunning(); + @Log + public Filter getVoteFilter() throws PollenBusinessException { + Filter filter = new Filter(); + filter.setStartIndex(pager.getStartIndex()); + filter.setEndIndex(pager.getEndIndex()); + filter.setReference(getPoll()); + return filter; } - /** - * SUCCESS EVENT :: add a new choice from addChoice form. - * - * @throws PollenBusinessException - */ - void onSuccessFromAddChoice() throws PollenBusinessException { - if (getCanAddChoice()) { - // No validation done on choice with existing name - // Save name depends on choice type - newChoice.saveName(serviceImage); - //getPoll().addChoice(newChoice.getChoice()); - } + public String getNoPagerText() throws PollenBusinessException { + // FIXME : manage nbVotes in Poll + +// if (getPoll().getNbVotes() == 0) { +// return messages.get("pollen.ui.vote.noVote"); +// } +// return messages.format("pollen.ui.vote.noPager", +// getPoll().getNbVotes()); + return ""; } /************** VOTES *****************************************************/ - private List<Vote> votes; + private List<PollAccount> participants; @Property - private int voteIndex; + private int participantIndex; - private Vote currentVote; + @Property + private PollAccount participant; /** * Retrieve votes of the current poll from business module. @@ -516,19 +543,16 @@ * @return the list of votes to display * @throws PollenBusinessException */ - public List<Vote> getVotes() throws PollenBusinessException { - if (votes == null) { -// votes = servicePoll.getVotes(getPoll(), -// pager.getStartIndex(), pager.getEndIndex()); + public List<PollAccount> getParticipants() throws PollenBusinessException { + if (participants == null) { + participants = serviceVote.getVotes(getVoteFilter()); } - return votes; + return participants; } - public Vote getCurrentVote() { - if (currentVote == null) { -// currentVote = serviceVote.getNewVote(getPollAccount()); - } - return currentVote; + public Vote getVote() { + Vote vote = participant.getChoiceVote(choice.getChoice()); + return vote; } // /** @@ -557,11 +581,17 @@ // } public boolean getCanVote() { - return getModel().isAllowedToVote(); + if (poll.isFinished()) { + return false; + } + if (poll.getPollType().isRestrictedOrGroup() || poll.getAnonymous()) { + return serviceVote.canVote(poll, pollAccount); + } + return true; } public boolean canEditVote() throws PollenBusinessException { - // If the current account exist from uri and equals to the current vote + // If the current pollAccount exist from uri and equals to the current vote // String newAccountId = getPollAccount().getId(); // if (newAccountId != null && // newAccountId.equals(vote.getPollAccountId())) { Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ServiceImage.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ServiceImage.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ServiceImage.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -1,8 +1,10 @@ package org.chorem.pollen.ui.services; +import org.apache.tapestry5.Link; import org.apache.tapestry5.StreamResponse; import org.apache.tapestry5.upload.services.UploadedFile; +import org.chorem.pollen.ui.data.ChoiceField; /** * This service is used to manage images in pollen application. @@ -59,5 +61,4 @@ * @return the filename of the saved file */ String saveImage(UploadedFile tmpfile, String filedir); - } Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ServiceImageImpl.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ServiceImageImpl.java 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ServiceImageImpl.java 2010-05-25 12:40:47 UTC (rev 3012) @@ -13,11 +13,13 @@ import javax.imageio.ImageIO; import javax.swing.ImageIcon; import org.apache.commons.lang.StringUtils; +import org.apache.tapestry5.Link; import org.apache.tapestry5.StreamResponse; import org.apache.tapestry5.services.Response; import org.apache.tapestry5.upload.services.UploadedFile; import org.chorem.pollen.PollenProperty; import org.chorem.pollen.PollenContext; +import org.chorem.pollen.ui.data.ChoiceField; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Modified: trunk/pollen-ui/src/main/webapp/poll/VoteForPoll.tml =================================================================== --- trunk/pollen-ui/src/main/webapp/poll/VoteForPoll.tml 2010-05-25 09:29:17 UTC (rev 3011) +++ trunk/pollen-ui/src/main/webapp/poll/VoteForPoll.tml 2010-05-25 12:40:47 UTC (rev 3012) @@ -3,7 +3,7 @@ <html t:type="border" t:addressBar="addressBar" t:pageLogo="literal:Vote" t:feedFilename="prop:uri.pollUid" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> - <t:if test="poll"> + <h1 class="titleVote">${poll.title}</h1> <!-- Informations sur le sondage --> @@ -13,18 +13,18 @@ <legend>${message:about}</legend> <div style="float: right"> <t:if test="poll.publicResults"> - <a t:type="pagelink" t:page="poll/Results" t:context="poll.pollUid"> + <a t:type="pagelink" t:page="poll/Results" t:context="poll.uid"> <img src="${asset:context:img/count.png}" title="${message:results-help}" alt="${message:results}"/> </a> </t:if> - <t:FeedContextLink t:id="feedContext" /> - <t:if test="feedFileExisting"> - <t:FileLink filename="${poll.pollUid}" type="literal:application/atom+xml" t:context="feedContext"> - <img src="${asset:context:img/feed.png}" title="Atom" alt="Atom"/> - </t:FileLink> - </t:if> + <!--<t:FeedContextLink t:id="feedContext" />--> + <!--<t:if test="feedFileExisting">--> + <!--<t:FileLink filename="${poll.pollUid}" type="literal:application/atom+xml" t:context="feedContext">--> + <!--<img src="${asset:context:img/feed.png}" title="Atom" alt="Atom"/>--> + <!--</t:FileLink>--> + <!--</t:if>--> </div> - <label>${message:creator-label}</label> ${poll.creatorName} + <label>${message:creator-label}</label> ${creator.name} <br/> <label>${message:beginDate-label}</label> <t:output value="poll.beginDate" format="dateFormat"/> @@ -32,7 +32,7 @@ <label>${message:endDate-label}</label> <t:output value="poll.endDate" format="dateFormat"/> <br/> - <label>${message:pollType-label}</label> ${poll.voteCounting} + <label>${message:pollType-label}</label> ${poll.voteCountingType} <span t:type="ck/Tooltip" title="${message:help}" value="${helpMessage}" effect="appear"> <img src="${asset:context:img/help.png}" alt="${message:help}"/> </span> @@ -41,50 +41,51 @@ <!--<t:if test="pollChoiceOrVoteStarted">--> - <!--<!– Sondage –>--> + <!-- Sondage --> - <!--<!–<t:zone t:id="pollZone" t:show="show" t:update="show">–>--> - <!--<t:if t:test="poll.anonymous">--> - <!--<p>${voteSizeMessage}</p>--> + <!--<t:zone t:id="pollZone" t:show="show" t:update="show">--> + <t:if t:test="poll.anonymous"> + <p>${format:vote-size=nbVotes}</p> <!--<t:feedback t:id="voteFeedback"/>--> - <!--<p:else>--> - <!--<t:pager t:nbRowsPerPage="nbVotesPerPage" t:nbTotalRows="poll.nbVotes"--> - <!--t:currentPage="page" t:noPagerText="prop:noPagerText" t:range="pagerRange"/>--> - <!--</p:else>--> - <!--</t:if>--> - <!--<t:form t:id="voteForm" t:zone="pollZone">--> - <!--<table id="poll">--> - <!--<thead>--> - <!--<tr>--> - <!--<t:if test="${AccountFieldDisplayed}">--> - <!--<th style="width:200px;">${message:voterName}</th>--> + <p:else> + <t:pager t:nbRowsPerPage="nbVotesPerPage" t:nbTotalRows="nbVotes" + t:currentPage="page" t:noPagerText="prop:noPagerText" t:range="pagerRange"/> + </p:else> + </t:if> + <t:form t:id="voteForm"> + <table id="poll"> + <thead> + <tr> + <!--<t:if test="accountFieldDisplayed">--> + <th style="width:200px;">${message:voterName}</th> <!--<p:else>--> <!--<th></th>--> <!--</p:else>--> <!--</t:if>--> - <!--<th t:type="loop" t:source="choices" t:value="choice" t:volatile="true">--> - <!--<t:unless test="choice.hidden">--> - <!--<!– Blocks for each choice type –>--> - <!--<t:block t:id="choiceText">--> - <!--<span class="desc">${choice.text}</span>--> - <!--</t:block>--> - <!--<t:block t:id="choiceImage">--> + <th t:type="loop" t:source="choices" t:value="choice" t:volatile="true"> + <t:unless test="choice.hidden"> + <!-- Blocks for each choice type --> + <t:block t:id="choiceText"> + <span class="desc">${choice.text}</span> + </t:block> + <t:block t:id="choiceImage"> + <t:choiceImage t:source="choice" /> <!--<a rel="lightbox[pollChoiceImages]" href="${imageLink}">--> <!--<img src="${imageThumb}" alt="${choice.description}"/>--> <!--</a>--> - <!--</t:block>--> - <!--<t:block t:id="choiceDate">--> - <!--<t:output value="choice.date" format="dateFormat"/>--> - <!--</t:block>--> - <!--<!– Display choice with or whithout description –>--> - <!--<t:if t:test="choice.description">--> - <!--<span t:type="ck/Tooltip" t:value="choice.description" t:effect="blind">--> - <!--<t:delegate to="choiceBlock" />--> - <!--</span>--> - <!--<p:else>--> - <!--<t:delegate to="choiceBlock" />--> - <!--</p:else>--> - <!--</t:if>--> + </t:block> + <t:block t:id="choiceDate"> + <t:output value="choice.date" format="dateFormat"/> + </t:block> + <!-- Display choice with or whithout description --> + <t:if t:test="choice.description"> + <span t:type="ck/Tooltip" t:value="choice.description" t:effect="blind"> + <t:delegate to="choiceBlock" /> + </span> + <p:else> + <t:delegate to="choiceBlock" /> + </p:else> + </t:if> <!--<t:if test="canDeleteChoice">--> <!--<!– Action to delete the choice –>--> <!--<t:actionlink t:id="deleteChoice" context="choice.id"--> @@ -93,10 +94,10 @@ <!--alt="message:pollen.ui.choice.delete.title"/>--> <!--</t:actionlink>--> <!--</t:if>--> - <!--</t:unless>--> - <!--</th>--> - <!--</tr>--> - <!--</thead>--> + </t:unless> + </th> + </tr> + </thead> <!--<t:if test="canVote">--> <!--<tfoot>--> <!--<tr>--> @@ -109,7 +110,7 @@ <!--</p:else>--> <!--</t:if>--> <!--<t:loop t:source="choices" t:value="choice" volatile="true">--> - <!--<t:if test="!choice.hidden">--> + <!--<t:unless test="choice.hidden">--> <!--<th>--> <!--<t:if test="poll.voteCounting.normal">--> <!--<input t:type="checkbox" value="addChoice" />--> @@ -124,23 +125,23 @@ <!--<t:textField t:value="addNumberVote" size="3" />--> <!--</t:if>--> <!--</th>--> - <!--</t:if>--> + <!--</t:unless>--> <!--</t:loop>--> <!--</tr>--> <!--</tfoot>--> <!--</t:if>--> - <!--<tbody>--> - <!--<t:unless t:test="poll.anonymous">--> - <!--<t:loop t:source="votes" t:value="vote" t:rowIndex="voteIndex" volatile="true">--> - <!--<tr>--> - <!--<td class="${evenodd.next}">--> - <!--<t:if test="${AccountFieldDisplayed}">--> - <!--<t:unless test="${currentVoteAnonymous}">--> - <!--${vote.name}--> - <!--<p:else>--> - <!--?--> - <!--</p:else>--> - <!--</t:unless>--> + <tbody> + <t:unless t:test="poll.anonymous"> + <t:loop t:source="participants" t:value="participant" t:rowIndex="participantIndex" volatile="true"> + <tr> + <td class="${evenodd.next}"> + <!--<t:if test="accountFieldDisplayed">--> + <t:if test="participant.anonymous"> + ? + <p:else> + ${participant.name} + </p:else> + </t:if> <!--</t:if>--> <!--<t:unless test="${poll.anonymous}">--> <!--<t:if test="canEditVote()">--> @@ -154,21 +155,24 @@ <!--</t:actionlink>--> <!--</t:if>--> <!--</t:unless>--> - <!--</td>--> - <!--<t:loop t:source="poll.choices" t:value="choiceOfPoll" volatile="true">--> - <!--<t:unless t:test="choiceHidden">--> + </td> + <t:loop t:source="choices" t:value="choice" volatile="true"> + <t:unless t:test="choice.hidden"> <!--${setCurrentVoteChoice()}--> - <!--<t:if t:test="poll.anonymous">--> - <!--<td class="anonymous">?</td>--> - <!--<p:else>--> - <!--<t:if test="isNormalVoteCounting()">--> - <!--<t:if test="isChoiceInVote(currentVoteChoice)">--> - <!--<td class="voted">OK</td>--> - <!--<p:else>--> - <!--<td class="notVoted"></td>--> - <!--</p:else>--> - <!--</t:if>--> - <!--</t:if>--> + <t:if t:test="poll.anonymous"> + <td class="anonymous">?</td> + <p:else> + <t:if test="vote"> + <t:if test="poll.voteCountingType.normal"> + <td class="voted">OK</td> + <p:else> + <td class="voted">${vote.voteValue}</td> + </p:else> + </t:if> + <p:else> + <td class="notVoted"></td> + </p:else> + </t:if> <!--<t:if test="isPercentageVoteCounting()">--> <!--<t:if test="isChoiceInVote(currentVoteChoice)">--> <!--<td class="voted">${currentVoteChoice.value} %</td>--> @@ -193,13 +197,13 @@ <!--</p:else>--> <!--</t:if>--> <!--</t:if>--> - <!--</p:else>--> - <!--</t:if>--> - <!--</t:unless>--> - <!--</t:loop>--> - <!--</tr>--> - <!--</t:loop>--> - <!--</t:unless>--> + </p:else> + </t:if> + </t:unless> + </t:loop> + </tr> + </t:loop> + </t:unless> <!--<t:if test="poll.continuousResults">--> <!--<tr>--> <!--<td>--> @@ -212,11 +216,11 @@ <!--</t:loop>--> <!--</tr>--> <!--</t:if>--> - <!--</tbody>--> - <!--</table>--> - <!--<div id="voteError">--> - <!--<t:errors/>--> - <!--</div>--> + </tbody> + </table> + <div id="voteError"> + <t:errors/> + </div> <!--<t:if test="poll.running">--> <!--<div id="buttons">--> <!--<t:if test="anonymousVoteDisplayed">--> @@ -227,8 +231,9 @@ <!--<input t:id="submitVote" t:type="Submit" t:value="${message:submitVote}" />--> <!--</div>--> <!--</t:if>--> - <!--</t:form>--> - <!--<!–</t:zone>–>--> + </t:form> + <!--</t:zone>--> + <!--</t:if>--> <!--<!– Ajout de choix –>--> @@ -311,5 +316,5 @@ <!--</t:zone>--> <!--</t:if>--> - </t:if> + </html> \ No newline at end of file
participants (1)
-
fdesbois@users.chorem.org