{% extends "sakai/base.html" %}{% load molly_sakai %}{% load molly_utils %}{% load i18n %} {% block content %} {% if poll.mayVote %}
{% csrf_token %} {% endif %}

{{ poll.text }}

{% if error %}

{{ error }}

{% endif %} {% if not poll.hasVoted and not poll.isOpen %}

{% if poll.hasClosed %} {% blocktrans with poll.voteClose|timesince as time_since_closed %}You are unable to vote in this poll as it closed {{ time_since_closed }} ago.{% endblocktrans %} {% else %} {% blocktrans with poll.voteOpen|timeuntil as time_until_open %}This poll has not yet opened. Please try again in {{ time_until_open }}.{% endblocktrans %} {% endif %}

{% endif %} {% if not poll.hasVoted and poll.isOpen %}
{% blocktrans with poll.voteClose|timeuntil as time_until_close %}This poll closes {{ time_until_close }} from now.{% endblocktrans %}
{% endif %} {% if poll.minOptions > 1 %}
{% if poll.maxOptions > poll.minOptions %}

{% blocktrans with poll.minOptions as min_options and poll.maxOptions as max_options %}You must select at least {{ min_options }} and at most {{ max_options }} options.{% endblocktrans %}

{% else %}

{% blocktrans with poll.minOptions as options %}You must select {{ options }} options.{% endblocktrans %}

{% endif %}
{% else %} {% if poll.maxOptions > 1 %}

{% blocktrans with poll.maxOptions as max_options %}You can select up to {{ max_options }} options.{% endblocktrans %}

{% endif %} {% endif %} {% if poll.details %}
{{ poll.details|sanitize_html }}
{% endif %}
{% if vote_count %} {% endif %} {% for option in options %} {% if vote_count %} {% endif %} {% endfor %} {% if poll.mayVote %} {% endif %}
{% trans "Vote" %} {% trans "Option detail" %}{% trans "Results" %}
{% if poll.mayVote %} {% else %} {% if option.votedFor %} ✗ {% endif %} {% endif %} {{ option.text|sanitize_html }} {{ option.voteCount }} ({% widthratio option.voteCount vote_count 100 %}%)
{% if poll.mayVote %}
{% endif %} {% endblock %}