From d7d0717940a0ef96e4b219a026c44bed6ad6ab6a Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 13 Apr 2021 15:22:53 +0200 Subject: [PATCH] Template updates --- .../templates/elections/delete_vote.html | 4 +- elections/templates/elections/election.html | 68 ++++++++++------- .../templates/elections/election_admin.html | 76 +++++++++++++------ .../templates/elections/election_list.html | 76 ++++++++++++------- .../templates/elections/election_update.html | 4 +- .../templates/elections/election_voters.html | 4 +- .../templates/elections/mail_voters.html | 4 +- .../templates/elections/option_update.html | 4 +- .../templates/elections/question_update.html | 4 +- .../templates/elections/results/rank.html | 16 ++-- .../templates/elections/upload_voters.html | 4 +- elections/templates/elections/vote.html | 8 +- shared/templates/auth/election_login.html | 5 +- shared/templates/authens/login_switch.html | 20 +++-- shared/templates/authens/pwd_login.html | 12 +-- shared/templates/authens/pwd_reset.html | 4 +- .../templates/authens/pwd_reset_confirm.html | 2 +- shared/templates/forms/modal-form.html | 4 +- shared/templates/registration/logged_out.html | 4 +- 19 files changed, 197 insertions(+), 126 deletions(-) diff --git a/elections/templates/elections/delete_vote.html b/elections/templates/elections/delete_vote.html index 787b28c..e3144b9 100644 --- a/elections/templates/elections/delete_vote.html +++ b/elections/templates/elections/delete_vote.html @@ -17,7 +17,7 @@
@@ -102,11 +104,15 @@ {# Dates d'ouverture de l'élection #}
- {{ election.start_date|date:"d/m/Y H:i" }} - - + + + {{ election.start_date|date:"d/m/Y H:i" }} + + + + {{ election.end_date|date:"d/m/Y H:i" }} + - {{ election.end_date|date:"d/m/Y H:i" }}
@@ -130,17 +136,21 @@ {% if election.start_date > current_time %}
- - + + + + + {% trans "Supprimer" %} - {% trans "Supprimer" %} - - - + + + + + + {% trans "Modifier" %} - {% trans "Modifier" %}
{% endif %} @@ -155,23 +165,39 @@ {# Liste des options possibles #} {% for o in q.options.all %}
- {% if election.tallied %} + {% if election.start_date > current_time %} + + + + + + + + + + + + + + {% elif election.tallied %} - {% if q.vote_type == "select" %} - - - - {{ o.nb_votes }} + + {% if q.vote_type == "select" %} + + + + {{ o.nb_votes }} - {% elif q.vote_type == "rank" %} + {% elif q.vote_type == "rank" %} - - + + + + {{ forloop.counter }} + {% endif %} - {{ forloop.counter }} {% endif %} - {% endif %} {{ o.text }}
diff --git a/elections/templates/elections/election_list.html b/elections/templates/elections/election_list.html index 3b4dc13..eaa41e6 100644 --- a/elections/templates/elections/election_list.html +++ b/elections/templates/elections/election_list.html @@ -27,40 +27,60 @@
{% for e in election_list %} -
-
-
- {{ e.name }} - {{ e.start_date|date:"d/m/Y H:i" }} - - - - {{ e.end_date|date:"d/m/Y H:i" }} -
+
+
+
+
+ -
- {% if e.tallied %} - {% trans "Élection dépouillée" %} - {% endif %} +
+ + + {{ e.start_date|date:"d/m/Y H:i" }} + + + + {{ e.end_date|date:"d/m/Y H:i" }} + + +
+
- {% if e.results_public %} - {% trans "Élection publiée" %} - {% endif %} +
+ {% if e.tallied %} +
+ {% trans "Élection dépouillée" %} +
+ {% endif %} - {% if e.archived %} - {% trans "Élection archivée" %} - {% endif %} + {% if e.results_public %} +
+ {% trans "Élection publiée" %} +
+ {% endif %} - {% if e.created_by == user %} - - - - - - {% endif %} + {% if e.archived %} +
+ {% trans "Élection archivée" %} +
+ {% endif %} + + {% if e.created_by == user %} + + {% endif %} +
-

+ +

{{ e.description|linebreaksbr }}

diff --git a/elections/templates/elections/election_update.html b/elections/templates/elections/election_update.html index 1cea140..99a1352 100644 --- a/elections/templates/elections/election_update.html +++ b/elections/templates/elections/election_update.html @@ -41,7 +41,7 @@
- + {% trans "Retour" %} diff --git a/elections/templates/elections/election_voters.html b/elections/templates/elections/election_voters.html index 1e05e31..4507caa 100644 --- a/elections/templates/elections/election_voters.html +++ b/elections/templates/elections/election_voters.html @@ -6,14 +6,14 @@
{# Titre de l'élection #} -
+

{{ election.name }}

- + {% trans "Retour" %} diff --git a/elections/templates/elections/mail_voters.html b/elections/templates/elections/mail_voters.html index 4f8b477..dcd8b3b 100644 --- a/elections/templates/elections/mail_voters.html +++ b/elections/templates/elections/mail_voters.html @@ -28,7 +28,7 @@
- + {% trans "Retour" %} diff --git a/elections/templates/elections/question_update.html b/elections/templates/elections/question_update.html index bb1009d..03ec652 100644 --- a/elections/templates/elections/question_update.html +++ b/elections/templates/elections/question_update.html @@ -23,7 +23,7 @@
- + {% trans "Retour" %} diff --git a/elections/templates/elections/results/rank.html b/elections/templates/elections/results/rank.html index 85654e6..73ccbb8 100644 --- a/elections/templates/elections/results/rank.html +++ b/elections/templates/elections/results/rank.html @@ -12,10 +12,12 @@ {% for i in range %} - - + + + + + {{ i }} - {{ i }} {% endfor %} @@ -25,10 +27,12 @@ {% with loser=forloop.counter %} - - + + + + + {{ forloop.counter }} - {{ forloop.counter }} {% for cell in line %} diff --git a/elections/templates/elections/upload_voters.html b/elections/templates/elections/upload_voters.html index ae7a12d..4a992b3 100644 --- a/elections/templates/elections/upload_voters.html +++ b/elections/templates/elections/upload_voters.html @@ -40,7 +40,7 @@
- + {% trans "Retour" %} @@ -77,7 +77,7 @@
- + {% trans "Annuler" %} diff --git a/shared/templates/auth/election_login.html b/shared/templates/auth/election_login.html index fb680f6..f74b022 100644 --- a/shared/templates/auth/election_login.html +++ b/shared/templates/auth/election_login.html @@ -19,15 +19,16 @@
+
- + {% trans "Retour" %} diff --git a/shared/templates/authens/login_switch.html b/shared/templates/authens/login_switch.html index d873527..ae4b261 100644 --- a/shared/templates/authens/login_switch.html +++ b/shared/templates/authens/login_switch.html @@ -12,22 +12,26 @@
-
- diff --git a/shared/templates/authens/pwd_login.html b/shared/templates/authens/pwd_login.html index 0028a6b..a381e2e 100644 --- a/shared/templates/authens/pwd_login.html +++ b/shared/templates/authens/pwd_login.html @@ -19,7 +19,7 @@