X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=templates%2Fvote.html;h=a832684f13f8dca9b87e9bfef0b1fb1441463bf3;hb=61a11c1aae7ed1ded0116b2e1e1fe3323ab7db6b;hp=b6ea499c9451c3a9de94ed03f23af98a16d590b5;hpb=0b580c50a8568e6927e1914d2408c296a9b30823;p=cavote.git diff --git a/templates/vote.html b/templates/vote.html index b6ea499..a832684 100644 --- a/templates/vote.html +++ b/templates/vote.html @@ -1,92 +1,204 @@ {% 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 and (can_vote or (not vote['is_terminated'] and not vote['is_anonymous'])) %} + {% endif %} - - - - {% for user in users %} - {% if vote.is_transparent or user.userid == session.user.id %} + {% if vote.is_transparent %} + {% 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 %} + {% 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 %} - + {% endfor %} - + {% if 'user' in session and (can_vote or (not vote['is_terminated'] and not vote['is_anonymous'])) %} + + {% endif %} {% endif %} - + {% endfor %} + + {% endif %}
{{ choice.name }}{{ choice.name }}
+ +
Somme{% if 'user' in session and user.userid == session.user.id %}{% endif %} {{ user.username }}{{ choice.nb }}{{ user.choices[choice.id].name }}{% if user.userid == session.user.id %} + + + {% endif %}
-
- -
-

Informations

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