2011-07-31 10:46:29 +02:00
|
|
|
{% extends "beamer.html" %}
|
2011-09-06 07:33:13 +02:00
|
|
|
{% 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 %}
|
2011-07-31 10:46:29 +02:00
|
|
|
{% block content %}
|
|
|
|
{% trans "Election" %}:
|
|
|
|
<h1>{{ item.assignment }}</h1>
|
|
|
|
|
2011-09-05 21:53:15 +02:00
|
|
|
|
2011-07-31 10:46:29 +02:00
|
|
|
<div id="sidebar">
|
|
|
|
<div class="box">
|
|
|
|
<h4>{% trans "Status" %}:</h4>
|
|
|
|
{% trans item.assignment.get_status_display %}
|
2011-09-05 21:53:15 +02:00
|
|
|
{% if item.assignment.status == "sea" or item.assignment.status == "vot" %}
|
|
|
|
<h4>{% trans "Number of available posts" %}:</h4>
|
|
|
|
{{ item.assignment.posts }}
|
|
|
|
{% endif %}
|
2011-07-31 10:46:29 +02:00
|
|
|
</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 %}
|
|
|
|
|
|
|
|
{% if item.assignment.poll_set.all.count > 0 %}
|
|
|
|
<p><br></p>
|
|
|
|
<h3>{% trans "Election results" %}</h3>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>{% trans "Candidates" %}</th>
|
|
|
|
{% for poll in item.assignment.poll_set.all %}
|
|
|
|
<th><nobr>{{forloop.counter}}. {% trans "ballot" %}</nobr></th>
|
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
|
|
|
{% for vote in votes %}
|
|
|
|
<tr class="{% cycle 'odd' '' %}">
|
2011-09-05 20:47:55 +02:00
|
|
|
<td class="candidate">
|
|
|
|
{% with vote|first as candidate %}
|
|
|
|
{% if candidate.1 %}
|
2011-09-06 07:33:13 +02:00
|
|
|
<a class="elected"><img src="/static/images/icons/games-highscores.png" title="{% trans 'Candidate is elected' %}"></a>
|
2011-09-05 20:47:55 +02:00
|
|
|
{% endif %}
|
2011-09-06 07:33:13 +02:00
|
|
|
{{ candidate.0 }}
|
2011-09-05 20:47:55 +02:00
|
|
|
{% endwith %}
|
|
|
|
</td>
|
|
|
|
{% for v in vote|last %}
|
|
|
|
<td style="white-space:nowrap;">{% if v %}
|
2011-07-31 10:46:29 +02:00
|
|
|
{% if v|length == 3 %}
|
|
|
|
<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}"> {% if v.0 %}{{ v.0 }}{% else %}∅{% endif %}<br>
|
|
|
|
<img src="/static/images/icons/voting-no.png" title="{% trans 'No' %}"> {% if v.1 %}{{ v.1 }}{% else %}∅{% endif %}<br>
|
|
|
|
<img src="/static/images/icons/voting-abstention.png" title="{% trans 'Abstention' %}"> {% if v.2 %}{{ v.2 }}{% else %}∅{% endif %}<br>
|
|
|
|
{% else %}
|
2011-09-06 07:33:13 +02:00
|
|
|
{% if v != "-" %}<img src="/static/images/icons/voting-yes.png" title="{% trans 'Yes' %}">{% endif %}
|
2011-07-31 10:46:29 +02:00
|
|
|
{{ v }}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}∅{% endif %}
|
|
|
|
</td>
|
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
|
|
|
{% empty %}
|
|
|
|
<tr>
|
|
|
|
<td {% if item.assignment.profile.exist %}colspan="2"{% endif %}><i>{% trans "No ballots available." %}</i></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<br>
|
|
|
|
{% endblock %}
|