Author: tchemit Date: 2012-09-19 10:25:53 +0200 (Wed, 19 Sep 2012) New Revision: 3692 Url: http://chorem.org/repositories/revision/pollen/3692 Log: factorize poll information ui fragment Added: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp trunk/pollen-ui-struts2/src/main/webapp/css/pollInformation.css 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 trunk/pollen-ui-struts2/src/main/webapp/css/results.css trunk/pollen-ui-struts2/src/main/webapp/css/vote.css Added: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp (rev 0) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp 2012-09-19 08:25:53 UTC (rev 3692) @@ -0,0 +1,70 @@ +<%-- + #%L + Pollen :: UI (struts2) + $Id$ + $HeadURL$ + %% + Copyright (C) 2009 - 2012 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@ page contentType="text/html" language="java" %> +<%@ taglib prefix="s" uri="/struts-tags" %> +<div id="pollInformationTop"> + <div style="white-space:pre-wrap; text-align: start;"> + <s:property value="poll.description"/> + </div> + <fieldset> + <legend><s:text name="pollen.common.aboutPoll"/></legend> + <div style="float: right"> + <s:if test="creatorOrAdmin"> + <s:a href="%{summaryUrl}"> + <img src="<s:url value='/img/editSmall.png'/>" + title="<s:text name='pollen.action.summaryPoll'/>" + alt="<s:text name='pollen.action.summaryPoll'/>"/> + </s:a> + </s:if> + <s:if test="#showVoteUrl"> + <s:a href='%{voteUrl}'> + <img src="<s:url value='/img/vote.png'/>" + title="<s:text name="pollen.common.vote.return-help"/>" + alt="<s:text name="pollen.common.vote.return"/>"/> + </s:a> + </s:if> + <s:if test="#showResultUrl"> + <s:if test="resultAllowed"> + <s:a href="%{resultUrl}"> + <img src="<s:url value='/img/count.png'/>" + title="<s:text name='pollen.common.vote.results-help'/>" + alt="<s:text name='pollen.common.vote.results'/>"/> + </s:a> + </s:if> + </s:if> + <s:if test="feedFileExisting"> + <s:a namespace="/poll" action="getFeed"> + <s:param name="pollId" value="poll.pollId"/> + <img src="<s:url value='/img/feed.png'/>" title="Atom" alt="Atom"/> + </s:a> + </s:if> + </div> + <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}" + key='pollen.common.voteCountingType' + tooltip="%{voteCountingTypeHelp}" + tooltipIconPath="/img/tooltip.png"/> + </fieldset> +</div> \ No newline at end of file Property changes on: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/pollInformation.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native 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-09-14 16:33:06 UTC (rev 3691) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/result.jsp 2012-09-19 08:25:53 UTC (rev 3692) @@ -20,12 +20,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #L% --%> -<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ page contentType="text/html" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sj" uri="/struts-jquery-tags" %> <link rel="stylesheet" type="text/css" href="<s:url value='/css/results.css'/>"/> <link rel="stylesheet" type="text/css" + href="<s:url value='/css/pollInformation.css'/>"/> +<link rel="stylesheet" type="text/css" href="<s:url value='/css/jquery.lightbox-0.5.css'/>"/> @@ -70,42 +72,46 @@ <h1 class="titleVoteCounting"><s:property value="poll.title"/></h1> <!-- Informations sur le sondage --> -<div id="resultTop"> - <div style="white-space:pre-wrap; text-align: start;"> - <s:property value="poll.description"/> - </div> - <fieldset> - <legend><s:text name="pollen.common.aboutPoll"/></legend> - <div style="float: right"> - <s:if test="creatorOrAdmin"> - <s:a href="%{summaryUrl}"> - <img src="<s:url value='/img/editSmall.png'/>" - title="<s:text name='pollen.action.summaryPoll'/>" - alt="<s:text name='pollen.action.summaryPoll'/>"/> - </s:a> - </s:if> - <s:a href='%{voteUrl}'> - <img src="<s:url value='/img/vote.png'/>" - title="<s:text name="pollen.common.vote.return-help"/>" - alt="<s:text name="pollen.common.vote.return"/>"/> - </s:a> - <s:if test="feedFileExisting"> - <s:a namespace="/poll" action="getFeed"> - <s:param name="pollId" value="poll.pollId"/> - <img src="<s:url value='/img/feed.png'/>" title="Atom" alt="Atom"/> - </s:a> - </s:if> - </div> - <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}" - key='pollen.common.voteCountingType' - tooltip="%{voteCountingTypeHelp}" - tooltipIconPath="/img/tooltip.png"/> - </fieldset> -</div> +<s:set name="showVoteUrl" value="true"/> +<s:set name="showResultUrl" value="false"/> +<%@include file="pollInformation.jsp" %> +<%--<div id="resultTop">--%> + <%--<div style="white-space:pre-wrap; text-align: start;">--%> + <%--<s:property value="poll.description"/>--%> + <%--</div>--%> + <%--<fieldset>--%> + <%--<legend><s:text name="pollen.common.aboutPoll"/></legend>--%> + <%--<div style="float: right">--%> + <%--<s:if test="creatorOrAdmin">--%> + <%--<s:a href="%{summaryUrl}">--%> + <%--<img src="<s:url value='/img/editSmall.png'/>"--%> + <%--title="<s:text name='pollen.action.summaryPoll'/>"--%> + <%--alt="<s:text name='pollen.action.summaryPoll'/>"/>--%> + <%--</s:a>--%> + <%--</s:if>--%> + <%--<s:a href='%{voteUrl}'>--%> + <%--<img src="<s:url value='/img/vote.png'/>"--%> + <%--title="<s:text name="pollen.common.vote.return-help"/>"--%> + <%--alt="<s:text name="pollen.common.vote.return"/>"/>--%> + <%--</s:a>--%> + <%--<s:if test="feedFileExisting">--%> + <%--<s:a namespace="/poll" action="getFeed">--%> + <%--<s:param name="pollId" value="poll.pollId"/>--%> + <%--<img src="<s:url value='/img/feed.png'/>" title="Atom" alt="Atom"/>--%> + <%--</s:a>--%> + <%--</s:if>--%> + <%--</div>--%> + <%--<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}"--%> + <%--key='pollen.common.voteCountingType'--%> + <%--tooltip="%{voteCountingTypeHelp}"--%> + <%--tooltipIconPath="/img/tooltip.png"/>--%> + <%--</fieldset>--%> +<%--</div>--%> + <h4> <s:property value="%{voteSizeMessage}"/> </h4> 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-09-14 16:33:06 UTC (rev 3691) +++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp 2012-09-19 08:25:53 UTC (rev 3692) @@ -29,6 +29,8 @@ <link rel="stylesheet" type="text/css" href="<s:url value='/css/vote.css'/>"/> <link rel="stylesheet" type="text/css" + href="<s:url value='/css/pollInformation.css'/>"/> +<link rel="stylesheet" type="text/css" href="<s:url value='/css/jquery.lightbox-0.5.css'/>"/> <script type="text/javascript" @@ -112,48 +114,52 @@ <h1 class="titleVote"><s:property value="poll.title"/></h1> <!-- Informations sur le sondage --> +<!-- Informations sur le sondage --> +<s:set name="showVoteUrl" value="false"/> +<s:set name="showResultUrl" value="true"/> +<%@include file="pollInformation.jsp" %> -<div id="pollTop"> - <div style="white-space:pre-wrap; text-align: start;"> - <s:property value="poll.description"/> - </div> - <fieldset> - <legend><s:text name="pollen.common.aboutPoll"/></legend> - <div style="float: right"> - <s:if test="creatorOrAdmin"> - <s:a href="%{summaryUrl}"> - <img src="<s:url value='/img/editSmall.png'/>" - title="<s:text name='pollen.action.summaryPoll'/>" - alt="<s:text name='pollen.action.summaryPoll'/>"/> - </s:a> - </s:if> - <s:if test="resultAllowed"> - <s:a href="%{resultUrl}"> - <img src="<s:url value='/img/count.png'/>" - title="<s:text name='pollen.common.vote.results-help'/>" - alt="<s:text name='pollen.common.vote.results'/>"/> - </s:a> - </s:if> - <s:if test="feedFileExisting"> - <s:a namespace="/poll" action="getFeed"> - <s:param name="pollId" value="poll.pollId"/> - <img src="<s:url value='/img/feed.png'/>" title="Atom" alt="Atom"/> - </s:a> - </s:if> - </div> - <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}" - key='pollen.common.voteCountingType' - tooltip="%{voteCountingTypeHelp}" - tooltipIconPath="/img/tooltip.png"/> - <s:label value="%{pollVoteVisibilityName}" - key='pollen.common.pollVoteVisibility' - tooltip="%{pollVoteVisibilityHelp}" - tooltipIconPath="/img/tooltip.png"/> - </fieldset> -</div> +<%--<div id="pollTop">--%> + <%--<div style="white-space:pre-wrap; text-align: start;">--%> + <%--<s:property value="poll.description"/>--%> + <%--</div>--%> + <%--<fieldset>--%> + <%--<legend><s:text name="pollen.common.aboutPoll"/></legend>--%> + <%--<div style="float: right">--%> + <%--<s:if test="creatorOrAdmin">--%> + <%--<s:a href="%{summaryUrl}">--%> + <%--<img src="<s:url value='/img/editSmall.png'/>"--%> + <%--title="<s:text name='pollen.action.summaryPoll'/>"--%> + <%--alt="<s:text name='pollen.action.summaryPoll'/>"/>--%> + <%--</s:a>--%> + <%--</s:if>--%> + <%--<s:if test="resultAllowed">--%> + <%--<s:a href="%{resultUrl}">--%> + <%--<img src="<s:url value='/img/count.png'/>"--%> + <%--title="<s:text name='pollen.common.vote.results-help'/>"--%> + <%--alt="<s:text name='pollen.common.vote.results'/>"/>--%> + <%--</s:a>--%> + <%--</s:if>--%> + <%--<s:if test="feedFileExisting">--%> + <%--<s:a namespace="/poll" action="getFeed">--%> + <%--<s:param name="pollId" value="poll.pollId"/>--%> + <%--<img src="<s:url value='/img/feed.png'/>" title="Atom" alt="Atom"/>--%> + <%--</s:a>--%> + <%--</s:if>--%> + <%--</div>--%> + <%--<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}"--%> + <%--key='pollen.common.voteCountingType'--%> + <%--tooltip="%{voteCountingTypeHelp}"--%> + <%--tooltipIconPath="/img/tooltip.png"/>--%> + <%--<s:label value="%{pollVoteVisibilityName}"--%> + <%--key='pollen.common.pollVoteVisibility'--%> + <%--tooltip="%{pollVoteVisibilityHelp}"--%> + <%--tooltipIconPath="/img/tooltip.png"/>--%> + <%--</fieldset>--%> +<%--</div>--%> <div id="pollZone"> <s:if test="pollChoiceOrVoteStarted"> Added: trunk/pollen-ui-struts2/src/main/webapp/css/pollInformation.css =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/css/pollInformation.css (rev 0) +++ trunk/pollen-ui-struts2/src/main/webapp/css/pollInformation.css 2012-09-19 08:25:53 UTC (rev 3692) @@ -0,0 +1,48 @@ +/* + * #%L + * Pollen :: UI (struts2) + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2012 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +#pollInformationTop { + width: 700px; + margin: auto; + text-align: center; +} + +#pollInformationTop legend { + color: #727a7e; + font-weight: bold; +} + +#pollInformationTop fieldset { + width: 350px; + border: 1px solid #aab; + padding: 15px; + padding-bottom: 10px; + margin: auto; + margin-top: 20px; + margin-bottom: 20px; + vertical-align: top; + text-align: left; +} + +#pollInformationTop fieldset .wwlbl { + width: 210px; +} \ No newline at end of file Property changes on: trunk/pollen-ui-struts2/src/main/webapp/css/pollInformation.css ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/pollen-ui-struts2/src/main/webapp/css/results.css =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/css/results.css 2012-09-14 16:33:06 UTC (rev 3691) +++ trunk/pollen-ui-struts2/src/main/webapp/css/results.css 2012-09-19 08:25:53 UTC (rev 3692) @@ -20,33 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ -#resultTop { - width: 700px; - margin: auto; - text-align: center; -} - -#resultTop legend { - color: #727a7e; - font-weight: bold; -} - -#resultTop fieldset { - width: 350px; - border: 1px solid #aab; - padding: 15px; - padding-bottom: 10px; - margin: auto; - margin-top: 20px; - margin-bottom: 20px; - vertical-align: top; - text-align: left; -} - -#resultTop fieldset .wwlbl { - width: 210px; -} - #resultChart { width: 400px; margin: auto; Modified: trunk/pollen-ui-struts2/src/main/webapp/css/vote.css =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/css/vote.css 2012-09-14 16:33:06 UTC (rev 3691) +++ trunk/pollen-ui-struts2/src/main/webapp/css/vote.css 2012-09-19 08:25:53 UTC (rev 3692) @@ -20,33 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ -#pollTop { - width: 700px; - margin: auto; - text-align: center; -} - -#pollTop legend { - color: #727a7e; - font-weight: bold; -} - -#pollTop fieldset { - width: 400px; - border: 1px solid #aab; - padding: 15px; - padding-bottom: 10px; - margin: auto; - margin-top: 20px; - margin-bottom: 20px; - vertical-align: top; - text-align: left; -} - -#pollTop fieldset .wwlbl { - width: 210px; -} - #pollZone { /*padding: 10px;*/ text-align: center;