X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=templates%2Fvote.html;h=d767473890ae5a260051f461a370bdfd7a7c0796;hb=00934384b3d9084b9b0b9a7fb4b15be43e78b3e3;hp=b51896fc92da729df24e55f31531231c07b4bd39;hpb=e39a423e56697a035ea099e1f0ab4af1917a5d9e;p=cavote.git diff --git a/templates/vote.html b/templates/vote.html index b51896f..d767473 100644 --- a/templates/vote.html +++ b/templates/vote.html @@ -1,58 +1,206 @@ {% extends "layout.html" %} +{% block subtitle %}{{vote.title}}{% endblock %} {% block body %} -

{{ vote.title }}

-
- +
+ +
+
+ {{ 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 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 %} - - - {% if vote.is_transparent %} - - {% else %} -
Ce sondage n'est pas transparent, vous ne pouvez pas voir les votes des autres.
- + {% endif %} {% if can_vote %} - + - - {% if vote.is_multiple %} - {% 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 }}nb{{ user.choices[choice.id].name }}{% if user.userid == session.user.id %} + + + {% endif %}
+{% else %} +{% if not can_vote %} +
Vous avez déjà voté.
+{% endif %} +{% endif %}
+
{% endblock %}