diff --git a/app/static/css/table.css b/app/static/css/table.css index 2cd3d76..b5f9100 100644 --- a/app/static/css/table.css +++ b/app/static/css/table.css @@ -81,10 +81,6 @@ table.thread td.author { table.thread td { vertical-align: top; } -table.thread td:nth-child(2) { - padding-top: 0; - padding-bottom: 0; -} table.thread div.info { float: right; diff --git a/app/templates/widgets/poll.html b/app/templates/widgets/poll.html index 3e45bc4..cfea008 100644 --- a/app/templates/widgets/poll.html +++ b/app/templates/widgets/poll.html @@ -1,7 +1,5 @@ {% macro wpoll(poll) %} -{% set n_answers = len(poll.answers) %} - {% import "widgets/polls/"+poll.template as poll_template with context %}
@@ -12,20 +10,21 @@ {# Poll has ended: display results #} {% elif poll.ended %} -
Ce sondage est terminé. Voici les résultats des {{ n_answers }} participation{{ n_answers | pluralize }}.
{{ poll_template.results(poll) }} +

Ce sondage est terminé.

{# Current user is a guest #} {% elif not current_user.is_authenticated %} -

Seuls les membres peuvent voter

+

Seuls les membres peuvent voter.

{# Current user cannot vote #} {% elif not poll.can_vote(current_user) %} -

Vous n'avez pas le droit de voter dans ce sondage. Désolé…

+

Vous n'avez pas le droit de voter dans ce sondage.

{# Current user has already voted #} {% elif poll.has_voted(current_user) %} -

Vous avez déjà voté. Revenez le {{ poll.end | date }} pour voir les résultats

+ {{ poll_template.results(poll) }} +

Vous avez déjà voté.

{# Current user can vote #} {% else %} diff --git a/app/templates/widgets/polls/simplepoll.html b/app/templates/widgets/polls/simplepoll.html index bcb6284..d79a2cc 100644 --- a/app/templates/widgets/polls/simplepoll.html +++ b/app/templates/widgets/polls/simplepoll.html @@ -1,8 +1,8 @@ {% macro choices(poll) %}
{% for choice in poll.choices %} - -
+ +
{% endfor %}
{% endmacro %} @@ -11,13 +11,15 @@ {% for choice, votes in poll.results.most_common() %} - + + {% endfor %} + + +
- - {{ votes / n_answers if n_answers else 0 }} % ({{ votes }}) - + {{ votes }}
Participations{{ len(poll.answers) }}
{% endmacro %}