From: Guillaume Subiron Date: Wed, 6 Jun 2012 20:18:47 +0000 (+0200) Subject: Dispay X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/%22%24encUrl/%40%20%27entree_nom_pseudo_1%27%20=%3E%20%27%28Your%20name%20or%20alias%29%27%2C%20%27entree_nom_pseudo_2%27%20=%3E%20%27Name%20or%20alias%27%2C%20%27entree_nom_site%27%20=%3E%20%27Name%20of%20your%20site%27%2C-%27entree_nom_site_2%27%20=%3E%20%27Name%20of%20the%20author/%27s%20site%27%2C%20%27entree_nom_site_2%27%20=%3E%20%27Name%20of%20the%20author%C3%A2%C2%80%C2%99s%20site%27%2C%20%27entree_nouveau_passe%27%20=%3E%20%27New%20password%27%2C%20%27entree_passe_ldap%27%20=%3E%20%27Password%27%2C%20%27entree_port_annuaire%27%20=%3E%20%27Port%20number%20of%20the%20directory%27%2C%40%40%20-175%2C7%20%20175%2C7%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;h=136c353bf4a1c864d8efd90609732f2ba886b7e0;p=cavote.git Dispay --- diff --git a/main.py b/main.py index 46653b3..3effbb2 100755 --- a/main.py +++ b/main.py @@ -421,6 +421,7 @@ def vote(idvote): else: vote['nb_votes'] = tmp['nb'] vote['percent'] = int((float(vote['nb_votes']) / float(vote['max_votes'])) * 100) + # :TODO:maethor:120606: Flash if user is concerned by the vote return render_template('vote.html', vote=vote, attachments=attachments, choices=choices, users=users.values(), can_vote=can_vote(idvote, get_userid())) flash(u'Vous n\'avez pas le droit de voir ce vote, désolé.') return redirect(url_for('home')) diff --git a/templates/vote.html b/templates/vote.html index c787420..70067a7 100644 --- a/templates/vote.html +++ b/templates/vote.html @@ -2,7 +2,7 @@ {% block body %}
- + {% if not vote.is_transparent %}
Ce sondage n'est pas transparent, vous ne pouvez pas voir les votes des autres.
{% endif %} @@ -92,14 +92,17 @@
Catégorie
{{ vote.category }}
+ {% if vote.description %}
Description :
{{ vote.description }} + {% endif %} + {% if attachments %}
Documents :
- + {% endif %}
diff --git a/templates/votes.html b/templates/votes.html index ef54cbb..0cb1b51 100644 --- a/templates/votes.html +++ b/templates/votes.html @@ -28,10 +28,12 @@ Liste des votes

Categorie : {{ vote.category }}

-

Notes

+ {% if vote.description %} +

Description

{{ vote.description|safe }}

+ {% endif %}
{% else %}