Author: tchemit Date: 2012-08-13 16:08:57 +0200 (Mon, 13 Aug 2012) New Revision: 3610 Url: http://chorem.org/repositories/revision/pollen/3610 Log: fixes #766: Add undefined label on poll vote/result page on begin-end date like in poll tables refs #746 (stop using uriId instead of pollUri + no more inheritance just to have PollUri securityModel does it for us) Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/result.jsp trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/result.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/result.jsp 2012-08-13 14:07:20 UTC (rev 3609) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/result.jsp 2012-08-13 14:08:57 UTC (rev 3610) @@ -96,13 +96,11 @@ </s:a> </s:if> </div> - <s:label value="%{poll.creator.votingId}" - key='pollen.common.pollCreator'/> - <s:label value="%{poll.beginDate}" key='pollen.common.beginDate'/> - <s:label value="%{poll.endDate}" - label='%{getText("pollen.common.endDate")}'/> + <s:label value="%{pollCreatorName}" key='pollen.common.pollCreator'/> + <s:label value="%{pollBeginDate}" key='pollen.common.beginDate'/> + <s:label value="%{pollEndDate}" key='pollen.common.endDate'/> <s:label value="%{voteCountingTypeName}" - label='%{getText("pollen.common.voteCountingType")}' + key='pollen.common.voteCountingType' tooltip="%{voteCountingTypeHelp}" tooltipIconPath="/img/tooltip.png"/> </fieldset> Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp 2012-08-13 14:07:20 UTC (rev 3609) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp 2012-08-13 14:08:57 UTC (rev 3610) @@ -64,27 +64,24 @@ function openDeleteCommentDialog(commentId) { return openConfirmDialog( "<s:property value='%{deleteCommentTitle}'/>", - $.prepareUrl("<s:url action='confirmDeleteComment' namespace='/poll'/>", - { uriId:"<s:property value='%{uriId}'/>", - commentId:commentId}) + $.prepareUrl("<s:url action='confirmDeleteComment/%{pollUri}' namespace='/poll'/>", + {commentId:commentId}) ); } function openDeleteVoteDialog(voteId) { return openConfirmDialog( "<s:property value='%{deleteCommentVote}'/>", - $.prepareUrl("<s:url action='confirmDeleteVote' namespace='/poll'/>", - {uriId:"<s:property value='%{uriId}'/>", - voteId:voteId}) + $.prepareUrl("<s:url action='confirmDeleteVote/%{pollUri}' namespace='/poll'/>", + {voteId:voteId}) ); } function openDeleteChoiceDialog(choiceId) { return openConfirmDialog( "<s:property value='%{deleteCommentChoice}'/>", - $.prepareUrl("<s:url action='confirmDeleteChoice' namespace='/poll'/>", - {uriId:"<s:property value='%{uriId}'/>", - choiceId:choiceId}) + $.prepareUrl("<s:url action='confirmDeleteChoice/%{pollUri}' namespace='/poll'/>", + {choiceId:choiceId}) ); } @@ -144,11 +141,11 @@ </s:a> </s:if> </div> - <s:label value="%{creatorName}" key='pollen.common.pollCreator'/> - <s:label value="%{poll.beginDate}" key='pollen.common.beginDate'/> - <s:label value="%{poll.endDate}" key='pollen.common.endDate'/> + <s:label value="%{pollCreatorName}" key='pollen.common.pollCreator'/> + <s:label value="%{pollBeginDate}" key='pollen.common.beginDate'/> + <s:label value="%{pollEndDate}" key='pollen.common.endDate'/> <s:label value="%{voteCountingTypeName}" - label='%{getText("pollen.common.voteCountingType")}' + key='pollen.common.voteCountingType' tooltip="%{voteCountingTypeHelp}" tooltipIconPath="/img/tooltip.png"/> </fieldset> @@ -175,7 +172,7 @@ </s:else> <s:form id="voteForm" validate="true"> -<s:hidden key="uriId" label=''/> +<s:hidden key="pollUri" label=''/> <table id="poll"> <thead> <tr> @@ -203,7 +200,7 @@ </s:else> <s:if test="pollChoiceRunning"> <s:if test="creatorOrAdmin"> - <s:a action="deleteChoice" namespace="/poll" + <s:a action="deleteChoice/%{pollUri}" namespace="/poll" onclick="return openDeleteChoiceDialog('%{#choice.topiaId}');"> <s:param name="choiceId"><s:property value="id"/></s:param> <img src="<s:url value="/img/delete.png"/>" @@ -316,16 +313,15 @@ </s:else> </s:if> <s:if test="isModifyVoteAllowed(#vote)"> - <s:a action="editVote" namespace="/poll"> - <s:param name="pollId" value="%{pollId}"/> - <s:param name="accountId" value="%{#vote.pollAccount.accountId}"/> + <s:a action="votefor/%{poll.pollId}:%{#vote.pollAccount.accountId}" + namespace="/poll"> <img src="<s:url value="/img/editSmall.png"/>" title="<s:text name="pollen.action.editVote"/>" alt="<s:text name="pollen.action.editVote"/>"/> </s:a> </s:if> <s:if test="isDeleteVoteAllowed(#vote)"> - <s:a action="deleteVote" namespace="/poll" href="#" + <s:a action="deleteVote/%{pollUri}" namespace="/poll" href="#" onclick="return openDeleteVoteDialog('%{#vote.topiaId}');"> <img src="<s:url value="/img/delete.png"/>" title="<s:text name="pollen.action.deleteVote"/>" @@ -386,7 +382,7 @@ label='%{getText("pollen.common.voteAnonymous")}'/> <br/> </s:if> - <s:submit action="vote/%{uriId}" key="pollen.action.pollVote" + <s:submit action="vote/%{pollUri}" key="pollen.action.pollVote" align="center"/> </div> </s:if> @@ -424,7 +420,7 @@ <br/> <div class="cleanBoth"> - <s:submit action="addChoice/%{uriId}" key="pollen.action.addChoice" + <s:submit action="addChoice/%{pollUri}" key="pollen.action.addChoice" align="center"/> </div> </s:form> @@ -451,7 +447,7 @@ label="%{getText('pollen.common.commentText')}"/> <div class="cleanBoth"> - <s:submit action="addComment/%{uriId}" key="pollen.action.addComment" + <s:submit action="addComment/%{pollUri}" key="pollen.action.addComment" align="center"/> </div> </s:form>