{% load i18n %}
{% load staticfiles %}
{% load tags %}
{% load humanize %}

<div id="sidebar">
<div class="well">
    <!-- Status -->
    <h4 class="first">{% trans "Status" %}:</h4>
    {% trans assignment.get_status_display %}</p>
        <h4>{% trans "Number of available posts" %}:</h4>
        {{ assignment.posts }}
</div>
</div>

<h1>{{ assignment }}
    <small>
        {% trans "Election" %}
    </small>
</h1>

{% if not assignment.candidates %}
    <p>
        <div class="text">{{ assignment.description|linebreaks }}</div>
    </p>
{% endif %}

{% if assignment.candidates and assignment.status != "fin" %}
    <h3>{% trans "Candidates" %}</h3>
    <ol>
        {% for candidate in assignment.candidates %}
            <li>{{ candidate }} </li>
        {% empty %}
            <li style="list-style: none outside none;">
                <i>{% trans "No candidates available." %}</i>
            </li>
        {% endfor %}
    </ol>
    <p><br></p>
{% endif %}

{% if assignment.status == "fin" %}
    <h3>{% trans "Elected candidates" %}</h3>
    <ol>
        {% for person in assignment.elected %}
            <li>{{ person }}</li>
        {% empty %}
            <li style="list-style: none outside none;">
                <i>{% trans "No candidates elected." %}</i>
            </li>
        {% endfor %}
    </ol>
{% endif %}
