@@ -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'))
@@ -2,7 +2,7 @@
{% block body %}
<div class="row">
<div class="span9">
-<h2 class='page-header'>{{ vote.title }}</h2>
+ <h2 class='page-header'>{{ vote.title }}</h2>
{% if not vote.is_transparent %}
<div class="alert alert-info">Ce sondage n'est pas transparent, vous ne pouvez pas voir les votes des autres.</div>
{% endif %}
@@ -92,14 +92,17 @@
<dt>Catégorie <dd><code>{{ vote.category }}</code>
</dl>
<dl>
+ {% if vote.description %}
<dt>Description : <dd>{{ vote.description }}
+ {% endif %}
+ {% if attachments %}
<dt>Documents :<dd>
<ul>
{% for attachment in attachments %}
<li><a href="{{ attachment.url }}">{{ attachment.url }}</a></li>
{% endfor %}
</ul>
- </li>
</div>
@@ -28,10 +28,12 @@ Liste des votes
<h4>Categorie : {{ vote.category }}</h4>
<div class="span3">
- <h4>Notes</h4>
+ <h4>Description</h4>
<p>
{{ vote.description|safe }}
</p>
{% else %}