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 2ac90b4c3472ce580d9ba5f7a3b8c7bc12060b81 Author: Kevin Morin <morin@codelutin.com> Date: Thu Jul 6 17:06:58 2017 +0200 refs #61 Export des resultat d'un sondage (version imprimable de la page des résultats) --- pollen-ui-riot-js/src/main/web/css/print.css | 31 ++++++++++++++++++++++ pollen-ui-riot-js/src/main/web/i18n.json | 17 +++++++----- pollen-ui-riot-js/src/main/web/index.html | 9 ++++--- .../src/main/web/tag/poll/Comments.tag.html | 2 +- .../src/main/web/tag/poll/Poll.tag.html | 19 ++++++++----- .../src/main/web/tag/poll/Report.tag.html | 2 +- 6 files changed, 62 insertions(+), 18 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/css/print.css b/pollen-ui-riot-js/src/main/web/css/print.css new file mode 100644 index 00000000..52dce3d1 --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/css/print.css @@ -0,0 +1,31 @@ +.not-printable { + display: none!important; +} + +pollenheader { + background-color: transparent; +} + +pollenheader .header-actions { + display: none!important; +} + +h1, .tabs { + background-color: transparent!important; +} + +/* print only the selected tab */ +.tabs .tab, .tabs .dropdown { + display: none!important; +} + +.tabs .tab.selected { + display: block!important; + border: none; + background-color: transparent; + font-size: 2em; +} + +pollenfooter { + display: none!important; +} \ No newline at end of file diff --git a/pollen-ui-riot-js/src/main/web/i18n.json b/pollen-ui-riot-js/src/main/web/i18n.json index 80581654..9e929a37 100644 --- a/pollen-ui-riot-js/src/main/web/i18n.json +++ b/pollen-ui-riot-js/src/main/web/i18n.json @@ -39,11 +39,10 @@ "poll_editPoll": "Modifier le sondage", "poll_creationSuccess": "Votre sondage {0} a été créé avec succès.", "poll_saveSuccess": "Votre sondage {0} a été enregistré avec succès.", - "poll_votes": "Votes", + "poll_tab_votes": "Votes", "poll_summaryTab": "Résumé", "poll_settings": "Configuration", - "poll_choices": "Choix", - "poll_results": "Résultats", + "poll_tab_results": "Résultats", "poll_CLOSED": "Fermé", "poll_ADDING_CHOICES": "Ajout de choix", "poll_VOTING": "Ouvert", @@ -53,6 +52,7 @@ "poll_dateVotes": "Période de vote", "poll_dateAddChoices": "Période d'ajout de choix", "poll_dateFrom": "Du", + "poll_dateFromNoEnd": "À partir du", "poll_dateTo": "Au", "poll_noChoice": "aucun choix", "poll_choice": "choix", @@ -67,6 +67,9 @@ "poll_urlForAdmin" : "Administrer ce sondage avec cette adresse", "poll_urlForVote" : "Inviter de nouveaux participants en leur envoyant cette adresse", "poll_urlForEditVote" : "Vote enregistré, vous pourrez le modifier à l'adresse suivante (lorsque vous n'êtes pas connecté) : ", + "poll_qrcode": "Afficher un QR code pour partager le sondage", + "poll_rss": "Vous abonner au flux du sondage", + "poll_print": "Imprimer la page", "poll_results_title": "Résultats", "poll_results_noResult": "Les résultats ne sont pas encore disponibles.", "poll_results_ranks": "Rangs", @@ -541,8 +544,7 @@ "summary_members": "Participants", "summary_membersNb": "participants received an email with a link to vote.", "poll_403": "Error : the poll is not available", - "poll_choices": "Choices", - "poll_votes": "Votes", + "poll_tab_votes": "Votes", "poll_summaryTab": "Summary", "poll_settings": "Settings", "poll_closePoll": "Close poll", @@ -550,7 +552,7 @@ "poll_clonePoll": "Clone poll", "poll_deletePoll": "Delete poll", "poll_editPoll": "Edit poll", - "poll_results": "Results", + "poll_tab_results": "Results", "poll_CLOSED": "Closed", "poll_ADDING_CHOICES": "Adding choices", "poll_VOTING": "Voting", @@ -574,6 +576,9 @@ "poll_urlForAdmin" : "Administrate poll with this address", "poll_urlForVote" : "Invited new participants with this address", "poll_urlForEditVote" : "Vote saved, you can modify it using this address when you are not connected: ", + "poll_qrcode": "Show a QR code to share the poll", + "poll_rss": "Subscribe to the poll stream", + "poll_print": "Print the page", "poll_results_noResult": "Results are not yet available.", "poll_results_title": "Results", "poll_results_ranks": "Ranks", diff --git a/pollen-ui-riot-js/src/main/web/index.html b/pollen-ui-riot-js/src/main/web/index.html index 5d8f1ed7..d96d4ae7 100644 --- a/pollen-ui-riot-js/src/main/web/index.html +++ b/pollen-ui-riot-js/src/main/web/index.html @@ -25,10 +25,11 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Pollen</title> - <link href="./css/font-awesome.css" rel="stylesheet"> - <link href="./css/custom.css" rel="stylesheet"> - <link href="./css/blaze.css" rel="stylesheet"> - <link href="./css/main.css" rel="stylesheet"> + <link href="./css/font-awesome.css" rel="stylesheet" type="text/css"/> + <link href="./css/custom.css" rel="stylesheet" type="text/css"/> + <link href="./css/blaze.css" rel="stylesheet" type="text/css"/> + <link href="./css/main.css" rel="stylesheet" type="text/css"/> + <link href="./css/print.css" rel="stylesheet" type="text/css" media="print"/> </head> <body> <Pollen/> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html index 85169071..dbe2bb68 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html @@ -179,7 +179,7 @@ require("./Report.tag.html"); </div> <button type="button" - class="c-button c-button--info open-btn {open : open}" + class="c-button c-button--info open-btn not-printable {open : open}" onclick="{openComments}"> <i class="fa fa-comment"/> {poll.commentCount} {poll.commentCount <= 1 ? __.one : __.many} </button> 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 64eed951..3e648b3f 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 @@ -11,10 +11,17 @@ require("./Report.tag.html"); <h1 class="no-border"> <span class="title">{poll.title}</span> - <QrCodeButton if="{poll.pollType === 'FREE'}" value="{window.location.origin}{window.location.pathname}#poll/{poll.id}/vote"/> - <a href="{session.configuration.endPoint}/v1/polls/{poll.id}/feed?permission={poll.permission}" class="c-button c-button--info"> + <QrCodeButton if="{poll.pollType === 'FREE'}" class="not-printable" + value="{window.location.origin}{window.location.pathname}#poll/{poll.id}/vote" + title="{__.qrcode}"/> + <a href="{session.configuration.endPoint}/v1/polls/{poll.id}/feed?permission={poll.permission}" + class="c-button c-button--info not-printable" + title="{__.rss}"> <i class="fa fa-rss" aria-hidden="true"></i> </a> + <a class="c-button c-button--info not-printable" href="javascript:window.print()" title="{__.print}"> + <i class="fa fa-print" aria-hidden="true"></i> + </a> <Report target={poll}/> </h1> @@ -22,12 +29,12 @@ require("./Report.tag.html"); <div class="tab-container"> <div class="tab {selected : selectedTab === 'votes'}"> <a href="#poll/{poll.id}/vote{poll.getPermission()?'/' + poll.getPermission() : ''}"> - <i class="fa fa-thumbs-o-up fa-flip-horizontal fa-15x"></i> {__.votes} ({poll.voteCount}) + <i class="fa fa-thumbs-o-up fa-flip-horizontal fa-15x"></i> {__.tab_votes} ({poll.voteCount}) </a> </div> <div class="tab {selected : selectedTab === 'results'}"> <a href="#poll/{poll.id}/result{poll.getPermission()?'/' + poll.getPermission() : ''}"> - <i class="fa fa-trophy fa-15x"></i> {__.results} + <i class="fa fa-trophy fa-15x"></i> {__.tab_results} </a> </div> </div> @@ -64,14 +71,14 @@ require("./Report.tag.html"); <div class="left-icon"> <i class="fa fa-clock-o"></i> <p>{__.dateVotes}</p> - <p>{__.dateFrom} <span class="brand">{formatDate(poll.beginDate)}</span></p> + <p>{poll.endDate ? __.dateFrom : __.dateFromNoEnd} <span class="brand">{formatDate(poll.beginDate)}</span></p> <p if={poll.endDate}> {__.dateTo} <span class="brand">{formatDate(poll.endDate)}</span></p> </div> <div class="left-icon" if={poll.choiceAddAllowed}> <i class="fa fa-check-square"></i> <p>{__.dateAddChoices}</p> - <p>{__.dateFrom} <span class="brand">{formatDate(poll.beginChoiceDate)}</span></p> + <p>{poll.endDate ? __.dateFrom : __.dateFromNoEnd} <span class="brand">{formatDate(poll.beginChoiceDate)}</span></p> <p if={poll.endDate}> {__.dateTo} <span class="brand">{formatDate(poll.endChoiceDate)}</span></p> </div> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Report.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Report.tag.html index b3cc2ef7..40d237df 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Report.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Report.tag.html @@ -1,7 +1,7 @@ require("../popup/Modal.tag.html"); <Report> - <span class="label info-label" + <span class="label info-label not-printable" show={!poll.permission} onclick={openModalAddReport} title={__.title}> <i class="fa fa-bell" aria-hidden="true"></i> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.