From e74ea2dfd4b41a6a4ebda65e75685a538f329cd3 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Mon, 7 Feb 2022 16:12:32 +0100 Subject: [PATCH] display choices grouped in consult vote --- mocks/old-stuff/config/PollConfig.ts | 4 +- mocks/old-stuff/po/bn.po | 12 +-- mocks/old-stuff/po/br.po | 12 +-- mocks/old-stuff/po/ca.po | 12 +-- mocks/old-stuff/po/cs.po | 12 +-- mocks/old-stuff/po/de.po | 12 +-- mocks/old-stuff/po/el.po | 12 +-- mocks/old-stuff/po/en.po | 24 +++--- mocks/old-stuff/po/es.po | 12 +-- mocks/old-stuff/po/fr.po | 12 +-- mocks/old-stuff/po/framadate.pot | 12 +-- mocks/old-stuff/po/gl.po | 12 +-- mocks/old-stuff/po/hu.po | 12 +-- mocks/old-stuff/po/it.po | 12 +-- mocks/old-stuff/po/nl.po | 12 +-- mocks/old-stuff/po/oc.po | 12 +-- mocks/old-stuff/po/pt_BR.po | 12 +-- mocks/old-stuff/po/ru.po | 12 +-- mocks/old-stuff/po/sv.po | 12 +-- src/app/app.module.ts | 3 +- src/app/core/models/poll.model.ts | 1 + src/app/core/services/storage.service.ts | 2 - .../date/list/day/day-list.component.html | 4 +- .../consultation-routing.module.ts | 2 +- .../consultation/consultation.component.html | 9 ++- .../consultation/consultation.component.ts | 2 +- .../consultation/consultation.module.ts | 2 - .../consultation/edit/edit.component.html | 80 ++++++++++++------- .../consultation/edit/edit.component.ts | 54 ++++++++++--- .../choice-button-dinum.component.html | 8 ++ .../choice-button-dinum.component.scss | 0 .../choice-button-dinum.component.spec.ts | 24 ++++++ .../choice-button-dinum.component.ts | 22 +++++ .../language-selector.component.ts | 11 --- src/app/shared/shared.module.ts | 2 + 35 files changed, 284 insertions(+), 174 deletions(-) create mode 100644 src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.html create mode 100644 src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.scss create mode 100644 src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.spec.ts create mode 100644 src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.ts diff --git a/mocks/old-stuff/config/PollConfig.ts b/mocks/old-stuff/config/PollConfig.ts index cdaed816..4484c632 100644 --- a/mocks/old-stuff/config/PollConfig.ts +++ b/mocks/old-stuff/config/PollConfig.ts @@ -40,12 +40,12 @@ export class PollConfig { myEmail: string = environment.production ? '' : 'tktest@tktest.com'; myPolls: any = []; // list of retrieved polls from the backend api /* - date specific poll, we have the choice to setup different hours (timeSlices) for all possible dates (dateChoices), or use the same hours for all dates + date specific poll, we have the group_choice to setup different hours (timeSlices) for all possible dates (dateChoices), or use the same hours for all dates */ allowSeveralHours = 'true'; // access visibility = 'link_only'; // visible to anyone with the link: - voteChoices = 'only_yes'; // possible answers to a vote choice: only "yes", "yes, maybe, no" + voteChoices = 'only_yes'; // possible answers to a vote group_choice: only "yes", "yes, maybe, no" creationDate = new Date(); expirationDate = ''; // expiracy date voteStackId = null; // id of the vote stack to update diff --git a/mocks/old-stuff/po/bn.po b/mocks/old-stuff/po/bn.po index a1183c86..b95d0faa 100755 --- a/mocks/old-stuff/po/bn.po +++ b/mocks/old-stuff/po/bn.po @@ -1074,7 +1074,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "" #: .Poll+results.Best+choices @@ -1114,7 +1114,7 @@ msgid "Scroll to the right" msgstr "" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "" #: .Poll+results.The+current+best+choices+are: @@ -1460,7 +1460,7 @@ msgid "Return to step 1" msgstr "" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "" #: .Step+2+classic.Add+a+link+or+an+image @@ -1484,7 +1484,7 @@ msgid "Poll options (2 of 3)" msgstr "" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link,+an+image+or+both. @@ -1647,7 +1647,7 @@ msgid "Choice added" msgstr "" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" #: .adminstuds.Column+deleted @@ -1784,7 +1784,7 @@ msgstr "" #: .studs.If+you+want+to+vote+in+this+poll,+you+have+to+give+your+name,+make+your+choice,+and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" #: .studs.The+administrator+locked+this+poll.+Votes+and+comments+are+frozen,+it+is+no+longer+possible+to+participate diff --git a/mocks/old-stuff/po/br.po b/mocks/old-stuff/po/br.po index b543f54e..155c6318 100755 --- a/mocks/old-stuff/po/br.po +++ b/mocks/old-stuff/po/br.po @@ -1146,7 +1146,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Dibab gwellañ" #: .Poll+results.Best+choices @@ -1186,7 +1186,7 @@ msgid "Scroll to the right" msgstr "Dibunañ d'an tu dehou" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "Evit ar mare, an dibab gant ar muiañ a vouezhioù a zo:" #: .Poll+results.The+current+best+choices+are: @@ -1541,7 +1541,7 @@ msgid "Return to step 1" msgstr "Distreiñ d'ar bazenn 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Ouzhpennañ un dibab" #: .Step+2+classic.Add+a+link+or+an+image @@ -1565,7 +1565,7 @@ msgid "Poll options (2 of 3)" msgstr "Dibab an danvezioù (2 War 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Dilemel an dibab diwezhañ" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1756,7 +1756,7 @@ msgid "Choice added" msgstr "Dibab ouzhpennet" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" #: .adminstuds.Column+deleted @@ -1901,7 +1901,7 @@ msgstr "Deiziad dilemel:" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Evit kemer perzh er sontadeg-mañ, enankit hoc'h anv, grit ho tibab ha " "kadarnait gant an afell e dibenn al linenn." diff --git a/mocks/old-stuff/po/ca.po b/mocks/old-stuff/po/ca.po index 128173e6..f07230ff 100755 --- a/mocks/old-stuff/po/ca.po +++ b/mocks/old-stuff/po/ca.po @@ -1159,7 +1159,7 @@ msgstr "" "que hàgiu votat" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Millor elecció" #: .Poll+results.Best+choices @@ -1199,7 +1199,7 @@ msgid "Scroll to the right" msgstr "Desplaça't cap a la dreta" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "Ara per ara, l'opció més votada és:" #: .Poll+results.The+current+best+choices+are: @@ -1561,7 +1561,7 @@ msgid "Return to step 1" msgstr "Torna al pas 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Afegeix una elecció" #: .Step+2+classic.Add+a+link+or+an+image @@ -1585,7 +1585,7 @@ msgid "Poll options (2 of 3)" msgstr "Opcions de votació (2 de 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Elimina una elecció" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1772,7 +1772,7 @@ msgid "Choice added" msgstr "S'ha afegit una opció" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" "Recopila els correus electrònics dels usuaris enquestats per a l'elecció" @@ -1922,7 +1922,7 @@ msgstr "Data de supressió:" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Si voleu votar en aquesta enquesta, cal que indiqueu el vostre nom, feu " "l'elecció i envieu-la seleccionant el botó de desar al final de la línia." diff --git a/mocks/old-stuff/po/cs.po b/mocks/old-stuff/po/cs.po index 235d6221..d1c832d6 100755 --- a/mocks/old-stuff/po/cs.po +++ b/mocks/old-stuff/po/cs.po @@ -1095,7 +1095,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "" #: .Poll+results.Best+choices @@ -1135,7 +1135,7 @@ msgid "Scroll to the right" msgstr "" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "" #: .Poll+results.The+current+best+choices+are: @@ -1481,7 +1481,7 @@ msgid "Return to step 1" msgstr "" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "" #: .Step+2+classic.Add+a+link+or+an+image @@ -1505,7 +1505,7 @@ msgid "Poll options (2 of 3)" msgstr "" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link,+an+image+or+both. @@ -1668,7 +1668,7 @@ msgid "Choice added" msgstr "" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" #: .adminstuds.Column+deleted @@ -1805,7 +1805,7 @@ msgstr "Datum smazání:" #: .studs.If+you+want+to+vote+in+this+poll,+you+have+to+give+your+name,+make+your+choice,+and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" #: .studs.The+administrator+locked+this+poll.+Votes+and+comments+are+frozen,+it+is+no+longer+possible+to+participate diff --git a/mocks/old-stuff/po/de.po b/mocks/old-stuff/po/de.po index 9cc6c72b..b920dfb0 100755 --- a/mocks/old-stuff/po/de.po +++ b/mocks/old-stuff/po/de.po @@ -1167,7 +1167,7 @@ msgstr "" "Jeder wird Ihre E-Mail-Adresse sehen können nachdem Sie abgestimmt haben" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Beste Alternative" #: .Poll+results.Best+choices @@ -1207,7 +1207,7 @@ msgid "Scroll to the right" msgstr "Nach rechts scrollen" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "Die beste Option ist derzeit:" #: .Poll+results.The+current+best+choices+are: @@ -1567,7 +1567,7 @@ msgid "Return to step 1" msgstr "Zurück zum 1. Schritt" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Eine Auswahlmöglichkeit hinzufügen" #: .Step+2+classic.Add+a+link+or+an+image @@ -1593,7 +1593,7 @@ msgid "Poll options (2 of 3)" msgstr "Umfrageoptionen (2 von 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Eine Auswahlmöglichkeit entfernen" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1787,7 +1787,7 @@ msgid "Choice added" msgstr "Option hinzugefügt" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" "Sammeln der E-Mail-Adressen der zur Abstimmung eingeladenen Benutzer für die " "Auswahl" @@ -1942,7 +1942,7 @@ msgstr "Löschdatum:" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Wenn Sie an dieser Umfrage teilnehmen möchten, müssen Sie ihren Namen " "angeben, die Auswahl treffen, die Ihnen am ehesten zusagt und mit dem " diff --git a/mocks/old-stuff/po/el.po b/mocks/old-stuff/po/el.po index 320e57ec..a1bd16d4 100755 --- a/mocks/old-stuff/po/el.po +++ b/mocks/old-stuff/po/el.po @@ -1155,7 +1155,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "Οποιοσδήποτε θα μπορεί να δει το email σας αφού ψηφήσετε" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Βέλτιστη επιλογή" #: .Poll+results.Best+choices @@ -1195,7 +1195,7 @@ msgid "Scroll to the right" msgstr "Κύλιση προς τα δεξιά" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "Η τρέχουσα καλύτερη επιλογή είναι:" #: .Poll+results.The+current+best+choices+are: @@ -1556,7 +1556,7 @@ msgid "Return to step 1" msgstr "Επιστροφή στο βήμα 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Προσθήκη επιλογής" #: .Step+2+classic.Add+a+link+or+an+image @@ -1580,7 +1580,7 @@ msgid "Poll options (2 of 3)" msgstr "Επιλογές ψηφοφορίας (2 από 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Αφαίρεση επιλογής" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link,+an+image+or+both. @@ -1758,7 +1758,7 @@ msgid "Choice added" msgstr "Η επιλογή προστέθηκε" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "Συλλογή των email των ψηφισάντων χρηστών για την επιλογή" #: .adminstuds.Column+deleted @@ -1904,7 +1904,7 @@ msgstr "Ημερομηνία διαγραφής:" #: .studs.If+you+want+to+vote+in+this+poll,+you+have+to+give+your+name,+make+your+choice,+and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Αν θέλετε να συμμετέχετε σε αυτήν την ψηφοφορία, πρέπει να συμπληρώσετε το " "όνομά σας, να κάνετε την επιλογή σας, και να την υποβάλλετε επιλέγοντας το " diff --git a/mocks/old-stuff/po/en.po b/mocks/old-stuff/po/en.po index a945770f..a09baa1f 100755 --- a/mocks/old-stuff/po/en.po +++ b/mocks/old-stuff/po/en.po @@ -1152,8 +1152,8 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "Anyone will be able to see your email address after you voted" #: .Poll+results.Best+choice -msgid "Best choice" -msgstr "Best choice" +msgid "Best group_choice" +msgstr "Best group_choice" #: .Poll+results.Best+choices msgid "Best choices" @@ -1192,8 +1192,8 @@ msgid "Scroll to the right" msgstr "Scroll to the right" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" -msgstr "The current best choice is:" +msgid "The current best group_choice is:" +msgstr "The current best group_choice is:" #: .Poll+results.The+current+best+choices+are: msgid "The current best choices are:" @@ -1548,8 +1548,8 @@ msgid "Return to step 1" msgstr "Return to step 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" -msgstr "Add a choice" +msgid "Add a group_choice" +msgstr "Add a group_choice" #: .Step+2+classic.Add+a+link+or+an+image msgid "Add a link or an image" @@ -1572,8 +1572,8 @@ msgid "Poll options (2 of 3)" msgstr "Poll options (2 of 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" -msgstr "Remove a choice" +msgid "Remove a group_choice" +msgstr "Remove a group_choice" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link #: +an+image+or+both. @@ -1757,8 +1757,8 @@ msgid "Choice added" msgstr "Choice added" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" -msgstr "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" +msgstr "Collect the emails of the polled users for the group_choice" #: .adminstuds.Column+deleted msgid "Column deleted" @@ -1907,10 +1907,10 @@ msgstr "Deletion date:" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." #: .studs.The+administrator+locked+this+poll.+Votes+and+comments+are+frozen #: +it+is+no+longer+possible+to+participate diff --git a/mocks/old-stuff/po/es.po b/mocks/old-stuff/po/es.po index 1e2364d9..d25e3d24 100755 --- a/mocks/old-stuff/po/es.po +++ b/mocks/old-stuff/po/es.po @@ -1172,7 +1172,7 @@ msgstr "" "Cualquiera podrá ver tu dirección de correo electrónico después de votar" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Elección más popular" #: .Poll+results.Best+choices @@ -1212,7 +1212,7 @@ msgid "Scroll to the right" msgstr "Desplazar hacia la derecha" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "La elección más popular actualmente es:" #: .Poll+results.The+current+best+choices+are: @@ -1575,7 +1575,7 @@ msgid "Return to step 1" msgstr "Volver al paso número 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Añadir una opción" #: .Step+2+classic.Add+a+link+or+an+image @@ -1599,7 +1599,7 @@ msgid "Poll options (2 of 3)" msgstr "Elegir los temas (2 de 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Eliminar una opción" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1786,7 +1786,7 @@ msgid "Choice added" msgstr "Elección añadida" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" "Recopilar los correos electrónicos de los usuarios encuestados para la " "elección" @@ -1937,7 +1937,7 @@ msgstr "Fecha de supresión:" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Si quieres votar en esta encuesta, tienes que dar tu nombre, hacer tu " "elección y enviarla seleccionando el botón guardar al final de la línea." diff --git a/mocks/old-stuff/po/fr.po b/mocks/old-stuff/po/fr.po index b3483986..55bfc720 100755 --- a/mocks/old-stuff/po/fr.po +++ b/mocks/old-stuff/po/fr.po @@ -1181,7 +1181,7 @@ msgstr "" "Tout le monde pourra accéder à votre courriel après que vous ayez voté" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Meilleur choix" #: .Poll+results.Best+choices @@ -1221,7 +1221,7 @@ msgid "Scroll to the right" msgstr "Faire défiler à droite" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "" "Pour l'instant, le choix ayant reçu le plus grand nombre de votes est :" @@ -1582,7 +1582,7 @@ msgid "Return to step 1" msgstr "Revenir à l’étape 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Ajouter un choix" #: .Step+2+classic.Add+a+link+or+an+image @@ -1606,7 +1606,7 @@ msgid "Poll options (2 of 3)" msgstr "Choix des sujets (2 sur 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Supprimer le dernier choix" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1799,7 +1799,7 @@ msgid "Choice added" msgstr "Choix ajouté" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "Collecter les courriels des utilisateurs pour ce choix" #: .adminstuds.Column+deleted @@ -1950,7 +1950,7 @@ msgstr "Date de suppression :" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Pour participer à ce sondage, veuillez entrer votre nom, choisir toutes les " "valeurs qui vous conviennent et valider votre choix avec le bouton en bout " diff --git a/mocks/old-stuff/po/framadate.pot b/mocks/old-stuff/po/framadate.pot index 6b6d0938..0aa727aa 100755 --- a/mocks/old-stuff/po/framadate.pot +++ b/mocks/old-stuff/po/framadate.pot @@ -1074,7 +1074,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "" #: .Poll+results.Best+choices @@ -1114,7 +1114,7 @@ msgid "Scroll to the right" msgstr "" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "" #: .Poll+results.The+current+best+choices+are: @@ -1460,7 +1460,7 @@ msgid "Return to step 1" msgstr "" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "" #: .Step+2+classic.Add+a+link+or+an+image @@ -1484,7 +1484,7 @@ msgid "Poll options (2 of 3)" msgstr "" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link,+an+image+or+both. @@ -1647,7 +1647,7 @@ msgid "Choice added" msgstr "" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" #: .adminstuds.Column+deleted @@ -1784,7 +1784,7 @@ msgstr "" #: .studs.If+you+want+to+vote+in+this+poll,+you+have+to+give+your+name,+make+your+choice,+and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" #: .studs.The+administrator+locked+this+poll.+Votes+and+comments+are+frozen,+it+is+no+longer+possible+to+participate diff --git a/mocks/old-stuff/po/gl.po b/mocks/old-stuff/po/gl.po index 38e61af5..a889831e 100755 --- a/mocks/old-stuff/po/gl.po +++ b/mocks/old-stuff/po/gl.po @@ -1138,7 +1138,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "Calquera pode ver o seu enderezo de correo electrónico despois de votar" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "A mellor escolla" #: .Poll+results.Best+choices @@ -1178,7 +1178,7 @@ msgid "Scroll to the right" msgstr "Desprazarse cada a dereita" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "Actualmente a mellor escolla é:" #: .Poll+results.The+current+best+choices+are: @@ -1536,7 +1536,7 @@ msgid "Return to step 1" msgstr "Volver ao paso 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Engadir unha opción" #: .Step+2+classic.Add+a+link+or+an+image @@ -1560,7 +1560,7 @@ msgid "Poll options (2 of 3)" msgstr "Opcións da enquisa (2 de 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Borrar unha opción" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link,+an+image+or+both. @@ -1736,7 +1736,7 @@ msgid "Choice added" msgstr "Engadiuse unha opción" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "Recoller os correos electrónicos dos usuarios enquisados para a escolla" #: .adminstuds.Column+deleted @@ -1881,7 +1881,7 @@ msgstr "Data de borrado:" #: .studs.If+you+want+to+vote+in+this+poll,+you+have+to+give+your+name,+make+your+choice,+and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Se quere votar nesta enquisa, ten que fornecer o seu nome, marcar a súa " "escolla, e enviala seleccionando o botón gardar ao final da liña." diff --git a/mocks/old-stuff/po/hu.po b/mocks/old-stuff/po/hu.po index 80f64f18..00fca46f 100755 --- a/mocks/old-stuff/po/hu.po +++ b/mocks/old-stuff/po/hu.po @@ -1150,7 +1150,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "Ha szavaz, akkor az e-mail címét bárki megtekintheti" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Legjobb választás" #: .Poll+results.Best+choices @@ -1190,7 +1190,7 @@ msgid "Scroll to the right" msgstr "Görgetés jobbra" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "Jelenlegi legjobb lehetőség:" #: .Poll+results.The+current+best+choices+are: @@ -1547,7 +1547,7 @@ msgid "Return to step 1" msgstr "Vissza az 1. lépéshez" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Lehetőség hozzáadása" #: .Step+2+classic.Add+a+link+or+an+image @@ -1571,7 +1571,7 @@ msgid "Poll options (2 of 3)" msgstr "Szavazási beállítások (2/3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Lehetőség eltávolítása" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1757,7 +1757,7 @@ msgid "Choice added" msgstr "Lehetőség hozzáadva" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "Az erre szavazó felhasználók e-mail címének begyűjtése" #: .adminstuds.Column+deleted @@ -1905,7 +1905,7 @@ msgstr "Törlési idő:" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Ha szeretne részt venni ebben a szavazásban, meg kell adnia a nevét, a " "válaszait, és a sor végén lévő mentés gombra kattintva be kell küldenie." diff --git a/mocks/old-stuff/po/it.po b/mocks/old-stuff/po/it.po index e63a4b6e..a37b4d08 100755 --- a/mocks/old-stuff/po/it.po +++ b/mocks/old-stuff/po/it.po @@ -1165,7 +1165,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "Chiunque può vedere il tuo indirizzo mail dopo il tuo voto" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Scelta migliore" #: .Poll+results.Best+choices @@ -1205,7 +1205,7 @@ msgid "Scroll to the right" msgstr "Spostare a destra" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "La migliore scelta per ora è:" #: .Poll+results.The+current+best+choices+are: @@ -1562,7 +1562,7 @@ msgid "Return to step 1" msgstr "Torna al punto 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Aggiungere un scelta" #: .Step+2+classic.Add+a+link+or+an+image @@ -1586,7 +1586,7 @@ msgid "Poll options (2 of 3)" msgstr "Scelta delle opzioni (2 di 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Eliminare l'ultima scelta" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1776,7 +1776,7 @@ msgid "Choice added" msgstr "Scelta aggiunta" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "Raccogli le mail degli utenti che hanno scelto questa opzione" #: .adminstuds.Column+deleted @@ -1927,7 +1927,7 @@ msgstr "Data di cancellazione:" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Per partecipare a questo sondaggio, è necessario inserire vostro nome, " "scegliere tutti i parametri che preferite e confermare la vostra scelta con " diff --git a/mocks/old-stuff/po/nl.po b/mocks/old-stuff/po/nl.po index 63a30689..5f5fb4a5 100755 --- a/mocks/old-stuff/po/nl.po +++ b/mocks/old-stuff/po/nl.po @@ -1153,7 +1153,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "Iedereen zal je e-mailadres kunnen zien nadat je gestemd hebt" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Beste keuze" #: .Poll+results.Best+choices @@ -1193,7 +1193,7 @@ msgid "Scroll to the right" msgstr "Scroll naar rechts" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "De beste keuze is op dit moment:" #: .Poll+results.The+current+best+choices+are: @@ -1551,7 +1551,7 @@ msgid "Return to step 1" msgstr "Terug naar stap 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Voeg een keuze toe" #: .Step+2+classic.Add+a+link+or+an+image @@ -1575,7 +1575,7 @@ msgid "Poll options (2 of 3)" msgstr "Poll keuzes (2 van 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Verwijder een keuze" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1761,7 +1761,7 @@ msgid "Choice added" msgstr "Keuze toegevoegd" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" "Verzamel de e-mailadressen van de ondervraagde gebruikers voor de optie" @@ -1911,7 +1911,7 @@ msgstr "Verwijderdatum:" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Als je wilt stemmen in deze poll, moet je je naam ingeven, een keuze maken " "en indienen door op de opslaan-knop op het einde van de lijn te klikken." diff --git a/mocks/old-stuff/po/oc.po b/mocks/old-stuff/po/oc.po index a575c064..f838d430 100755 --- a/mocks/old-stuff/po/oc.po +++ b/mocks/old-stuff/po/oc.po @@ -1170,7 +1170,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "Tot lo monde poirà veire vòstra adreça de corrièl aprèp vòstre vòte" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Milhora causida" #: .Poll+results.Best+choices @@ -1210,7 +1210,7 @@ msgid "Scroll to the right" msgstr "Far desfilar a man drecha" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "Pel moment, la causida amb lo mai de vòtes es :" #: .Poll+results.The+current+best+choices+are: @@ -1569,7 +1569,7 @@ msgid "Return to step 1" msgstr "Tornar a l’etapa 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Apondre una causida" #: .Step+2+classic.Add+a+link+or+an+image @@ -1593,7 +1593,7 @@ msgid "Poll options (2 of 3)" msgstr "Causida dels tèmas (2 sus 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Suprimir la darrièra causida" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link @@ -1783,7 +1783,7 @@ msgid "Choice added" msgstr "Causida aponduda" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "Collècta de las adreças dels votants per la causida" #: .adminstuds.Column+deleted @@ -1928,7 +1928,7 @@ msgstr "Data de supression :" #: +and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Se volètz votar per aqueste sondatge, avètz de donar vòstre nom, far una " "causida, e l’enviar en seleccionar lo boton de salvagarda al cap de la linha." diff --git a/mocks/old-stuff/po/pt_BR.po b/mocks/old-stuff/po/pt_BR.po index 748843a8..db3f615e 100755 --- a/mocks/old-stuff/po/pt_BR.po +++ b/mocks/old-stuff/po/pt_BR.po @@ -1127,7 +1127,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "" #: .Poll+results.Best+choices @@ -1167,7 +1167,7 @@ msgid "Scroll to the right" msgstr "" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "" #: .Poll+results.The+current+best+choices+are: @@ -1513,7 +1513,7 @@ msgid "Return to step 1" msgstr "" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "" #: .Step+2+classic.Add+a+link+or+an+image @@ -1537,7 +1537,7 @@ msgid "Poll options (2 of 3)" msgstr "" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link,+an+image+or+both. @@ -1700,7 +1700,7 @@ msgid "Choice added" msgstr "" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" #: .adminstuds.Column+deleted @@ -1837,7 +1837,7 @@ msgstr "" #: .studs.If+you+want+to+vote+in+this+poll,+you+have+to+give+your+name,+make+your+choice,+and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" #: .studs.The+administrator+locked+this+poll.+Votes+and+comments+are+frozen,+it+is+no+longer+possible+to+participate diff --git a/mocks/old-stuff/po/ru.po b/mocks/old-stuff/po/ru.po index f3599f5d..456fe796 100755 --- a/mocks/old-stuff/po/ru.po +++ b/mocks/old-stuff/po/ru.po @@ -1077,7 +1077,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "" #: .Poll+results.Best+choices @@ -1117,7 +1117,7 @@ msgid "Scroll to the right" msgstr "" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "" #: .Poll+results.The+current+best+choices+are: @@ -1463,7 +1463,7 @@ msgid "Return to step 1" msgstr "" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "" #: .Step+2+classic.Add+a+link+or+an+image @@ -1487,7 +1487,7 @@ msgid "Poll options (2 of 3)" msgstr "" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link,+an+image+or+both. @@ -1650,7 +1650,7 @@ msgid "Choice added" msgstr "" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "" #: .adminstuds.Column+deleted @@ -1787,7 +1787,7 @@ msgstr "" #: .studs.If+you+want+to+vote+in+this+poll,+you+have+to+give+your+name,+make+your+choice,+and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" #: .studs.The+administrator+locked+this+poll.+Votes+and+comments+are+frozen,+it+is+no+longer+possible+to+participate diff --git a/mocks/old-stuff/po/sv.po b/mocks/old-stuff/po/sv.po index bba5ff90..de357a5e 100755 --- a/mocks/old-stuff/po/sv.po +++ b/mocks/old-stuff/po/sv.po @@ -1136,7 +1136,7 @@ msgid "Anyone will be able to see your email address after you voted" msgstr "Vem som helst kan se din e-postadress när du har röstat" #: .Poll+results.Best+choice -msgid "Best choice" +msgid "Best group_choice" msgstr "Bästa val" #: .Poll+results.Best+choices @@ -1176,7 +1176,7 @@ msgid "Scroll to the right" msgstr "Rulla åt höger" #: .Poll+results.The+current+best+choice+is: -msgid "The current best choice is:" +msgid "The current best group_choice is:" msgstr "Det bästa valet är för tillfället:" #: .Poll+results.The+current+best+choices+are: @@ -1526,7 +1526,7 @@ msgid "Return to step 1" msgstr "Gå tillbaka till steg 1" #: .Step+2+classic.Add+a+choice -msgid "Add a choice" +msgid "Add a group_choice" msgstr "Lägg till ett alternativ" #: .Step+2+classic.Add+a+link+or+an+image @@ -1550,7 +1550,7 @@ msgid "Poll options (2 of 3)" msgstr "Alternativ för undersökningen (2 av 3)" #: .Step+2+classic.Remove+a+choice -msgid "Remove a choice" +msgid "Remove a group_choice" msgstr "Ta bort ett alternativ" #: .Step+2+classic.These+fields+are+optional.+You+can+add+a+link,+an+image+or+both. @@ -1724,7 +1724,7 @@ msgid "Choice added" msgstr "Alternativ tillagt" #: .adminstuds.Collect+the+emails+of+the+polled+users+for+the+choice -msgid "Collect the emails of the polled users for the choice" +msgid "Collect the emails of the polled users for the group_choice" msgstr "Samla in e-postadresserna till de deltagare som röstade om alternativet" #: .adminstuds.Column+deleted @@ -1869,7 +1869,7 @@ msgstr "Raderingsdatum:" #: .studs.If+you+want+to+vote+in+this+poll,+you+have+to+give+your+name,+make+your+choice,+and+submit+it+by+selecting+the+save+button+at+the+end+of+the+line. msgid "" "If you want to vote in this poll, you have to give your name, make your " -"choice, and submit it by selecting the save button at the end of the line." +"group_choice, and submit it by selecting the save button at the end of the line." msgstr "" "Om du vill delta i den här undersökningen måste du uppge ditt namn, lägga " "din röst och skicka den genom att klicka på spara-knappen vid slutet av " diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 42dc0750..ba0fb564 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -30,6 +30,7 @@ import { ErrorsListComponent } from './features/shared/components/ui/form/errors import { KeyboardShortcutsModule } from 'ng-keyboard-shortcuts'; import { AdministrationModule } from './features/administration/administration.module'; import { EditComponent } from './features/consultation/edit/edit.component'; +import { ChoiceButtonDinumComponent } from './features/shared/components/choice-button-dinum/choice-button-dinum.component'; // register languages files for translation // import localeEn from '@angular/common/locales/en'; @@ -82,6 +83,6 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader { ], providers: [Title, TranslateService], bootstrap: [AppComponent], - exports: [ErrorsListComponent], + exports: [ErrorsListComponent, ChoiceButtonDinumComponent], }) export class AppModule {} diff --git a/src/app/core/models/poll.model.ts b/src/app/core/models/poll.model.ts index 9c48f630..f030df45 100644 --- a/src/app/core/models/poll.model.ts +++ b/src/app/core/models/poll.model.ts @@ -40,6 +40,7 @@ export class Poll { public stacks = []; public timeSlices: TimeSlices[] = Object.create(defaultTimeOfDay); // ranges of time expressed as strings public votes = []; + public votes_allowed: boolean = true; constructor(public owner: Owner = new Owner(), public title = 'mon titre', public custom_url: string = '') {} } diff --git a/src/app/core/services/storage.service.ts b/src/app/core/services/storage.service.ts index f7671f1a..9c7d3bff 100644 --- a/src/app/core/services/storage.service.ts +++ b/src/app/core/services/storage.service.ts @@ -64,8 +64,6 @@ export class StorageService { if (!this.vote_stack.id) { this.vote_stack = new Stack(); - - console.log('choices_list', choices_list); for (const choice of choices_list) { // if (environment.autofill_participation) { // console.log('autofill au hasard des votes à ce sondage'); diff --git a/src/app/features/administration/form/date/list/day/day-list.component.html b/src/app/features/administration/form/date/list/day/day-list.component.html index bce917d5..07a6f613 100644 --- a/src/app/features/administration/form/date/list/day/day-list.component.html +++ b/src/app/features/administration/form/date/list/day/day-list.component.html @@ -17,8 +17,8 @@
{{ 'dates.format_helper' | translate }} diff --git a/src/app/features/consultation/consultation-routing.module.ts b/src/app/features/consultation/consultation-routing.module.ts index 16fdc3f9..4a980cf7 100644 --- a/src/app/features/consultation/consultation-routing.module.ts +++ b/src/app/features/consultation/consultation-routing.module.ts @@ -19,8 +19,8 @@ const routes: Routes = [ { path: 'secure/:pass_hash', component: ConsultationComponent }, { path: 'prompt', component: PasswordPromptComponent }, { path: 'table', component: WipTodoComponent }, - { path: 'user-info', component: ConsultationUserComponent }, { path: 'vote', component: EditComponent }, + { path: 'vote/user-infos', component: ConsultationUserComponent }, { path: 'edit/:voteStackId', component: EditComponent }, { path: 'success', component: SuccessComponent }, { path: 'page-not-found', component: PageNotFoundComponent }, diff --git a/src/app/features/consultation/consultation.component.html b/src/app/features/consultation/consultation.component.html index 70ddafed..879451b0 100644 --- a/src/app/features/consultation/consultation.component.html +++ b/src/app/features/consultation/consultation.component.html @@ -64,9 +64,16 @@

{{ poll.description }}

- + + Les votes sont désactivés +

diff --git a/src/app/features/consultation/consultation.component.ts b/src/app/features/consultation/consultation.component.ts index cc133e24..0fdfd8ce 100644 --- a/src/app/features/consultation/consultation.component.ts +++ b/src/app/features/consultation/consultation.component.ts @@ -60,7 +60,7 @@ export class ConsultationComponent implements OnInit, OnDestroy { console.log('this.pass_hash ', this.pass_hash); if (this.pass_hash) { this.pollService.loadPollByCustomUrlWithPasswordHash(this.pollSlug, this.pass_hash).then((resp) => { - console.log('loadPollByCustomUrlWithPasswordHash resp', resp); + console.log('loadPollByCustomUrlWithPasswordHash resp', this.pollService._poll.getValue()); this.fetching = false; this.storageService.vote_stack.id = null; this.storageService.setChoicesForVoteStack(this.pollService._poll.getValue().choices); diff --git a/src/app/features/consultation/consultation.module.ts b/src/app/features/consultation/consultation.module.ts index a05facd9..8cfb8191 100644 --- a/src/app/features/consultation/consultation.module.ts +++ b/src/app/features/consultation/consultation.module.ts @@ -9,8 +9,6 @@ import { PollResultsCompactComponent } from './poll-results-compact/poll-results import { PollResultsDetailedComponent } from './poll-results-detailed/poll-results-detailed.component'; import { ChoiceButtonComponent } from '../../shared/components/choice-item/choice-button.component'; import { PasswordPromptComponent } from './password/password-prompt/password-prompt.component'; -import { ChoiceDetailsComponent } from '../../shared/components/choice-details/choice-details.component'; -import { CoreModule } from '../../core/core.module'; import { ConsultationLandingComponent } from './consultation-landing/consultation-landing.component'; import { ConsultationUserComponent } from './consultation-user/consultation-user.component'; import { SuccessComponent } from './success/success.component'; diff --git a/src/app/features/consultation/edit/edit.component.html b/src/app/features/consultation/edit/edit.component.html index 49c0e8ce..ee0252ae 100644 --- a/src/app/features/consultation/edit/edit.component.html +++ b/src/app/features/consultation/edit/edit.component.html @@ -1,36 +1,60 @@ - +

{{ 'participation.voting_title' | translate }}

-
-
-
-
-
-

- {{ choice.name }} -

- - - + + + + +
+ {{ poll.title }} +
+

+ {{ group_choice.name }} +

+
+
+ {{ choice.name }} +
+ +
+ + + + + + +
+
- +
+ no poll +
+
+
+ +
+
diff --git a/src/app/features/consultation/edit/edit.component.ts b/src/app/features/consultation/edit/edit.component.ts index c57883c3..10f5161f 100644 --- a/src/app/features/consultation/edit/edit.component.ts +++ b/src/app/features/consultation/edit/edit.component.ts @@ -1,10 +1,14 @@ import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core'; import { DateUtilitiesService } from '../../../core/services/date.utilities.service'; -import { Router } from '@angular/router'; +import { ActivatedRoute, ParamMap, Router } from '@angular/router'; import { ToastService } from '../../../core/services/toast.service'; import { DOCUMENT } from '@angular/common'; import { StorageService } from '../../../core/services/storage.service'; import { PollService } from '../../../core/services/poll.service'; +import { Poll } from '../../../core/models/poll.model'; +import { PollUtilitiesService } from '../../../core/services/poll.utilities.service'; +import { ApiService } from '../../../core/services/api.service'; +import { DateService } from '../../../core/services/date.service'; @Component({ selector: 'app-edit', @@ -12,17 +16,49 @@ import { PollService } from '../../../core/services/poll.service'; styleUrls: ['./edit.component.scss'], }) export class EditComponent implements OnInit { + public poll: Poll; + public fetching = true; + private pollSlug: string; + private pass_hash: string; + constructor( - private dateUtilitiesService: DateUtilitiesService, private router: Router, - private toastService: ToastService, - private cd: ChangeDetectorRef, - @Inject(DOCUMENT) private document: any, - private storageService: StorageService, - public pollService: PollService + private utils: PollUtilitiesService, + private _Activatedroute: ActivatedRoute, + public storageService: StorageService, + public api: ApiService, + public pollService: PollService, + public dateService: DateService, + public toastService: ToastService ) { - this.pollService.step_current = 4; + this.pollService.poll.subscribe((newpoll: Poll) => { + console.log('newpoll', newpoll); + this.poll = newpoll; + }); } - ngOnInit(): void {} + ngOnInit(): void { + this._Activatedroute.paramMap.subscribe((params: ParamMap) => { + console.log('params _Activatedroute', params); + this.pollSlug = params.get('custom_url'); + this.pass_hash = params.get('pass_hash'); + + console.log('this.pass_hash ', this.pass_hash); + if (this.pass_hash) { + this.pollService.loadPollByCustomUrlWithPasswordHash(this.pollSlug, this.pass_hash).then((resp) => { + console.log('loadPollByCustomUrlWithPasswordHash resp', this.pollService._poll.getValue()); + this.fetching = false; + this.storageService.vote_stack.id = null; + this.storageService.setChoicesForVoteStack(this.pollService._poll.getValue().choices); + }); + } else { + this.pollService.loadPollByCustomUrl(this.pollSlug).then((resp) => { + console.log('loadPollByCustomUrl resp', resp); + this.fetching = false; + this.storageService.vote_stack.id = null; + this.storageService.setChoicesForVoteStack(this.pollService._poll.getValue().choices); + }); + } + }); + } } diff --git a/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.html b/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.html new file mode 100644 index 00000000..ae312c96 --- /dev/null +++ b/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.html @@ -0,0 +1,8 @@ + diff --git a/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.scss b/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.spec.ts b/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.spec.ts new file mode 100644 index 00000000..d8d2a74f --- /dev/null +++ b/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ChoiceButtonDinumComponent } from './choice-button-dinum.component'; + +describe('ChoiceButtonDinumComponent', () => { + let component: ChoiceButtonDinumComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ChoiceButtonDinumComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ChoiceButtonDinumComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.ts b/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.ts new file mode 100644 index 00000000..eab9d4f1 --- /dev/null +++ b/src/app/features/shared/components/choice-button-dinum/choice-button-dinum.component.ts @@ -0,0 +1,22 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { Poll } from '../../../../core/models/poll.model'; +import { Choice } from '../../../../core/models/choice.model'; +import { Answer } from '../../../../core/enums/answer.enum'; +import { StorageService } from '../../../../core/services/storage.service'; + +@Component({ + selector: 'app-choice-button-dinum', + templateUrl: './choice-button-dinum.component.html', + styleUrls: ['./choice-button-dinum.component.scss'], +}) +export class ChoiceButtonDinumComponent implements OnInit { + @Input() public poll: Poll; + @Input() public choice: Choice; + @Input() public answerKind: string = 'yes'; + + public answerEnum = Answer; + + constructor(public storageService: StorageService) {} + + ngOnInit(): void {} +} diff --git a/src/app/shared/components/selectors/language-selector/language-selector.component.ts b/src/app/shared/components/selectors/language-selector/language-selector.component.ts index 971f6e53..4a4c86a9 100644 --- a/src/app/shared/components/selectors/language-selector/language-selector.component.ts +++ b/src/app/shared/components/selectors/language-selector/language-selector.component.ts @@ -18,8 +18,6 @@ export class LanguageSelectorComponent implements OnInit { ngOnInit(): void { this.availableLanguages = this.languageService.getAvailableLanguages(); - - console.log('this.availableLanguages', this.availableLanguages); this.currentLang = this.languageService.getLangage(); if (this.storageService.language && this.availableLanguages.indexOf(this.storageService.language) !== -1) { this.languageService.setLanguage(this.storageService.language); @@ -33,25 +31,16 @@ export class LanguageSelectorComponent implements OnInit { nextLang(): void { const index = this.availableLanguages.indexOf(this.currentLang); - console.log('this.currentLang ', this.currentLang, 'index', index); if (index !== -1) { // on passe au language suivant si il existe, sinon on revient au numéro 0 - const nextlang = console.log('this.availableLanguages[index + 1]', this.availableLanguages[index + 1]); - console.log('nextlang', nextlang); if (this.availableLanguages[index + 1]) { - console.log('lang suivante', this.availableLanguages[index + 1]); this.currentLang = this.availableLanguages[index + 1]; } else { - console.log('retour à la langue 0'); this.currentLang = this.availableLanguages[0]; } this.setLang(); } - console.log('this.currentLang ', this.currentLang); - - console.log('this.availableLanguages', this.availableLanguages); - console.log('TODO'); } } diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index f52de9ce..14723f30 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -32,6 +32,7 @@ import { ConfirmDialogModule } from 'primeng/confirmdialog'; import { ConfirmationService } from 'primeng/api'; import { AboutComponent } from '../features/shared/components/ui/static-pages/about/about.component'; import { RouterModule } from '@angular/router'; +import { ChoiceButtonDinumComponent } from '../features/shared/components/choice-button-dinum/choice-button-dinum.component'; const COMPONENTS = [ AboutComponent, @@ -48,6 +49,7 @@ const COMPONENTS = [ ErrorsListComponent, WipTodoComponent, ShortcutsHelpComponent, + ChoiceButtonDinumComponent, ]; const ANGULAR_MODULES = [CommonModule, ChartsModule, FormsModule, TranslateModule];