{% extends "base.html" %} {% block title %}Election Information{% endblock %} {% block body %} {% if is_admin or election.status == 'In progress'%}
{% if election.status == 'In progress'%} {% if election not in voted %} Vote now! {% else %} Change your vote! {% endif %} {% endif %} {% if is_admin %} Edit {% endif %}
{% endif %} {% if election.status == 'Ended' or election.status == 'Embargoed' %}

{{ election.shortdesc }}

Election Closed voting ended {{ election.end_date | humanize}}

{{ election.description }}

{% elif election.status == 'In progress' %}

{{ election.shortdesc }}

Election Open voting ends {{ election.end_date | humanize}}

{{ election.description }}

{% elif election.status == 'Pending'%}

{{ election.shortdesc }}

Election Opens Soon voting opens {{ election.start_date | humanize}}

{{ election.description }}

{% endif %} {% if election.url %}

More Information about this election

{% endif %} {% if election.status == 'In progress' or election.status == 'Pending' %}

Candidates

{% for candidate in election.candidates %} {% if election.candidates_are_fasusers %} {{ usernamemap['%s' % candidate.id] }} {% else %} {{ candidate.name }} {% endif %} {% if candidate.url %}(click for more info){% endif %} {% endfor %} {% if election.candidates.count() == 0 %}
this election has no candidates nominated
{% endif %}
{% endif %} {% if election.legal_voters.count() != 0 %}

To vote in this election you must be a member of any one of the following groups:

{% else %}

{% endif %} {% if election.status == 'Ended' or (election.status == 'Embargoed' and is_admin)%} {% if election.status == 'Embargoed' and is_admin %}

You are only seeing these results because you are an admin.

The results for this election are currently embargoed pending formal announcement

Consult the text version of the results

{% endif %}

Results

{% if stats['candidate_voters'] %} {% endif %} {%- set lastrow = [0] -%} {%- set flag = [0] -%} {% for candidate in candidates %} {% if loop.index <= election.seats_elected %} {# If we are below the number of user that will be selected, get the number of votes and the flag to False#} {%- set _ = flag.append(0) -%} {%- elif loop.index > election.seats_elected and candidates[loop.index -2].vote_count > candidate.vote_count and flag[-1] == 0 -%} {# if we are above the number of user that will be selected (seats available), check if the number of votes for this candidate is lower than the number of votes for the last candidate and if the Flag is False So this takes care of the case where there are 10 seats elected and the 11th candidate has the same score as the 10th one. In this case we would end up with one more person that the number of seats available and we'll need to either find a way to select one over the other or deal with having one more candidate accepted #} {%- set _ = lastrow.append(1) -%} {%- set _ = flag.append(1) -%} {% else %} {# we are above the number of seats available, the number of votes is below that of the last candidate above selected and the Flag is True which means we already passed the condition above #} {% set _ = lastrow.append(0) -%} {% endif %} {% if stats['candidate_voters'] %} {% if stats['candidate_voters'][candidate.name] %} {% else %} {% endif %} {% endif %} {% endfor %}
Candidate VotesVoters per candidate Average votes per candidate
{% if candidate.url %} {% endif %} {% if election.candidates_are_fasusers %} {{ usernamemap['%s' % candidate.id] }} {% else %} {{candidate.name}} {% endif %} {% if candidate.url %} {% endif %} {% if flag[-1] == 0 %} Elected {% endif %} {{ candidate.vote_count }}{{ stats['candidate_voters'][candidate.name] }}{{ candidate.vote_count / stats['candidate_voters'][candidate.name] }} -

Some statistics about this election

Evolution of the number of voters during this election

{% elif election.status == 'Embargoed' %}

Results

The results for this election cannot be viewed because they are currently embargoed pending formal announcement.
{% endif %} {% endblock %} {% block jscripts %} {{ super() }} {% if election.status == 'Ended' or election.status == 'Embargoed'%} {% endif %} {% endblock %}