X-Git-Url: http://git.cyclocoop.org/?p=cavote.git;a=blobdiff_plain;f=templates%2Fvote.html;fp=templates%2Fvote.html;h=a832684f13f8dca9b87e9bfef0b1fb1441463bf3;hp=e3ecbfcab75a8c267f67bbabbfddf1d348d522cc;hb=61a11c1aae7ed1ded0116b2e1e1fe3323ab7db6b;hpb=6be75afe5c39782178ed1561f57596061797196e diff --git a/templates/vote.html b/templates/vote.html index e3ecbfc..a832684 100644 --- a/templates/vote.html +++ b/templates/vote.html @@ -1,37 +1,176 @@ {% extends "layout.html" %} +{% block subtitle %}{{vote.title}}{% endblock %} {% block body %}
+
+ +
+
+ {{ vote.nb_votes }} vote{{ 's' if vote.nb_votes > 1 else '' }} / {{ vote.max_votes }} ({{ vote.percent }}%)
+
+
+
Publié par
{{ vote.author }} +
Début le
{{ vote.date_begin }} +
Fin le
{{ vote.date_end }} +
Groupe
{{ vote.groupname }} +
Catégorie
{{ vote.category }} +
Quorum
{{ vote.quorum * 100 }}% +
+
+ {% if vote.description %} +
Description :
{{ vote.description }} + {% endif %} + {% if attachments %} +
Documents :
+ + {% endif %} +
+
+ +{% if vote.is_transparent or (session.user and user.userid == session.user.id )%} +
+ + + + Légende : + + {% for value in values %} + + + + {{ value.name }} + + {% endfor %} + + somme↓ + + + moyenne↓ + + {% for choice in results.list %} + + {{ choice.name }} + + {% set choice_loop = loop %} + {% for value in choice.values_ %} + + {% if value.percent > 0 %} + + {{ value.percent|int }}% + {% endif %} + + {% endfor %} + + {{ choice.sum }} + + + {{ "%.2f"|format(choice.average) }} + + {% if loop.length > 1 and choice.id in results.medians %} + + ← médiane + + {%endif%} + {% endfor %} + + + + 0% + + + + 25% + + + + 50% + + + + 75% + + + + 100% + + + + +
+{% endif %} +
- + +{% if vote.is_anonymous %} +
Ce vote est anonymisé, les suffrages ne sont ni visibles ni modifiables.
+{% endif %} {% if not vote.is_transparent %} -
Ce sondage n'est pas transparent, vous ne pouvez pas voir les votes des autres.
+
Ce vote n’est pas transparent, vous ne pouvez pas voir les votes des autres.
{% endif %} - +{% if (vote['is_anonymous'] and can_vote) or not vote['is_anonymous'] %} +
{% for choice in choices %} - + {% endfor %} - {% if 'user' in session %} + {% if 'user' in session and (can_vote or (not vote['is_terminated'] and not vote['is_anonymous'])) %} {% endif %} + {% if vote.is_transparent %} + + {% endif %} + + {% if can_vote %} + + + + {% for choice in choices %} + + {% endfor %} + + + + {% endif %} + {% if not vote['is_anonymous'] %} {% for user in users %} {% if vote.is_transparent or (session.user and user.userid == session.user.id )%} {% for choice in choices %} - {% if choice.id in user.choices %} - - {% else %} - {% endif %} + {% endfor %} - {% if 'user' in session %} + {% if 'user' in session and (can_vote or (not vote['is_terminated'] and not vote['is_anonymous'])) %} {% endif %} {% endfor %} - - {% if can_vote %} - - - - {% if vote.is_multiplechoice %} - {% for choice in choices %} - - {% endfor %} - {% else %} - {% for choice in choices %} - - {% endfor %} - {% endif %} - - - - {% endif %} - - - {% if vote.is_transparent %} - - - {% for choice in choices %} - - {% endfor %} - {% if 'user' in session %} - - {% endif %} - {% endif %} -
{{ choice.name }}{{ choice.name }}
+ +
{% if 'user' in session and user.userid == session.user.id %}{% endif %} {{ user.username }}{{ user.choices[choice.id].name }}{% if user.userid == session.user.id %}
Somme{{ choice.nb }}
-
- -
-

Informations

-{% if vote.nb_votes == 0 %} -
-
{{ vote.nb_votes }} / {{ vote.max_votes }}
-
{% else %} -
-
{{ vote.nb_votes }} / {{ vote.max_votes }}
-
+{% if not can_vote %} +
Vous avez déjà voté.
+{% endif %} {% endif %} -
-
Publié par
{{ vote.author }} -
Début le
{{ vote.date_begin }} -
Deadline le
{{ vote.date_end }} -
Groupe
{{ vote.groupname }} -
Catégorie
{{ vote.category }} -
-
- {% if vote.description %} -
Description :
{{ vote.description }} - {% endif %} - {% if attachments %} -
Documents :
- - {% endif %} -