OpenSlides/openslides/assignment/templates/projector/Assignment.html
Emanuel Schuetze a383a4305b Fixed some (pdf) template issues and updated (DE) translation.
- Fixed #737 (Motion edit link is missing for normal delegate users)
- Fixed motion pdf filename errors (now use motion-<identifier>.pdf or if no identifier: motion-<title>.pdf with using djangos slugify for special chars in title)
- Fixed motion pdf build error if there is an unauthorized version
- Enlarge max_length of event name field to 50 chars.
- Align participant import instruction with motion import page.
- Added title field to particpants-demo_en.csv.
- participant overview: Show comma after last_name only if first_name and last_name are given.
- Changed all page titles to "<specific action page> - <event-name>" (moved event-name to the end of the string)
- Updated EN tranlation string.
- Updated DE translations.
2013-06-15 17:50:30 +02:00

123 lines
4.6 KiB
HTML

{% extends "base-projector.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ assignment }}{% 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 %}
{% 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 %}
<h1>{% trans "Election" %}: {{ assignment }}</h1>
{% endblock %}
{% block scrollcontent %}
{% 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 polls.exists %}
<h3>{% trans "Election results" %}</h3>
<table>
<tr>
<th>{% trans "Candidates" %}</th>
{% for poll in polls %}
<th>
<nobr>{{ poll.get_ballot }}. {% trans "ballot" %}</nobr>
</th>
{% endfor %}
</tr>
{% for candidate, poll_list in vote_results.items %}
<tr class="{% cycle 'odd' '' as rowcolors %}">
<td class="candidate{% if candidate in assignment.elected %} elected{% endif %}">
{% if candidate in assignment.elected %}
<a class="elected">
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Candidate is elected' %}">
</a>
{% endif %}
{{ candidate }}
</td>
{% for vote in poll_list %}
<td style="white-space:nowrap;"{% if candidate in assignment.elected %} class="elected"{% endif %}>
{% if not assignment_publish_winner_results_only or candidate in assignment.elected %}
{% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %}
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Yes }}<br>
<img src="{% static 'img/voting-no.png' %}" title="{% trans 'No' %}"> {{ vote.No }}<br>
<img src="{% static 'img/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ vote.Abstain }}<br>
{% elif 'Votes' in vote %}
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Votes }}
{% elif vote == None %}
{% trans 'was not a <br> candidate'%}
{% else %}
&nbsp;
{% endif %}
{% else %}
&nbsp;
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
<tr class="{% cycle rowcolors %}">
<td>{% trans 'Invalid votes' %}</td>
{% for poll in polls %}
<td style="white-space:nowrap;">
{% if poll.has_votes %}
<img src="{% static 'img/voting-invalid.png' %}" title="{% trans 'Invalid' %}">
{{ poll.print_votesinvalid }}
{% endif %}
</td>
{% endfor %}
</tr>
<tr class="total">
<td>
<strong>{% trans 'Votes cast' %}</strong>
</td>
{% for poll in polls %}
<td style="white-space:nowrap;">
{% if poll.has_votes %}
<img src="{% static 'img/voting-total.png' %}" title="{% trans 'Votes cast' %}">
<strong>{{ poll.print_votescast }}</strong>
{% endif %}
</td>
{% endfor %}
</tr>
</table>
{% endif %}
{% endblock %}