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 %}
{# 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 %}
<div class="columns is-centered tile is-ancestor">
<div class="column is-one-third tile is-parent">

View file

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