OpenSlides/openslides/assignment/templates/assignment/poll_view.html
2012-05-18 19:38:21 +02:00

66 lines
2.4 KiB
HTML

{% extends 'assignment/base_assignment.html' %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Election" %} "{{ assignment }}"{% endblock %}
{% block content %}
<h1>{%trans "Election" %}: {{ assignment }}</h1>
<p>{{ ballotnumber }}. {%trans "ballot" %}: {{assignment.poll.get_options}}
{% blocktrans count counter=options|length %}candidate{% plural %}candidates{% endblocktrans %}
</p>
{% if assignment.polldescription %}
<p><b>{% trans "Short description" %}:</b> {{ assignment.polldescription }}</p>
{% endif %}
<i class="helptext">{% trans "Special values" %}: -1 = {% trans 'majority' %}; -2 = {% trans 'undocumented' %}</i>
<form action="" method="post" class="small-form">{% csrf_token %}
<span style="float:right;">
<a href='{% url print_assignment_poll poll.id %}'>
<button class="button" type="button" onclick="window.location='{% url print_assignment_poll poll.id %}'">
<span class="icon pdf">{%trans 'Ballot paper as PDF' %}</span>
</button>
</a>
</span>
<table style="width:auto">
<tr>
<th>Option</th>
{% for value in poll.get_vote_values %}
<th>{{ value }}</th>
{% endfor %}
</tr>
{% for form in forms %}
<tr>
<td>{{ form.option }}</td>
{% for value in form %}
<td>
{{ value.errors }}
{{ value }}
</td>
{% endfor %}
</tr>
{% endfor %}
<tr class="total">
<td>{% trans "Invalid votes" %}</td>
<td>{{ pollform.votesinvalid.errors }}{{ pollform.votesinvalid }}</td>
</tr>
<tr class="total">
<td>{% trans "Votes cast" %}</td>
<td>{{ pollform.votescast.errors }}{{ pollform.votescast }}</td>
</tr>
</table>
<p>
<button class="button" type="submit">
<span class="icon ok">{%trans 'Save' %}</span>
</button>
<button class="button" type="submit" name="apply">
<span class="icon apply">{%trans 'Apply' %}</span>
</button>
<a href='{% url assignment_view poll.assignment.id %}'>
<button class="button" type="button" onclick="window.location='{% url assignment_view poll.assignment.id %}'">
<span class="icon cancel">{%trans 'Cancel' %}</span>
</button>
</a>
</p>
</form>
{% endblock %}