{% load vote_extras %}

{{ election.title }} {% if not electon.started and not election.is_open and not election.closed and election.voters_self_apply %} {% if edit %} Delete application {% endif %} {% if edit %} Edit application {% else %} Apply {% endif %} {% endif %}

{% if election.end_date %} Voting Period: {{ election.start_date|date:"D Y-m-d H:i:s" }} - {{ election.end_date|date:"D Y-m-d H:i:s" }} (UTC{{ election.end_date|date:"O" }})
{{ election.start_date|date:"U" }}|
{{ election.end_date|date:"U" }}|
{% endif %}
{% if can_vote %} Vote Now! {% elif election.closed and election.result_published == '1' %} {% elif not electon.started and not election.is_open and not election.closed %} {% if election.end_date %} Voting starts {{ election.start_date|date:"l Y-m-d H:i:s" }} {% else %} Wait for the admin to start the election {% endif %} {% else %} {% endif %}
{% if election.can_apply %}
{% if election.voters_self_apply %}Applicants{% else %}Options{% endif %}
{% if max_votes_yes %} Up to {{ max_votes_yes }} applicants will be elected. {% endif %} {% if not election.applications.all %} No {% if election.voters_self_apply %}applicants{% else %}options to vote for{% endif %} so far... {% endif %}
{% for application in election.applications|shuffle %}
{% if application.avatar %} applicant-picture {# {% else %}#} {# applicant-picture#} {% endif %}
{% applicant_name application %}

{{ application.text|escape }}

{% endfor %}
{% endif %}