{% extends "assignment/base_assignment.html" %} {% load i18n %} {% load staticfiles %} {% block title %}{{ block.super }} – {% trans "Election" %} "{{ assignment }}"{% endblock %} {% block content %}

{{ assignment }}

{{ assignment.description }}

{% trans "Candidates" %}

    {% for profile in assignment.profile.all|dictsort:"user.first_name" %}
  1. {{ profile }} {% if perms.assignment.can_manage_assignment %} {% if assignment.status == "sea" or assignment.status == "vot" %} {% endif %} {% endif %}
  2. {% empty %}
  3. {% trans "No candidates available." %}
  4. {% endfor %}
{% if assignment.status == "sea" or perms.assignment.can_manage_assignment and assignment.status == "vot" %} {% if perms.assignment.can_nominate_self or perms.assignment.can_nominate_other %}
{% csrf_token %} {% if perms.assignment.can_nominate_self %}

{% if user.profile in assignment.profile.all %} {% trans 'Withdraw self candidature' %} {% else %} {% if user.profile %} {% trans 'Self candidature' %} {% endif %} {% endif %}

{% endif %} {% if perms.assignment.can_nominate_other %} {% for field in form %} {{ field }} {% if perms.participant.can_see_participant and perms.participant.can_manage_participant %} {% endif %} {% endfor %}

{% endif %}
{% endif %} {% endif %}


{% trans "Election results" %}

{% if polls.exists %} {% with ballotnumber=polls.count %} {% endwith %} {% for poll in polls %} {% endfor %} {% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %} {% endif %} {% for candidate, poll_list in vote_results.items %} {% for vote in poll_list %} {% endfor %} {% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %} {% endif %} {% endfor %} {% for poll in polls %} {% if poll.published or perms.assignment.can_manage_assignment %} {% endif %} {% endfor %} {% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %} {% endif %} {% for poll in polls %} {% if poll.published or perms.assignment.can_manage_assignment %} {% endif %} {% endfor %} {% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %} {% endif %}
{% trans "ballot" %}
{% trans "Candidates" %} {{ poll.get_ballot }}. {% trans 'ballot' %} {% if perms.assignment.can_manage_assignment %}
{% endif %}
{% trans 'New ballot' %}
{% if candidate in assignment.elected.all %} {% if perms.assignment.can_manage_assignment %} {% else %} {% endif %} {% else %} {% if perms.assignment.can_manage_assignment %} {% endif %} {% endif %} {{ candidate }} {% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %} {{ vote.Yes }}
{{ vote.No }}
{{ vote.Abstain }}
{% elif 'Votes' in vote %} {{ vote.Votes }} {% elif vote == None %} {% trans 'was not a
candidate'%} {% else %}   {% endif %}
{% trans 'Invalid votes' %} {% if poll.has_votes %} {{ poll.print_votesinvalid }} {% endif %}
{% trans 'Votes cast' %} {% if poll.has_votes %} {{ poll.print_votescast }} {% endif %}
{% else %} {% trans "No ballots available." %} {% if assignment.profile.count > 0 and perms.assignment.can_manage_assignment and assignment.status == "vot" %}

{% trans 'New ballot' %}

{% endif %} {% endif %}
{% endblock %}