OpenSlides/openslides/assignment/templates/projector/Assignment.html
Emanuel Schuetze 719ea6ec79 #93: Show application number in header of projector template.
Some more projetor style work.
2012-04-24 22:27:16 +02:00

113 lines
4.1 KiB
HTML

{% extends "base-projector.html" %}
{% load tags %}
{% load i18n %}
{% load staticfiles %}
{% 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" %}: {{ assignment }}</h1>
{% if assignment.status != "fin" %}
<div id="sidebar">
<div class="box">
<p><b>{% trans "Status" %}:</b><br>
{% trans assignment.get_status_display %}</p>
{% if assignment.status == "sea" or assignment.status == "vot" %}
<p><b>{% trans "Number of available posts" %}:</b><br>
{{ assignment.posts }}</p>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}
{% block scrollcontent %}
{% if not assignment.profile.exists %}
<p>
<div class="text">{{ assignment.description|linebreaks }}</div>
</p>
{% endif %}
{% if assignment.profile.exists and assignment.status != "fin" %}
<h3>{% trans "Candidates" %}</h3>
<ol>
{% for profile in 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 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/voting-yes.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 %}
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {% if v.0 %}{{ v.0 }}{% else %}&empty;{% endif %}<br>
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {% if v.1 %}{{ v.1 }}{% else %}&empty;{% endif %}<br>
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {% if v.2 %}{{ v.2 }}{% else %}&empty;{% endif %}<br>
{% else %}
{% if v != "-" %}<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}">{% endif %}
{{ v }}
{% endif %}
{% endif %}
</td>
{% endfor %}
{% endwith %}
</tr>
{% empty %}
<tr>
<td {% if assignment.profile.exist %}colspan="2"{% endif %}><i>{% trans "No ballots available." %}</i></td>
</tr>
{% endfor %}
<tr>
<td>{%trans 'Invalid votes' %}</td>
{% for p in polls %}
{% if p.published %}
<td style="white-space:nowrap;"><img src="{% static 'images/icons/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ p.print_votesinvalid }}</td>
{% endif %}
{% endfor %}
</tr>
<tr class="total">
<td><b>{%trans 'Votes cast' %}</b></td>
{% for p in polls %}
{% if p.published %}
<td style="white-space:nowrap;"><img src="{% static 'images/icons/voting-total.png' %}" title="{% trans 'Votes cast' %}"> <b>{{ p.print_votescast }}</b></td>
{% endif %}
{% endfor %}
</tr>
</table>
{% endif %}
{% endwith %}
<br>
{% endblock %}