From 136c353bf4a1c864d8efd90609732f2ba886b7e0 Mon Sep 17 00:00:00 2001 From: Guillaume Subiron Date: Wed, 6 Jun 2012 22:18:47 +0200 Subject: [PATCH] Dispay --- main.py | 1 + templates/vote.html | 7 +++++-- templates/votes.html | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) 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 %} -- 2.20.1