branch feature/58-limitation-des-votants updated (e83acf6a -> d87ac9ff)
This is an automated email from the git hooks/post-receive script. New change to branch feature/58-limitation-des-votants in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from e83acf6a Limitations du nombre votants (ref #58), Déplacement des méthodes de transformation des entités en bean dans les services new d87ac9ff indiquer la limite de votants pour un sondage (ref #58) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit d87ac9ffa597a471ab6946c78f687c2f8657bafe Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Sep 27 16:48:26 2017 +0200 indiquer la limite de votants pour un sondage (ref #58) Summary of changes: pollen-ui-riot-js/src/main/web/i18n/en.json | 3 ++- pollen-ui-riot-js/src/main/web/i18n/fr.json | 3 ++- .../src/main/web/tag/poll/Poll.tag.html | 29 ++++++++++++++++------ 3 files changed, 26 insertions(+), 9 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/58-limitation-des-votants in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit d87ac9ffa597a471ab6946c78f687c2f8657bafe Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Sep 27 16:48:26 2017 +0200 indiquer la limite de votants pour un sondage (ref #58) --- pollen-ui-riot-js/src/main/web/i18n/en.json | 3 ++- pollen-ui-riot-js/src/main/web/i18n/fr.json | 3 ++- .../src/main/web/tag/poll/Poll.tag.html | 29 ++++++++++++++++------ 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/i18n/en.json b/pollen-ui-riot-js/src/main/web/i18n/en.json index 3a6e4da3..ace460da 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/en.json +++ b/pollen-ui-riot-js/src/main/web/i18n/en.json @@ -63,7 +63,8 @@ "poll_subscribers": "subscribers", "poll_participants": "participants", "poll_participation": "of participation", - "poll_maxVotersAlert": "<strong>Warnning</strong> : Strandard offers has limited to {0} voters. Users can continue to vote but only the first {0} votes are taken into account in the calculation of the resultles.", + "poll_maxVotersAlert_title": "Number of voters limitation", + "poll_maxVotersAlert": "Strandard offers has limited to {0} voters. Users can continue to vote but only the first {0} votes are taken into account in the calculation of the resultles.", "poll_maxVotersAlert_offers": "Read <a href=\"#home\">the offers page</a> to unlock this limit.", "poll_closedFrom": "Closing from", "poll_urlForAdmin" : "Administrate poll with this address", diff --git a/pollen-ui-riot-js/src/main/web/i18n/fr.json b/pollen-ui-riot-js/src/main/web/i18n/fr.json index aa916d61..cf2510a8 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/fr.json +++ b/pollen-ui-riot-js/src/main/web/i18n/fr.json @@ -63,7 +63,8 @@ "poll_subscribers": "invités", "poll_participants": "participants", "poll_participation": "de participation", - "poll_maxVotersAlert": "<strong>Attention</strong> : L'offre standard est limitée à {0} votants. Les utilisateurs peuvent continuer à voter mais seul les {0} premiers votes sont pris en compte dans le calcul du résultat.", + "poll_maxVotersAlert_title": "Limitation du Nombre de votants", + "poll_maxVotersAlert": "L'offre standard est limitée à {0} votants. Les utilisateurs peuvent continuer à voter mais seul les {0} premiers votes sont pris en compte dans le calcul du résultat.", "poll_maxVotersAlert_offers": "Cousulter <a href=\"#home\">la page des nos offres</a> pour déverrouiller cette limite.", "poll_closedFrom": "Fermé depuis le", "poll_urlForAdmin" : "Administrer ce sondage avec cette adresse", diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html index ba136545..d36b97c5 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Poll.tag.html @@ -8,12 +8,12 @@ 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% @@ -113,11 +113,15 @@ require("./Report.tag.html"); <p>{__.createdBy} <span class="brand">{poll.creatorName}</span></p> </div> - <div class="left-icon"> + <div class="left-icon" onclick="{toggleMaxVoters}"> <i class="fa fa-envelope"></i> - <p if={poll.voteCount === 0}>{__.noVote}</p> - <p if={poll.voteCount === 1}><span class="brand">1</span> {__.vote}</p> - <p if={poll.voteCount > 1}><span class="brand">{poll.voteCount}</span> {__.votes}</p> + <p> + <span if={poll.voteCount > 0} class="brand">{poll.voteCount}</span> + {poll.voteCount === 0 ? __.noVote : (poll.voteCount === 1 ? __.vote : __.votes)} + <a if={poll.maxVoters > 0} class="info-label"> + <i class="fa fa-exclamation-circle" aria-hidden="true"></i> + </a> + </p> </div> <div class="left-icon" if="{poll.pollType === 'RESTRICTED'}"> @@ -134,7 +138,10 @@ require("./Report.tag.html"); <div if={poll.maxVoters > 0 && poll.voteCount > poll.maxVoters} class="c-alert c-alert--warning"> - <InnerHtml html={_l("maxVotersAlert", poll.maxVoters)}/> + <div> + <strong> {__.maxVotersAlert_title}</strong> + </div> + {_l("maxVotersAlert", poll.maxVoters)} <InnerHtml if={poll.permission} html={__.maxVotersAlert_offers} /> </div> @@ -204,6 +211,14 @@ require("./Report.tag.html"); this.info(this.poll.voteCountingTypeValue.name, this.poll.voteCountingTypeValue.helper, null, "info"); }; + this.toggleMaxVoters = () => { + let message = this._l("maxVotersAlert", this.poll.maxVoters); + if (this.poll.permission) { + message += " " + this.__.maxVotersAlert_offers; + } + this.info(this.__.maxVotersAlert_title, message, null, "warning"); + }; + </script> <style> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm