{% for candidate, poll_list in vote_results.items %}
{% if candidate in assignment.elected.all %}
{% if perms.assignment.can_manage_assignment %}
{% else %}
{% endif %}
{% else %}
{% if perms.assignment.can_manage_assignment %}
{% endif %}
{% endif %}
{{ candidate }}
{% for vote in poll_list %}
{% 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 %}
{% endfor %}
{% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
{% endif %}
{% endfor %}
{% trans 'Invalid votes' %}
{% for poll in polls %}
{% if poll.published or perms.assignment.can_manage_assignment %}
{% if poll.has_votes %}
{{ poll.print_votesinvalid }}
{% endif %}
{% endif %}
{% endfor %}
{% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
{% endif %}
{% trans 'Votes cast' %}
{% for poll in polls %}
{% if poll.published or perms.assignment.can_manage_assignment %}
{% if poll.has_votes %}
{{ poll.print_votescast }}
{% endif %}
{% endif %}
{% endfor %}
{% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
{% endif %}
{% else %}
{% trans "No ballots available." %}
{% if assignment.profile.count > 0 and perms.assignment.can_manage_assignment and assignment.status == "vot" %}