{% load pybb_tags %}

{% trans 'Poll' %}

{% if request.user.is_authenticated %} {% if user|pybb_may_vote_in_topic:topic and topic|pybb_topic_poll_not_voted:request.user %} {% else %} {% for answer in topic.poll_answers.all %} {% endfor %} {% if user|pybb_may_vote_in_topic:topic %} {% endif %} {% endif %} {% else %} {% for answer in topic.poll_answers.all %} {% endfor %} {% endif %}
{{ topic.poll_question }}
{% include "pybb/form.html" with form=poll_form %}

{% include "pybb/_button_submit.html" %}

{{ answer }} {{ answer.votes }} ({{ answer.votes_percent|floatformat:2 }} %)
{% csrf_token %} {% with submit_text=_('Cancel my poll vote') %} {% include "pybb/_button_submit.html" %} {% endwith %}
{{ answer }}