{% set already_voted = current_user in poll.users_voted %} {% set allowed_to_vote = poll.allowed_to_vote(current_user) %} {% set results_visible = poll.allowed_to_see_result(current_user) %}
{{ poll.users_voted|length }} users have voted
Votes can{% if not poll.changing_votes_allowed %}not{% endif %} be changed
{% if poll.max_votes_allowed > 1 and poll.max_votes_allowed < poll.options|length %}
You can select {{ poll.max_votes_allowed }} options or fewer
{% endif %} {% if poll.votes_public %}
Votes are publicly visible
{% endif %} {% if not results_visible %} {% if not poll.result_visible_before_closed %}
You will be able to see the result once the poll closes
{% elif not poll.result_visible_before_voting %}
You will be able to see the result once you vote
{% endif %} {% endif %} {% if poll.closes %} {% if poll.has_already_closed %}
This poll closed {{ poll.closes|format_date('%d %B %Y - %H:%M') }}
{% else %}
This poll will close {{ poll.closes|format_date('%d %B %Y - %H:%M') }}
{% endif %} {% endif %}
{% for option in poll.options %}

{% if results_visible %} {% if poll.votes_public %} {% endif %}
{{ option.users_voted|length }}
{% if poll.votes_public %}
{% for user in option.users_voted %}
{{ user.username }}
{% endfor %}
{% endif %} {% endif %} {% endfor %} {% if allowed_to_vote %} {% if not already_voted %} {% elif poll.changing_votes_allowed %} {% endif %} {% endif %}