branch feature/257-poll-summary created (now a48e5430)
This is an automated email from the git hooks/post-receive script. New change to branch feature/257-poll-summary in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git at a48e5430 ref #257 Création du composant de résumé de sondage This branch includes the following new commits: new a48e5430 ref #257 Création du composant de résumé de sondage 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 a48e5430807629aba72f36ff467ee679caae8635 Author: Cécilia Bossard <bossard@codelutin.com> Date: Tue Mar 17 16:51:19 2020 +0100 ref #257 Création du composant de résumé de sondage -- 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/257-poll-summary in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit a48e5430807629aba72f36ff467ee679caae8635 Author: Cécilia Bossard <bossard@codelutin.com> Date: Tue Mar 17 16:51:19 2020 +0100 ref #257 Création du composant de résumé de sondage --- pollen-ui-riot-js/src/main/web/css/main.css | 1 + pollen-ui-riot-js/src/main/web/i18n/en.json | 13 +- pollen-ui-riot-js/src/main/web/i18n/fr.json | 13 +- .../src/main/web/tag/poll/Poll.tag.html | 99 ++++--- .../src/main/web/tag/poll/PollCardReboot.tag.html | 2 +- .../src/main/web/tag/poll/PollChoice.tag.html | 155 +++++++++++ .../src/main/web/tag/poll/PollSummary.tag.html | 292 +++++++++++++++++++++ pollen-ui-riot-js/stories/PollSummary.stories.js | 134 ++++++++++ 8 files changed, 672 insertions(+), 37 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/css/main.css b/pollen-ui-riot-js/src/main/web/css/main.css index df880276..4c3566cf 100644 --- a/pollen-ui-riot-js/src/main/web/css/main.css +++ b/pollen-ui-riot-js/src/main/web/css/main.css @@ -189,6 +189,7 @@ ul { .colors-default textarea, .colors-default select { color: var(--default); + background: #F7F7F7; } .colors-default-invers, 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 02d32537..b7156a59 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/en.json +++ b/pollen-ui-riot-js/src/main/web/i18n/en.json @@ -86,9 +86,20 @@ "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_qrcode": "QR code", "poll_rss": "Subscribe to the poll stream", "poll_print": "Print the page", + "poll_general": "General", + "poll_description": "Description", + "poll_choices": "Poll choices", + "poll_type_normal": "Normal", + "poll_type_cumulative": "Cumulative", + "poll_type_condorcet": "Condorcet", + "poll_type_number": "Number", + "poll_type_borda": "Borda", + "poll_type_instantRunOff": "Instant Run Off", + "poll_type_coombs": "Coombs", + "poll_type_majorityJudgment": "Majority Judgment", "poll_results_title": "Results", "poll_results_noResult": "Results are not yet available.", "poll_results_rank": "Rank", 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 c62c0fb3..7b3954d2 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/fr.json +++ b/pollen-ui-riot-js/src/main/web/i18n/fr.json @@ -86,9 +86,20 @@ "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_qrcode": "QR code", "poll_rss": "Vous abonner au flux du sondage", "poll_print": "Imprimer la page", + "poll_general": "Général", + "poll_description": "Description", + "poll_choices": "Choix du sondage", + "poll_type_normal": "Normal", + "poll_type_cumulative": "Cumulatif", + "poll_type_condorcet": "Condorcet", + "poll_type_number": "Nombre", + "poll_type_borda": "Borda", + "poll_type_instantRunOff": "Vote alternatif", + "poll_type_coombs": "Coombs", + "poll_type_majorityJudgment": "Jugement majoritaire", "poll_results_title": "Résultats", "poll_results_noResult": "Les résultats ne sont pas encore disponibles.", "poll_results_rank": "Rang", 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 6a15b619..5a8d729e 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 @@ -18,9 +18,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #L% --> + +import "./PollSummary.tag.html"; + <Poll> + <div class="poll-information"> + <PollSummary poll="{this.poll}" state="voting"/> + </div> - <div class="main-container" ref="mainContainer"> + <div class="maint-content"> + + </div> + + <!--<div class="main-container" ref="mainContainer"> <h1 class="no-border"> <span class="title">{poll.title}</span> @@ -28,11 +38,11 @@ value="{window.location.origin}{window.location.pathname}#poll/{poll.id}/vote" title="{_t.qrcode}"/> <a href="{session.configuration.endPoint}/v1/polls/{poll.id}/feed?{poll.permission ? 'permission=' + poll.permission : ''}" - class="c-button c-button--info title-button not-printable" + class="c-button c-button--info title-button not-printable" title="{_t.rss}"> <i class="fa fa-rss" aria-hidden="true"></i> </a> - <a class="c-button c-button--info title-button not-printable" href="javascript:window.print()" title="{_t.print}"> + <a class="c-button c-button--info title-button not-printable" href="javascript:window.print()" title="{_t.print}"> <i class="fa fa-print" aria-hidden="true"></i> </a> <Report target="{poll}"/> @@ -135,7 +145,7 @@ <CheckEmails if={poll.permission}/> - <div class="c-alert c-alert--warning" + <div class="c-alert c-alert--warning" if={poll.maxVoters > 0 && poll.questions[0].voteCount > poll.maxVoters}> <ContentLoader path={maxVotersAlertPage}/> </div> @@ -146,36 +156,23 @@ </div> - <Comments class="comments"/> + <Comments class="comments"/>--> </div> <script type="es6"> - import "./Votes.tag.html"; - import "./Comments.tag.html"; - import "./Results.tag.html"; - import "./Choices.tag.html"; - import "./Settings.tag.html"; - import "./CheckEmails.tag.html"; - import "../popup/QrCodeButton.tag.html"; - import "../components/MultiLineLabel.tag.html"; - import "../components/InnerHtml.tag.html"; - import "./Report.tag.html"; - import "./Participants.tag.html"; - - - import session from "../../js/Session"; - import Message from "../../js/Message"; - import route from "riot-route/lib/tag"; import poll from "../../js/Poll"; + import session from "../../js/Session"; this.session = session; this.installBundle(this.session, "poll"); - this.selectedTab = this.opts.tabName || "votes"; + this.poll = poll; - this.showVoteCountingTypeHelper = false; + this.poll.init(this.opts.pollId, this.opts.voteId, this.opts.permission).catch((error) => { + this.bus.trigger("message", new Message(this._l(error.status), "error")); + route(""); + }); - this.poll = poll; this.onPollChange = poll2 => { this.poll = poll2; this.update(); @@ -184,11 +181,6 @@ this.listen("poll", this.onPollChange); - this.poll.init(this.opts.pollId, this.opts.voteId, this.opts.permission).catch((error) => { - this.bus.trigger("message", new Message(this._l(error.status), "error")); - route(""); - }); - this.listen("user", (user, oldUser) => { if (user !== oldUser) { this.poll.reloadPoll().then(() => {}, () =>{}); @@ -232,6 +224,35 @@ }); }); + + + + + + + <!-- import "./Votes.tag.html"; + import "./Comments.tag.html"; + import "./Results.tag.html"; + import "./Choices.tag.html"; + import "./Settings.tag.html"; + import "./CheckEmails.tag.html"; + import "../popup/QrCodeButton.tag.html"; + import "../components/MultiLineLabel.tag.html"; + import "../components/InnerHtml.tag.html"; + import "./Report.tag.html"; + import "./Participants.tag.html"; + + import Message from "../../js/Message"; + import route from "riot-route/lib/tag"; + + + this.selectedTab = this.opts.tabName || "votes"; + + this.showVoteCountingTypeHelper = false; + + + + this.deletePoll = (e) => { e.preventDefault(); e.stopPropagation(); @@ -269,12 +290,22 @@ }).then(message => { this.info("", message, null, "warning"); }); - }; + };--> </script> <style> - .main-container { + poll { + + } + + .poll-information { + width: 471px; + padding-left: 49px; + background: #F7F7F7; + } + + <!-- .main-container { padding-bottom: 50px; } @@ -331,7 +362,7 @@ display: flex; flex-direction: row; flex-wrap: wrap; - color: var(--poll-info); + color: var(--poll-info); } .poll-info > div { @@ -344,7 +375,7 @@ .poll-description { padding: 10px 30px; - color: var(--poll-info); + color: var(--poll-info); } .left-icon > i { @@ -353,7 +384,7 @@ .left-icon p { margin-left: 20px; - } + }--> </style> </Poll> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/PollCardReboot.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/PollCardReboot.tag.html index 5d2aeb93..bc0c0808 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/PollCardReboot.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/PollCardReboot.tag.html @@ -310,7 +310,7 @@ import "../components/Avatar.tag.html"; font-size: 12px; line-height: 16px; - text-decoration: none; + text-decoration: none; /* Black Pearl */ color: var(--Black-Pearl); diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/PollChoice.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/PollChoice.tag.html new file mode 100644 index 00000000..00f03768 --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/tag/poll/PollChoice.tag.html @@ -0,0 +1,155 @@ +<!-- + #%L + Pollen :: UI RiotJs + %% + Copyright (C) 2009 - 2019 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% + --> + +import "../components/Avatar.tag.html"; + +<PollChoice> + + + <div class="choice-description"> + + <div class="left-description"> + <!-- Type text --> + <span if="{choice.choiceType === 'TEXT'}">{choice.choiceValue}</span> + + <!-- Type Image --> + <img if="{choice.choiceType === 'RESOURCE'}" class="choice-image" src="{resourceService.getPreviewUrl(choice.choiceValue, true)}" /> + + <!-- Type date --> + <span if="{choice.choiceType === 'DATE' || choice.choiceType === 'DATETIME' }">{date}</span> + + </div> + + <span class="growing"></span> + + <div class="actions"> + + <Tooltip class="delete" position="top" content="Delete this choice" if="{choice.choiceIsDeletable && parent.voteState === parent.voteStates.EDITING}"> + <i class="icon icon-delete" /> + </Tooltip> + + <Tooltip position="top" content="Report this choice"> + <i class="icon icon-notification" /> + </Tooltip> + + <Tooltip position="top" content="Text" if="{choice.choiceType === 'TEXT'}"> + <i class="icon icon-description" /> + </Tooltip> + + + <Tooltip position="top" content="Image" if="{choice.choiceType === 'RESOURCE'}"> + <i class="icon icon-picture" /> + </Tooltip> + + <Tooltip position="top" content="Date and time" if="{choice.choiceType === 'DATE' || choice.choiceType === 'DATETIME' }"> + <i class="icon icon-calendar" /> + </Tooltip> + + </div> + + </div> + + <script type="es6"> + import session from "../../js/Session"; + import resourceService from "../../js/ResourceService"; + var moment = require("moment"); + this.session = session; + this.resourceService = resourceService; + + moment.locale(this.session.locale); + + this.installBundle(this.session, "choice", locale => { + moment.locale(locale); + }); + + this.date = ''; + if(this.choice.choiceType === 'DATE') { + this.date = moment(parseInt(this.choice.choiceValue, 10)).format("DD / MM / YYYY"); + } + if(this.choice.choiceType === 'DATETIME') { + this.date = moment(parseInt(this.choice.choiceValue, 10)).format("DD / MM / YYYY, hh:mm"); + } + + </script> + + <style> + + .choice-description { + border: 1px solid #D2DAE2; + box-sizing: border-box; + border-radius: 4px; + height: 40px; + width: 370px; + margin-top: 10px; + align-items: center; + color: var(--Black); + font-size: 12px; + + display: flex; + } + + .choice-image { + width: 55px; + height: 41px; + } + + .choice-description span { + font-family: Open Sans; + font-style: normal; + font-weight: normal; + + line-height: 16px; + padding-left: 10px; + color: #1E272E; + } + + .growing { + position:relative; + flex-grow: 1; + } + + tooltip { + padding-right: 5px; + } + + .actions { + padding-right: 15px; + } + + .icon-delete { + color: #F53B57; + } + + .choice-description:hover { + border: 1px solid #808E9B; + } + + .choice-description:hover .delete { + visibility: visible; + } + + + .delete { + visibility: hidden; + } + + </style> +</PollChoice> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/PollSummary.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/PollSummary.tag.html new file mode 100644 index 00000000..9ede19ee --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/tag/poll/PollSummary.tag.html @@ -0,0 +1,292 @@ +<!-- + #%L + Pollen :: UI RiotJs + %% + Copyright (C) 2009 - 2019 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% + --> + +import "../components/Avatar.tag.html"; +import "../popup/ModalReboot.tag.html"; +import "./PollChoice.tag.html"; + +<PollSummary> + + <div class="poll-summary-content"> + + <div class="poll-summary-header" if="{voteState === voteStates.VOTING}"> + + <div class="voters" if="{opts.poll.questions[0]}"> + <i class="icon-vote"></i> {opts.poll.questions[0].voteCount === 0 ? "-" : (opts.poll.questions[0].voteCount)} votes + </div> + + <span class="growing"></span> + + <Popover> + <yield to="source"> + <Tooltip position="top" content="Menu"> + <i class="menu icon-burger"></i> + </Tooltip> + </yield> + <yield to="content"> + <ul> + <a title="{parent.parent._t.qrcode}" + onclick={parent.showQrCode}> <li>{parent.parent._t.qrcode} + </li></a> + <a if="{parent.opts.poll.permission}" title={parent.parent._t.editPoll} + href="#poll/{parent.opts.poll.id}/edit/{parent.opts.poll.permission}"><li>{parent.parent._t.editPoll} + </li></a> + <a if="{parent.opts.poll.permission}" title={parent.parent._t.deletePoll} + onclick={parent.deletePoll}> <li>{parent.parent._t.deletePoll} + </li></a> + </ul> + </yield> + </Popover> + + </div> + + <div class="image" if="{opts.poll.picture}"> + <span>Image</span> + <span class="growing"></span> + </div> + + <div> + <div class="section-title"><span>{parent._t.general}</span></div> + + <div class="section-element" if="{opts.poll.questions[0]}"> + <label>Type</label> + <span if="{opts.poll.questions[0].voteCountingType === 1}">{parent._t.type_normal}</span> + <span if="{opts.poll.questions[0].voteCountingType === 2}">{parent._t.type_cumulative}</span> + <span if="{opts.poll.questions[0].voteCountingType === 3}">{parent._t.type_condorcet}</span> + <span if="{opts.poll.questions[0].voteCountingType === 4}">{parent._t.type_number}</span> + <span if="{opts.poll.questions[0].voteCountingType === 5}">{parent._t.type_borda}</span> + <span if="{opts.poll.questions[0].voteCountingType === 6}">{parent._t.type_instantRunOff}</span> + <span if="{opts.poll.questions[0].voteCountingType === 7}">{parent._t.type_coombs}</span> + <span if="{opts.poll.questions[0].voteCountingType === 8}">{parent._t.type_majorityJudgment}</span> + </div> + + <div class="section-element" if="{voteState != voteStates.VOTING}"> + <label for="pollName">Name</label> + <span id="pollName">{opts.poll.title}</span> + </div> + + <div class="section-element"> + <label for="pollAuthor">{parent._t.createdBy}</label> + <span id="pollAuthor" class="pollAuthor"> + <Avatar class="avatar" avatar={opts.poll.creatorAvatar} name={opts.poll.creatorName} rounded="true" size="30px" fontSize="1.7em"/> + {opts.poll.creatorName} + </span> + </div> + + <div class="section-element"> + <label for="pollDescription">{parent._t.description}</label> + <div class="poll-description" id="pollDescription">{opts.poll.description}</div> + </div> + + </div> + + </div> + + <div class="poll-choices" if="{opts.poll.questions[0]}"> + + <div class="section-title"><span>{parent._t.choices}</span></div> + + <PollChoice each="{choice in opts.poll.questions[0].choices}" /> + + </div> + + <ModalReboot ref="qrCodeModal" header="{voteUrl}" label="Copy" type="success"> + <div class="modal-form"> + <!--<span class="modal-description">{parent._t.assignPollToMe_desc}</span> + <PollenInput label="URL" name="pollToAssign" ref="pollToAssign" placeholder={parent.pollToAssignPlaceholder} + pattern={parent.pollToAssignUrlPattern} required="true" />--> + <span>Bla bla</span> + </div> + </ModalReboot> + + + <script type="es6"> + + this.voteStates = { + EDITING: "editing", + VOTING: "voting" + }; + + this.voteSteps = { + GENERAL: "general", + CHOICES: "choices", + OPTIONS: "options" + }; + + this.voteState = this.opts.state; + + if(this.opts) { + console.log(this.opts) + + this.voteUrl = window.location.origin + window.location.pathname + "#poll/" + this.opts.poll.id + "/vote"; + } + + + this.showQrCode = () => { + + this.refs.qrCodeModal.open().then(() => { + this.update(); + }, () => {}); + this.update(); + }; + </script> + + <style> + + PollSummary { + width: 471px; + height: 749px; + } + + .poll-summary-header { + display: flex; + padding-bottom: 30px; + padding-top: 20px; + } + + .poll-summary-header .icon-vote { + font-size: 20px; + } + + .poll-summary-header .voters { + color: var(--Mountain-Meadow); + font-weight: bold; + } + + .growing { + position:relative; + flex-grow: 1; + } + + popover { + color: var(--Mountain-Meadow); + padding-right: 50px; + font-size: 20px; + } + + .poll-summary-content { + display: flex; + flex-direction: column; + padding-bottom: 20px; + } + + .section-title { + padding-top: 20px; + color: var(--Black); + padding-bottom: 10px; + font-size: 16px; + line-height: 22px; + } + + .section-element { + display: flex; + flex-direction: column; + padding-top: 20px; + } + + .section-element label { + font-weight: 300; + font-size: 12px; + line-height: 16px; + padding-bottom: 10px; + color: #1E272E; + } + + .section-element span { + font-weight: normal; + font-size: 12px; + line-height: 16px; + color: #1E272E; + } + + .poll-description { + /* hide text if it more than N lines */ + overflow: hidden; + /* for set '...' in absolute position */ + position: relative; + /* use this value to count block height */ + line-height: 16px; + /* max-height = line-height (1.2) * lines max number (3) */ + max-height: 48px; + /* fix problem when last visible word doesn't adjoin right side */ + text-align: justify; + /* place for '...' */ + margin-right: -10px; + padding-right: 15px; + font-size: 12px; + width: 370px; + } + + .poll-description::before { + /* points in the end */ + content: '...'; + /* absolute position */ + position: absolute; + /* set position to right bottom corner of block */ + right: 0; + bottom: 0; + } + + .poll-description::after { + /* points in the end */ + content: ''; + /* absolute position */ + position: absolute; + /* set position to right bottom corner of text */ + right: 0; + /* set width and height */ + width: 1em; + height: 1em; + margin-top: 0.2em; + /* bg color = bg color under block */ + background: #F7F7F7; + } + + .image { + height: 150px; + border: 1px solid #D2DAE2; + width: 375px; + } + + .pollAuthor { + display: flex; + align-items: center; + } + + .pollAuthor avatar { + padding-right: 10px; + } + + a { + font-family: Open Sans; + font-style: normal; + font-weight: normal; + font-size: 12px; + line-height: 16px; + + text-decoration: none; + + /* Black Pearl */ + color: var(--Black-Pearl); + } + + </style> +</PollSummary> diff --git a/pollen-ui-riot-js/stories/PollSummary.stories.js b/pollen-ui-riot-js/stories/PollSummary.stories.js new file mode 100644 index 00000000..bf7144c0 --- /dev/null +++ b/pollen-ui-riot-js/stories/PollSummary.stories.js @@ -0,0 +1,134 @@ +import {tag, mount, storiesOf, asCompiledCode} from "@storybook/riot"; + +import i18nHelper from "../src/main/web/js/I18nHelper"; +import uiHelper from "../src/main/web/js/UIHelper"; +import riot from "riot"; + +import "../src/main/web/css/custom.css"; +import "../src/main/web/tag/poll/PollSummary.tag.html"; + +export default {title: "Poll Summary"}; + +const realPoll = {"id":"fkVkBIXTTnO6Mc4SZ-5PVQ", + "permission":"6Mt9vhVtSKCUdt8tzL2mXg", + "creatorName":"Cécilia Bossard", + "creatorEmail":"bossard@codelutin.com", + "title":"Pizza choice", + "description":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse volutpat congue augue, eget maximus velit scelerisque vitae. Nam pretium sit amet arcu non aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse volutpat congue augue, eget maximus velit scelerisque vitae. Nam pretium sit amet arcu non aliquam.", + "createDate":1584366113127, + "beginDate":1584316800000, + "endDate":1585526400000, + "anonymousVoteAllowed":false, + "continuousResults":true, + "pollType":"FREE", + "voteVisibility":"EVERYBODY", + "commentVisibility":"EVERYBODY", + "resultVisibility":"EVERYBODY", + "closed":false, + "resultIsVisible":true, + "commentIsVisible":true, + "voteIsVisible":true, + "participantsIsVisible":false, + "canVote":true, + "commentCount":0, + "invalidEmails":null, + "participantCount":0, + "participantInvitedCount":0, + "status":"VOTING", + "notifyMeHoursBeforePollEnds":0, + "voteNotification":false, + "commentNotification":false, + "newChoiceNotification":false, + "notificationLocale":"en", + "report":null, + "gtuValidated":true, + "maxVoters":0, + "creatorAvatar":"iDDTFOMtT_KXivgaqhaTRg", + "emailAddressSuffixes":null, + "questions":[ + {"id":"uF073LFtR6qPZBoPHgC0cw", + "permission":"6Mt9vhVtSKCUdt8tzL2mXg", + "createDate":1584366113171, + "title":null, + "description":null, + "beginChoiceDate":null, + "endChoiceDate":null, + "choiceAddAllowed":false, + "voteCountingType":3, + "voteCountingConfig":{}, + "poll":null, + "resultIsVisible":true, + "commentIsVisible":true, + "voteIsVisible":true, + "participantsIsVisible":false, + "choices":[ + {"id":"vNzRicmGRa-V6MtCjt6Wsw","permission":"6Mt9vhVtSKCUdt8tzL2mXg","choiceOrder":0,"choiceValue":"Hawaiian pizza","choiceType":"TEXT","description":"","choiceIsDeletable":true,"report":null}, + {"id":"bkJa5B-YTXqwFlXA1igWAg","permission":"6Mt9vhVtSKCUdt8tzL2mXg","choiceOrder":1,"choiceValue":"1584399600000","choiceType":"DATE","description":"","choiceIsDeletable":true,"report":null}, + {"id":"vNzRicmGRa-V6MtCjt6Wsw","permission":"6Mt9vhVtSKCUdt8tzL2mXg","choiceOrder":2,"choiceValue":"ASYjZZehRbSn8RriKyQgZw","choiceType":"RESOURCE","description":"","choiceIsDeletable":true,"report":null}, + {"id":"SkwFKQWvSiGs8zyWcyZkDQ","permission":"6Mt9vhVtSKCUdt8tzL2mXg","choiceOrder":3,"choiceValue":"1584432000000","choiceType":"DATETIME","description":"","choiceIsDeletable":true,"report":null}, + {"id":"biIjpqisTrCbwUn_iqydFw","permission":"6Mt9vhVtSKCUdt8tzL2mXg","choiceOrder":4,"choiceValue":"White pizza","choiceType":"TEXT","description":"","choiceIsDeletable":true,"report":null}, + {"id":"x7NP89PYQn29kjj_nmJdig","permission":"6Mt9vhVtSKCUdt8tzL2mXg","choiceOrder":5,"choiceValue":"Sicilian pizza","choiceType":"TEXT","description":"","choiceIsDeletable":true,"report":null}, + {"id":"8ehtpOvQQ3enNf-o1so6oQ","permission":"6Mt9vhVtSKCUdt8tzL2mXg","choiceOrder":6,"choiceValue":"Margherita","choiceType":"TEXT","description":"","choiceIsDeletable":true,"report":null} + ], + "choiceCount":7, + "voteCount":0, + "commentCount":0, + "questionOrder":0, + "canVote":true, + "report":null} + ] + }; + +/* +export const finishedPoll = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: endedPoll}); +}; +export const startedPollWithEndDate = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: startedPoll}); +}; +export const startedPollWithNoEndDate = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: startedPollNoEnd}); +}; +export const pollStartingInFuture = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: startingPoll}); +}; +export const pollWithLongDescription = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: pollLongDescription}); +}; +export const pollWithLongTitle = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: pollLongTitle}); +}; +export const pollWithLongTitleAndDescription = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: pollLongTitleDesc}); +};*/ +export const pollReal = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: realPoll}); +}; +/* +export const pollNoDescription = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: noDescPoll}); +}; +export const pollEmptyDescription = () => { + riot.mixin(uiHelper); + riot.mixin(i18nHelper); + return mount("pollsummary", {poll: emptyDescPoll}); +}; +*/ -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm