Ajoute un message lorsque le vote n'est pas encore ouvert

This commit is contained in:
Tom Hubrecht 2021-12-20 17:19:49 +01:00
parent 361ef6d80b
commit ca1fdff3cb
3 changed files with 105 additions and 73 deletions

View file

@ -139,7 +139,23 @@
{% endif %} {% endif %}
{# Indications de connexion #} {# Indications de connexion #}
{% if election.start_date < current_time and election.end_date > current_time %} {% if election.start_date > current_time %}
<div class="tile is-ancestor">
<div class="tile is-parent">
<div class="tile is-child notification is-primary is-light">
<div class="has-text-centered mb-2">
<p class="subtitle">
<span class="icon">
<i class="fas fa-clock"></i>
</span>
<span class="ml-3">{% blocktrans with _date=election.start_date|date:"d/m/Y" _time=election.start_date|date:_("H:i") %}Le vote ouvrira le <b>{{ _date }}</b> à <b>{{ _time }}</b>.{% endblocktrans %}</span>
</p>
<p>{% trans "Revenez sur cette page quand le vote sera ouvert pour vous connecter et participer." %}</p>
</div>
</div>
</div>
</div>
{% elif election.end_date > current_time %}
{% if can_vote %} {% if can_vote %}
<div class="columns is-centered tile is-ancestor"> <div class="columns is-centered tile is-ancestor">
<div class="column is-one-third tile is-parent"> <div class="column is-one-third tile is-parent">

View file

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 0.1\n" "Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-06 15:37+0200\n" "POT-Creation-Date: 2021-12-20 17:09+0100\n"
"PO-Revision-Date: 2021-09-05 17:31+0200\n" "PO-Revision-Date: 2021-12-20 17:18+0100\n"
"Last-Translator: Test Translator <test@translator>\n" "Last-Translator: Test Translator <test@translator>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: en\n" "Language: en\n"
@ -72,111 +72,111 @@ msgstr "No"
msgid "Oui" msgid "Oui"
msgstr "Yes" msgstr "Yes"
#: elections/models.py:33 #: elections/models.py:34
msgid "nom" msgid "nom"
msgstr "name" msgstr "name"
#: elections/models.py:34 #: elections/models.py:35
msgid "nom bref" msgid "nom bref"
msgstr "short name" msgstr "short name"
#: elections/models.py:36 faqs/models.py:15 #: elections/models.py:37 faqs/models.py:15
msgid "description" msgid "description"
msgstr "description" msgstr "description"
#: elections/models.py:39 #: elections/models.py:40
msgid "date et heure de début" msgid "date et heure de début"
msgstr "start date and time" msgstr "start date and time"
#: elections/models.py:40 #: elections/models.py:41
msgid "date et heure de fin" msgid "date et heure de fin"
msgstr "end date and time" msgstr "end date and time"
#: elections/models.py:42 #: elections/models.py:43
msgid "visible au public" msgid "visible au public"
msgstr "visible to everyone" msgstr "visible to everyone"
#: elections/models.py:45 #: elections/models.py:46
msgid "conditions de vote" msgid "conditions de vote"
msgstr "voting requirements" msgstr "voting requirements"
#: elections/models.py:49 #: elections/models.py:50
msgid "restreint le vote à une liste de personnes" msgid "restreint le vote à une liste de personnes"
msgstr "restricts the vote to a list of people" msgstr "restricts the vote to a list of people"
#: elections/models.py:53 #: elections/models.py:54
msgid "mail avec les identifiants envoyé" msgid "mail avec les identifiants envoyé"
msgstr "mail with credentials sent" msgstr "mail with credentials sent"
#: elections/models.py:70 #: elections/models.py:71
msgid "résultats publics" msgid "résultats publics"
msgstr "results published" msgstr "results published"
#: elections/models.py:71 #: elections/models.py:72
msgid "dépouillée" msgid "dépouillée"
msgstr "counted" msgstr "counted"
#: elections/models.py:73 #: elections/models.py:74
msgid "archivée" msgid "archivée"
msgstr "archived" msgstr "archived"
#: elections/models.py:76 #: elections/models.py:77
msgid "date du dépouillement" msgid "date du dépouillement"
msgstr "date of count" msgstr "date of count"
#: elections/models.py:79 #: elections/models.py:80
msgid "date de publication" msgid "date de publication"
msgstr "date of publication" msgstr "date of publication"
#: elections/models.py:84 #: elections/models.py:85
msgid "Peut administrer des élections" msgid "Peut administrer des élections"
msgstr "Can manage elections" msgstr "Can manage elections"
#: elections/models.py:94 #: elections/models.py:95
msgid "question" msgid "question"
msgstr "question" msgstr "question"
#: elections/models.py:97 #: elections/models.py:98
msgid "type de question" msgid "type de question"
msgstr "type of question" msgstr "type of question"
#: elections/models.py:104 #: elections/models.py:105
msgid "nombre maximal de votes reçus" msgid "nombre maximal de votes reçus"
msgstr "maximal number of votes received" msgstr "maximal number of votes received"
#: elections/models.py:161 #: elections/models.py:164
msgid "texte" msgid "texte"
msgstr "text" msgstr "text"
#: elections/models.py:162 #: elections/models.py:165
msgid "abréviation" msgid "abréviation"
msgstr "abbreviation" msgstr "abbreviation"
#: elections/models.py:164 #: elections/models.py:167
msgid "option gagnante" msgid "option gagnante"
msgstr "winning option" msgstr "winning option"
#: elections/models.py:172 #: elections/models.py:175
msgid "nombre de votes reçus" msgid "nombre de votes reçus"
msgstr "number of votes received" msgstr "number of votes received"
#: elections/models.py:202 #: elections/models.py:207
msgid "rang de l'option" msgid "rang de l'option"
msgstr "option's ranking" msgstr "option's ranking"
#: elections/models.py:218 #: elections/models.py:223
msgid "votes supplémentaires" msgid "votes supplémentaires"
msgstr "extra votes" msgstr "extra votes"
#: elections/models.py:234 #: elections/models.py:239
msgid "Nom et Prénom" msgid "Nom et Prénom"
msgstr "Name and surname" msgstr "Name and surname"
#: elections/models.py:235 #: elections/models.py:240
msgid "email valide" msgid "email valide"
msgstr "valid e-mail" msgstr "valid e-mail"
#: elections/models.py:258 elections/tests/test_models.py:57 #: elections/models.py:263 elections/tests/test_models.py:57
msgid "identifiants spécifiques" msgid "identifiants spécifiques"
msgstr "dedicated credentials" msgstr "dedicated credentials"
@ -226,7 +226,7 @@ msgstr ""
#: elections/templates/elections/admin/option.html:12 #: elections/templates/elections/admin/option.html:12
#: elections/templates/elections/admin/question.html:29 #: elections/templates/elections/admin/question.html:29
#: elections/templates/elections/election_admin.html:153 #: elections/templates/elections/election_admin.html:149
#: faqs/templates/faqs/faq.html:22 #: faqs/templates/faqs/faq.html:22
msgid "Modifier" msgid "Modifier"
msgstr "Edit" msgstr "Edit"
@ -241,7 +241,7 @@ msgstr "Change the question"
#: elections/templates/elections/admin/question.html:59 #: elections/templates/elections/admin/question.html:59
#: elections/templates/elections/admin/question.html:63 #: elections/templates/elections/admin/question.html:63
#: elections/templates/elections/election_admin.html:273 #: elections/templates/elections/election_admin.html:269
msgid "Rajouter une option" msgid "Rajouter une option"
msgstr "Add an option" msgstr "Add an option"
@ -289,11 +289,27 @@ msgstr "Counted on %(timestamp)s"
msgid "Publié le %(timestamp)s" msgid "Publié le %(timestamp)s"
msgstr "Published on %(timestamp)s" msgstr "Published on %(timestamp)s"
#: elections/templates/elections/election.html:152 #: elections/templates/elections/election.html:151
msgid "H:i"
msgstr "h:i A"
#: elections/templates/elections/election.html:151
#, python-format
msgid "Le vote ouvrira le <b>%(_date)s</b> à <b>%(_time)s</b>."
msgstr "The vote will open on <b>%(_date)s</b> at <b>%(_time)s</b>."
#: elections/templates/elections/election.html:153
msgid ""
"Revenez sur cette page quand le vote sera ouvert pour vous connecter et "
"participer."
msgstr ""
"Come back on this page when the vote is open to log in and participate."
#: elections/templates/elections/election.html:168
msgid "Voter" msgid "Voter"
msgstr "Vote" msgstr "Vote"
#: elections/templates/elections/election.html:163 #: elections/templates/elections/election.html:179
msgid "" msgid ""
"Pour voter lors de cette élection, vous devez vous connecter à l'aide des " "Pour voter lors de cette élection, vous devez vous connecter à l'aide des "
"identifiants reçus par mail." "identifiants reçus par mail."
@ -301,7 +317,7 @@ msgstr ""
"To vote in this election, you must log in using the login credentials you " "To vote in this election, you must log in using the login credentials you "
"received by e-mail." "received by e-mail."
#: elections/templates/elections/election.html:165 #: elections/templates/elections/election.html:181
#: elections/templates/elections/election_voters.html:93 #: elections/templates/elections/election_voters.html:93
msgid "" msgid ""
"Pour voter lors de cette élection, vous devez vous connecter à l'aide du CAS " "Pour voter lors de cette élection, vous devez vous connecter à l'aide du CAS "
@ -312,73 +328,73 @@ msgstr ""
"restrictions may apply and your vote may be deleted if you are not eligible " "restrictions may apply and your vote may be deleted if you are not eligible "
"to vote." "to vote."
#: elections/templates/elections/election.html:181 #: elections/templates/elections/election.html:197
msgid "Connexion par identifiants" msgid "Connexion par identifiants"
msgstr "Login with credentials" msgstr "Login with credentials"
#: elections/templates/elections/election.html:192 #: elections/templates/elections/election.html:208
#: shared/templates/authens/login_switch.html:20 #: shared/templates/authens/login_switch.html:20
msgid "Connexion via CAS" msgid "Connexion via CAS"
msgstr "Login via CAS" msgstr "Login via CAS"
#: elections/templates/elections/election.html:227 #: elections/templates/elections/election.html:243
msgid "A voté" msgid "A voté"
msgstr "Voted" msgstr "Voted"
#: elections/templates/elections/election_admin.html:94 #: elections/templates/elections/election_admin.html:90
#: elections/templates/elections/election_list.html:58 #: elections/templates/elections/election_list.html:58
msgid "Élection invisible" msgid "Élection invisible"
msgstr "Invisible election" msgstr "Invisible election"
#: elections/templates/elections/election_admin.html:101 #: elections/templates/elections/election_admin.html:97
msgid "Élection visible" msgid "Élection visible"
msgstr "Visible election" msgstr "Visible election"
#: elections/templates/elections/election_admin.html:124 #: elections/templates/elections/election_admin.html:120
msgid "Vue classique" msgid "Vue classique"
msgstr "Classic view" msgstr "Classic view"
#: elections/templates/elections/election_admin.html:135 #: elections/templates/elections/election_admin.html:131
msgid "Rendre l'élection visible" msgid "Rendre l'élection visible"
msgstr "Make the election visible" msgstr "Make the election visible"
#: elections/templates/elections/election_admin.html:144 #: elections/templates/elections/election_admin.html:140
msgid "Exporter les votant·e·s" msgid "Exporter les votant·e·s"
msgstr "Export the list of voters" msgstr "Export the list of voters"
#: elections/templates/elections/election_admin.html:162 #: elections/templates/elections/election_admin.html:158
#: elections/templates/elections/election_upload_voters.html:32 #: elections/templates/elections/election_upload_voters.html:32
msgid "Gestion de la liste de votant·e·s" msgid "Gestion de la liste de votant·e·s"
msgstr "Management of the voters' list" msgstr "Management of the voters' list"
#: elections/templates/elections/election_admin.html:174 #: elections/templates/elections/election_admin.html:170
#: elections/templates/elections/election_voters.html:76 #: elections/templates/elections/election_voters.html:76
msgid "Liste des votant·e·s" msgid "Liste des votant·e·s"
msgstr "Voters' list" msgstr "Voters' list"
#: elections/templates/elections/election_admin.html:182 #: elections/templates/elections/election_admin.html:178
msgid "Dépouiller" msgid "Dépouiller"
msgstr "Count" msgstr "Count"
#: elections/templates/elections/election_admin.html:194 #: elections/templates/elections/election_admin.html:190
msgid "Publier" msgid "Publier"
msgstr "Publish" msgstr "Publish"
#: elections/templates/elections/election_admin.html:196 #: elections/templates/elections/election_admin.html:192
msgid "Dépublier" msgid "Dépublier"
msgstr "De-publish" msgstr "De-publish"
#: elections/templates/elections/election_admin.html:206 #: elections/templates/elections/election_admin.html:202
msgid "Télécharger les résultats" msgid "Télécharger les résultats"
msgstr "Download the results" msgstr "Download the results"
#: elections/templates/elections/election_admin.html:215 #: elections/templates/elections/election_admin.html:211
msgid "Archiver" msgid "Archiver"
msgstr "Archive" msgstr "Archive"
#: elections/templates/elections/election_admin.html:277 #: elections/templates/elections/election_admin.html:273
#: elections/templates/elections/election_admin.html:278
#: elections/templates/elections/election_admin.html:282 #: elections/templates/elections/election_admin.html:282
#: elections/templates/elections/election_admin.html:286
msgid "Rajouter une question" msgid "Rajouter une question"
msgstr "Add a question" msgstr "Add a question"
@ -559,7 +575,7 @@ msgstr "Vote for the question:"
#: shared/templates/auth/permission-management.html:29 #: shared/templates/auth/permission-management.html:29
#: shared/templates/authens/pwd_login.html:25 #: shared/templates/authens/pwd_login.html:25
#: shared/templates/authens/pwd_reset_confirm.html:25 #: shared/templates/authens/pwd_reset_confirm.html:25
#: shared/templates/forms/modal-form.html:23 #: shared/templates/forms/modal-form.html:24
msgid "Enregistrer" msgid "Enregistrer"
msgstr "Save" msgstr "Save"
@ -572,7 +588,7 @@ msgid "Confirmer"
msgstr "Confirm" msgstr "Confirm"
#: elections/templates/elections/vote.html:76 #: elections/templates/elections/vote.html:76
#: shared/templates/forms/modal-form.html:30 #: shared/templates/forms/modal-form.html:31
msgid "Annuler" msgid "Annuler"
msgstr "Cancel" msgstr "Cancel"
@ -623,7 +639,7 @@ msgstr "The maximum ranking is {}."
msgid "Le classement minimal est 1." msgid "Le classement minimal est 1."
msgstr "The minimum ranking is 1." msgstr "The minimum ranking is 1."
#: elections/utils.py:351 #: elections/utils.py:352
msgid "" msgid ""
"Format invalide. Vérifiez que le fichier est bien formé (i.e. chaque ligne " "Format invalide. Vérifiez que le fichier est bien formé (i.e. chaque ligne "
"de la forme 'login,nom,email')." "de la forme 'login,nom,email')."
@ -631,23 +647,23 @@ msgstr ""
"Invalid format. Check that the file is properly formed (i.e. each line of " "Invalid format. Check that the file is properly formed (i.e. each line of "
"the form 'login,name,e-mail')." "the form 'login,name,e-mail')."
#: elections/utils.py:365 #: elections/utils.py:366
msgid "La ligne {} n'a pas le bon nombre d'éléments." msgid "La ligne {} n'a pas le bon nombre d'éléments."
msgstr "The line {} has the wrong number of elements." msgstr "The line {} has the wrong number of elements."
#: elections/utils.py:370 #: elections/utils.py:371
msgid "Valeur manquante dans la ligne {} : 'login'." msgid "Valeur manquante dans la ligne {} : 'login'."
msgstr "Missing value in line {}: 'login'." msgstr "Missing value in line {}: 'login'."
#: elections/utils.py:375 #: elections/utils.py:376
msgid "Doublon dans les logins : lignes {} et {}." msgid "Doublon dans les logins : lignes {} et {}."
msgstr "Duplicate logins: lines {} and {}." msgstr "Duplicate logins: lines {} and {}."
#: elections/utils.py:383 #: elections/utils.py:384
msgid "Valeur manquante dans la ligne {} : 'nom'." msgid "Valeur manquante dans la ligne {} : 'nom'."
msgstr "Missing value in line {}: 'name'." msgstr "Missing value in line {}: 'name'."
#: elections/utils.py:389 #: elections/utils.py:390
msgid "Adresse mail invalide à la ligne {} : '{}'." msgid "Adresse mail invalide à la ligne {} : '{}'."
msgstr "Invalid e-mail address in line {}: '{}'." msgstr "Invalid e-mail address in line {}: '{}'."
@ -655,51 +671,51 @@ msgstr "Invalid e-mail address in line {}: '{}'."
msgid "Élection créée avec succès !" msgid "Élection créée avec succès !"
msgstr "Election successfully created!" msgstr "Election successfully created!"
#: elections/views.py:98 #: elections/views.py:115
msgid "Élection visible !" msgid "Élection visible !"
msgstr "Election now visible!" msgstr "Election now visible!"
#: elections/views.py:126 #: elections/views.py:143
msgid "Liste de votant·e·s importée avec succès !" msgid "Liste de votant·e·s importée avec succès !"
msgstr "Voters list successfully imported!" msgstr "Voters list successfully imported!"
#: elections/views.py:160 #: elections/views.py:177
msgid "Mail d'annonce en cours d'envoi !" msgid "Mail d'annonce en cours d'envoi !"
msgstr "Announcement e-mail being distributed!" msgstr "Announcement e-mail being distributed!"
#: elections/views.py:197 #: elections/views.py:214
msgid "Élection modifiée avec succès !" msgid "Élection modifiée avec succès !"
msgstr "Election successfully modified!" msgstr "Election successfully modified!"
#: elections/views.py:222 #: elections/views.py:239
msgid "Vote de {} supprimé !" msgid "Vote de {} supprimé !"
msgstr "{}'s vote deleted!" msgstr "{}'s vote deleted!"
#: elections/views.py:256 #: elections/views.py:273
msgid "Élection dépouillée avec succès !" msgid "Élection dépouillée avec succès !"
msgstr "Election successfully counted!" msgstr "Election successfully counted!"
#: elections/views.py:283 #: elections/views.py:300
msgid "Élection publiée avec succès !" msgid "Élection publiée avec succès !"
msgstr "Election successfully published!" msgstr "Election successfully published!"
#: elections/views.py:284 #: elections/views.py:301
msgid "Élection dépubliée avec succès !" msgid "Élection dépubliée avec succès !"
msgstr "Election successfully de-published!" msgstr "Election successfully de-published!"
#: elections/views.py:315 #: elections/views.py:332
msgid "Élection archivée avec succès !" msgid "Élection archivée avec succès !"
msgstr "Election successfully archived!" msgstr "Election successfully archived!"
#: elections/views.py:349 #: elections/views.py:366
msgid "Question supprimée !" msgid "Question supprimée !"
msgstr "Question deleted!" msgstr "Question deleted!"
#: elections/views.py:377 #: elections/views.py:394
msgid "Option supprimée !" msgid "Option supprimée !"
msgstr "Option deleted!" msgstr "Option deleted!"
#: elections/views.py:522 #: elections/views.py:539
msgid "Votre choix a bien été enregistré !" msgid "Votre choix a bien été enregistré !"
msgstr "Your choice has been recorded!" msgstr "Your choice has been recorded!"
@ -861,7 +877,7 @@ msgstr "List of special accounts"
msgid "Gestionnaires de Kadenios" msgid "Gestionnaires de Kadenios"
msgstr "Kadenios managers" msgstr "Kadenios managers"
#: shared/templates/auth/admin-accounts.html:32 #: shared/templates/auth/admin-accounts.html:22
msgid "Gestionnaires d'élections" msgid "Gestionnaires d'élections"
msgstr "Election managers" msgstr "Election managers"