<commit_before>{% extends "beamer.html" %}
{% block title %}{{ block.super }} - #{{ item.title }}{% endblock %}
{% block header %}
    <link type="text/css" rel="stylesheet" media="all" href="/static/styles/assignment.css" />
    <script type="text/javascript" src="/static/javascript/assignment.js"></script>
{% endblock %}
{% block content %}
    <h1>{% trans "Election" %}: {{ item.assignment }}</h1>

    <div id="sidebar">
    <div class="box">
    <p><b>{% trans "Status" %}:</b><br>
    {% trans item.assignment.get_status_display %}</p>
    {% if item.assignment.status == "sea" or item.assignment.status == "vot" %}
        <p><b>{% trans "Number of available posts" %}:</b><br>
        {{ item.assignment.posts }}</p>
    {% endif %}
    </div>
    </div>

    <p>
    <div class="text">{{ item.assignment.description|linebreaks }}</div>
    </p>

    {% if item.assignment.status != "fin" %}
    <h3>{% trans "Candidates" %}</h3>
    <ol>
    {% for profile in item.assignment.profile.all|dictsort:"user.first_name" %}
        <li>{{ profile }} </li>
    {% empty %}
        <li style="list-style: none outside none;">
            <i>{% trans "No candidates available." %}</i>
        </li>
    {% endfor %}
    </ol>
    {% endif %}

    {% with polls|first as firstpoll %}
    {% if polls.count > 0 and firstpoll.published %}

    <p><br></p>
    <h3>{% trans "Election results" %}</h3>
    <table>
    <tr>
        <th>{% trans "Candidates" %}</th>
        {% for poll in item.assignment.poll_set.all %}
            {% if poll.published %}
            <th><nobr>{{forloop.counter}}. {% trans "ballot" %}</nobr></th>
            {% endif %}
        {% endfor %}
    </tr>
    {% for vote in votes %}
    <tr class="{% cycle 'odd' '' %}">
        {% with vote|first as candidate %}
        <td class="candidate {% if candidate.1 %}elected{% endif %}">
            {% if candidate.1 %}
                <a class="elected"><img src="/static/images/icons/games-highscores.png" title="{% trans 'Candidate is elected' %}"></a>
            {% endif %}
            {{ candidate.0 }}
        </td>
        {% for v in vote|last %}
            <td style="white-space:nowrap;" {% if candidate.1 %}class="elected"{% endif %}>{% if v %}
                    {% if v|length == 3 %}<commit_msg>Improved assignment projector view.<commit_after>{% extends "beamer.html" %}
{% block title %}{{ block.super }} - #{{ item.title }}{% endblock %}
{% block header %}
    <link type="text/css" rel="stylesheet" media="all" href="/static/styles/assignment.css" />
    <script type="text/javascript" src="/static/javascript/assignment.js"></script>
{% endblock %}
{% block content %}
    <h1>{% trans "Election" %}: {{ item.assignment }}</h1>

    {% if item.assignment.status != "fin" %}
    <div id="sidebar">
    <div class="box">
    <p><b>{% trans "Status" %}:</b><br>
    {% trans item.assignment.get_status_display %}</p>
    {% if item.assignment.status == "sea" or item.assignment.status == "vot" %}
        <p><b>{% trans "Number of available posts" %}:</b><br>
        {{ item.assignment.posts }}</p>
    {% endif %}
    </div>
    </div>
    {% endif %}

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

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

    {% with polls|first as firstpoll %}
    {% if polls.count > 0 and firstpoll.published %}
    <h3>{% trans "Election results" %}</h3>
    <table>
    <tr>
        <th>{% trans "Candidates" %}</th>
        {% for poll in item.assignment.poll_set.all %}
            {% if poll.published %}
            <th><nobr>{{forloop.counter}}. {% trans "ballot" %}</nobr></th>
            {% endif %}
        {% endfor %}
    </tr>
    {% for vote in votes %}
    <tr class="{% cycle 'odd' '' %}">
        {% with vote|first as candidate %}
        <td class="candidate {% if candidate.1 %}elected{% endif %}">
            {% if candidate.1 %}
                <a class="elected"><img src="/static/images/icons/games-highscores.png" title="{% trans 'Candidate is elected' %}"></a>
            {% endif %}
            {{ candidate.0 }}
        </td>
        {% for v in vote|last %}
            <td style="white-space:nowrap;" {% if candidate.1 %}class="elected"{% endif %}>{% if v %}
                    {% if v|length == 3 %}
{'fraction_non_alphanumeric': 0.21193026675068263, 'fraction_numerical': 0.005040957781978576, 'mean_word_length': 2.3941553813257306, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 113, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5213077', 'n_tokens_mistral': 1710, 'n_tokens_neox': 1518, 'n_words': 359}