{% load i18n %} {% load forum_permission_tags %} {% load forum_polls_tags %}
{% get_permission 'can_vote_in_poll' poll request.user as user_can_vote_in_poll %} {% with can_be_completed=user_can_vote_in_poll has_been_completed=poll|has_been_completed_by:request.user poll=poll %}

{{ poll.question }}


{% if can_be_completed and not view_results_action %} {% if not has_been_completed or change_vote_action %} {% if poll.max_options == 1 %} {% blocktrans trimmed %} You may select 1 option {% endblocktrans %} {% else %} {% blocktrans trimmed with max_options=poll.max_options %} You may select up to {{ max_options }} options {% endblocktrans %} {% endif %} {% endif %} {% endif %}
{% if can_be_completed and not has_been_completed and not view_results_action %} {% include "forum_conversation/forum_polls/poll_vote_form.html" %} {% elif can_be_completed and has_been_completed and change_vote_action %} {% include "forum_conversation/forum_polls/poll_vote_form.html" %} {% else %} {% include "forum_conversation/forum_polls/poll_results.html" %} {% endif %}
{% if view_results_action %} {% elif can_be_completed and has_been_completed and not change_vote_action %} {% endif %} {% endwith %}