Permalink
Browse files

Fixed ENCUESTAME-421

  • Loading branch information...
1 parent 85ff2ef commit 933944c9a6582cae28458c97c0c9abd3ad214a9a Juan Picado committed Apr 4, 2012
@@ -70,7 +70,7 @@ public String pollController(final ModelMap model,
}
/**
- *
+ * Display the succesfully vote interface.
* @param model
* @return
*/
@@ -109,21 +109,21 @@ public String submit(
final Boolean checkBannedIp = checkIPinBlackList(IP);
if (checkBannedIp) {
//if banned send to banned view.
- pathVote ="banned";
+ pathVote ="poll/banned";
} else {
//
final Poll poll = getPollService().getPollById(itemId);
final PollResult result = getPollService().validatePollIP(IP, poll);
if (result == null) {
getPollService().vote(itemId, slugName, IP, responseId);
} else {
- pathVote = "repeated";
+ pathVote = "poll/repeated";
}
}
} catch (EnMeNoResultsFoundException e) {
log.error("error poll vote "+e);
e.printStackTrace();
- pathVote ="badVote";
+ pathVote ="poll/bad";
}
log.debug("poll vote path: "+pathVote);
return pathVote;
@@ -232,4 +232,6 @@ tweetpoll.votes.link = Go to results
###############################
poll.votes.link = Go Home
-poll.votes.thanks = Thanks for your vote
+poll.votes.thanks = Thanks for your vote
+poll.votes.repeated = Oh oh !! Your vote is repeated
+poll.votes.bad = Something is wrong with your vote, please try again.
@@ -230,4 +230,6 @@ tweetpoll.votes.link = Ir a resultados
###############################
poll.votes.link = Ir al Inicio
-poll.votes.thanks = Gracias por tu voto
+poll.votes.thanks = Gracias por tu voto
+poll.votes.repeated = Oh oh !! Ya has votado, no puedes repetir tu voto
+poll.votes.bad = Algo malo ha ocurrido con tu voto, porfavor intentalo otra vez
@@ -26,6 +26,16 @@
<put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}bad-voted.jsp" />
</definition>
+ <definition name="poll/banned" extends="main-vote">
+ <put-attribute name="title" value="Bad Voted | encuestame" />
+ <put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}bad-voted.jsp" />
+ </definition>
+
+ <definition name="poll/repeated" extends="main-vote">
+ <put-attribute name="title" value="Repeated Voted | encuestame" />
+ <put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}repeated-voted.jsp" />
+ </definition>
+
<definition name="poll/list" extends="page">
<put-attribute name="title" value="Poll | encuestame" />
<put-attribute name="menu" expression="/WEB-INF/jsp/includes/${currentDevice.mobile ? 'mobile/' : 'web/'}menu.jsp" />
@@ -2,7 +2,7 @@
<article class="web-wrapper-detail web-poll-wrapper-vote">
<div class="web-poll-vote final bad">
<article class="emne-box">
- <spring:message code="poll.votes.thanks" />
+ <spring:message code="poll.votes.bad" />
<div class="link">
<a href="<%=request.getContextPath()%>/home">
<spring:message code="poll.votes.link" />
@@ -0,0 +1,13 @@
+<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp"%>
+<article class="web-wrapper-detail web-poll-wrapper-vote">
+ <div class="web-poll-vote final repeated">
+ <article class="emne-box">
+ <spring:message code="poll.votes.repeated" />
+ <div class="link">
+ <a href="<%=request.getContextPath()%>/home">
+ <spring:message code="poll.votes.link" />
+ </a>
+ </div>
+ </article>
+ </div>
+</article>
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
-
-<tiles-definitions>
-
- <definition name="poll/detail" extends="page">
- <put-attribute name="title" value="Poll | encuestame" />
- <put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}poll.jsp" />
- <put-attribute name="extra-js" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}detail-js.jsp" />
- </definition>
-
-
- <definition name="poll/vote" extends="main-vote">
- <put-attribute name="title" value="Poll Vote | encuestame" />
- <put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}vote.jsp" />
- <put-attribute name="extra-js" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}vote-js.jsp" />
- </definition>
-
- <definition name="poll/voted" extends="main-vote">
- <put-attribute name="title" value="Voted | encuestame" />
- <put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}voted.jsp" />
- </definition>
-
- <definition name="poll/bad" extends="main-vote">
- <put-attribute name="title" value="Voted | encuestame" />
- <put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}bad-voted.jsp" />
- </definition>
-
- <definition name="poll/list" extends="page">
- <put-attribute name="title" value="Poll | encuestame" />
- <put-attribute name="menu" expression="/WEB-INF/jsp/includes/${currentDevice.mobile ? 'mobile/' : 'web/'}menu.jsp" />
- <put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}poll-list.jsp" />
- <put-attribute name="extra-js" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}list-js.jsp" />
- </definition>
-
- <definition name="poll/new" extends="page">
- <put-attribute name="title" value="New Poll | encuestame" />
- <put-attribute name="menu" expression="/WEB-INF/jsp/includes/${currentDevice.mobile ? 'mobile/' : 'web/'}menu.jsp" />
- <put-attribute name="content" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}new.jsp" />
- <put-attribute name="extra-js" expression="/WEB-INF/views/poll/${currentDevice.mobile ? 'mobile/' : 'web/'}new-js.jsp" />
- </definition>
-
-</tiles-definitions>

0 comments on commit 933944c

Please sign in to comment.