This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 2198c876755e4612331e21890978fc092f79fd85 Author: Kevin Morin <morin@codelutin.com> Date: Tue Sep 12 15:39:04 2017 +0200 fixes #126 Administration du sondage fixes #121 Liens vers le sondage sur la page de résumer --- pollen-ui-riot-js/src/main/web/i18n/en.json | 8 ++--- pollen-ui-riot-js/src/main/web/i18n/fr.json | 8 ++--- pollen-ui-riot-js/src/main/web/js/Session.js | 2 +- .../src/main/web/tag/poll/Poll.tag.html | 28 +-------------- .../src/main/web/tag/poll/Summary.tag.html | 42 ++++++++++++++++++++-- 5 files changed, 50 insertions(+), 38 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 2d04709a..4d1919d2 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/en.json +++ b/pollen-ui-riot-js/src/main/web/i18n/en.json @@ -22,7 +22,7 @@ "summary_voting": "Open", "summary_fromDate": "from", "summary_toDate": "to", - "summary_administrate": "Administrate the poll", + "summary_administrate": "Modérer les votes et les commentaires", "summary_sharing": "Sharing", "summary_shareByQR": "Show the QR Code to go to the poll", "summary_shareByEmail": "Send invitations by email", @@ -30,11 +30,11 @@ "summary_vote": "Vote", "summary_members": "Participants", "summary_membersNb": "participants received an email with a link to vote.", + "summary_closePoll": "Close poll", + "summary_reopenPoll": "Reopen poll", + "summary_clonePoll": "Clone poll", "poll_403": "Error : the poll is not available", "poll_newPoll": "New poll", - "poll_closePoll": "Close poll", - "poll_reopenPoll": "Reopen poll", - "poll_clonePoll": "Clone poll", "poll_deletePoll": "Delete poll", "poll_editPoll": "Edit poll", "poll_creationSuccess": "Your poll {0} has been successfully created.", 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 7762ee73..1d5716e4 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/fr.json +++ b/pollen-ui-riot-js/src/main/web/i18n/fr.json @@ -22,7 +22,7 @@ "summary_voting": "Ouvert", "summary_fromDate": "à partir du", "summary_toDate": "jusqu'au", - "summary_administrate": "Administrer le sondage", + "summary_administrate": "Modérer les votes et les commentaires", "summary_sharing": "Partage", "summary_shareByQR": "Afficher un QR code pour accéder au sondage", "summary_shareByEmail": "Envoyer des invitations par email", @@ -30,11 +30,11 @@ "summary_vote": "Voter", "summary_members": "Participants", "summary_membersNb": "participants ont reçu un email avec un lien pour voter.", + "summary_closePoll": "Clôturer le sondage", + "summary_reopenPoll": "Réouvrir le sondage", + "summary_clonePoll": "Cloner le sondage", "poll_403": "Erreur : le sondage n'est pas accessible", "poll_newPoll": "Nouveau sondage", - "poll_closePoll": "Clôturer le sondage", - "poll_reopenPoll": "Réouvrir le sondage", - "poll_clonePoll": "Cloner le sondage", "poll_deletePoll": "Supprimer le sondage", "poll_editPoll": "Modifier le sondage", "poll_creationSuccess": "Votre sondage {0} a été créé avec succès.", diff --git a/pollen-ui-riot-js/src/main/web/js/Session.js b/pollen-ui-riot-js/src/main/web/js/Session.js index 3a5a52a3..363d7f60 100644 --- a/pollen-ui-riot-js/src/main/web/js/Session.js +++ b/pollen-ui-riot-js/src/main/web/js/Session.js @@ -44,7 +44,7 @@ class Session { userValidateUrl: window.location.origin + "/#signcheck/{userId}/{token}", pollVoteUrl: window.location.origin + "/#poll/{pollId}/vote/{token}", pollVoteEditUrl: window.location.origin + "/#poll/{pollId}/vote/{voteId}/{token}", - pollEditUrl: window.location.origin + "/#poll/{pollId}/edit/{token}", + pollEditUrl: window.location.origin + "/#poll/{pollId}/summary/{token}", resourceUrl: this.configuration.endPoint + "/v1/resources/{resourceId}", resourceDownloadUrl: this.configuration.endPoint + "/v1/resources/{resourceId}/download", profileUrl: this.configuration.endPoint + "/#user/profile" 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 4f18a899..2382082b 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 @@ -44,20 +44,10 @@ require("./Report.tag.html"); class="poll-options dropdown"> <a class="header-link"><i class="fa fa-bars"/></a> <div class="dropdown-content"> - <a href="#/poll/{poll.id}/edit/{poll.permission}"> + <a href="#/poll/{poll.id}/summary/{poll.permission}"> <i class="link fa fa-pencil-square-o"/> {__.editPoll} </a> - <a if="{!poll.closed}" onclick="{closePoll}"> - <i class="link fa fa-close"/> - {__.closePoll}</a> - <a if="{poll.closed}" onclick="{reopenPoll}"> - <i class="link fa fa-play"/> - {__.reopenPoll}</a> - <a href="#/poll/{poll.id}/clone/{poll.permission}"> - <i class="link fa fa-clone"/> - {__.clonePoll} - </a> <a onclick="{deletePoll}"> <i class="link fa fa-trash"/> {__.deletePoll} @@ -166,22 +156,6 @@ require("./Report.tag.html"); }, () =>{}); }); - this.closePoll = (e) => { - e.preventDefault(); - e.stopPropagation(); - this.poll.close().then(() => { - this.update(); - }); - }; - - this.reopenPoll = (e) => { - e.preventDefault(); - e.stopPropagation(); - this.poll.reopen().then(() => { - this.update(); - }); - }; - this.deletePoll = (e) => { e.preventDefault(); e.stopPropagation(); diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Summary.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Summary.tag.html index b8fff13f..4efb8d97 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Summary.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Summary.tag.html @@ -69,9 +69,31 @@ require("../components/MultiLineLabel.tag.html"); <div class="summary-part"> <a if={opts.form.model.pollType === "FREE"} - href="{window.location.origin}{window.location.pathname}#poll/{opts.form.model.id}/vote" class="c-button c-button--info">{__.vote}</a> + href="{window.location.origin}{window.location.pathname}#poll/{opts.form.model.id}/vote" + class="c-button c-button--info"> + <i class="link fa fa-envelope-o"/> + {__.vote} + </a> <a href="{window.location.origin}{window.location.pathname}#poll/{opts.form.model.id}/vote/{opts.form.model.permission}" - class="c-button c-button--info">{__.administrate}</a> + class="c-button c-button--brand"> + <i class="link fa fa-wrench"/> + {__.administrate} + </a> + <a if="{!opts.form.model.closed}" + onclick="{closePoll}" + class="c-button c-button--error"> + <i class="link fa fa-close"/> + {__.closePoll}</a> + <a if="{opts.form.model.closed}" + onclick="{reopenPoll}" + class="c-button c-button--success"> + <i class="link fa fa-play"/> + {__.reopenPoll}</a> + <a href="#/poll/{opts.form.model.id}/clone/{opts.form.model.permission}" + class="c-button c-button--info"> + <i class="link fa fa-clone"/> + {__.clonePoll} + </a> </div> <script type="es6"> @@ -92,6 +114,22 @@ require("../components/MultiLineLabel.tag.html"); this.update(); }); + this.closePoll = (e) => { + e.preventDefault(); + e.stopPropagation(); + this.opts.form.model.close().then(() => { + this.update(); + }); + }; + + this.reopenPoll = (e) => { + e.preventDefault(); + e.stopPropagation(); + this.opts.form.model.reopen().then(() => { + this.update(); + }); + }; + </script> <style> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.