OpenSlides/openslides/assignment/templates/assignment/poll_view.html

66 lines
2.4 KiB
HTML
Raw Normal View History

2011-07-31 10:46:29 +02:00
{% extends 'assignment/base_assignment.html' %}
2012-02-09 16:57:10 +01:00
{% load i18n %}
2012-04-21 22:27:11 +02:00
{% block title %}{{ block.super }} - {%trans "Election" %} "{{ assignment }}"{% endblock %}
2011-07-31 10:46:29 +02:00
{% block content %}
2012-04-21 22:27:11 +02:00
<h1>{%trans "Election" %}: {{ assignment }}</h1>
<p>{{ ballotnumber }}. {%trans "ballot" %}: {{assignment.poll.get_options}}
2011-07-31 10:46:29 +02:00
{% 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>
2012-04-12 20:11:05 +02:00
<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>
2012-04-12 20:11:05 +02:00
<table style="width:auto">
2011-07-31 10:46:29 +02:00
<tr>
2012-02-19 19:27:00 +01:00
<th>Option</th>
{% for value in poll.get_vote_values %}
<th>{{ value }}</th>
{% endfor %}
2011-07-31 10:46:29 +02:00
</tr>
2012-02-19 19:27:00 +01:00
{% for form in forms %}
<tr>
<td>{{ form.option }}</td>
{% for value in form %}
<td>
{{ value.errors }}
{{ value }}
</td>
{% endfor %}
2011-07-31 10:46:29 +02:00
</tr>
{% endfor %}
2012-02-19 19:27:00 +01:00
<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>
2011-07-31 10:46:29 +02:00
</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>
2011-07-31 10:46:29 +02:00
</form>
{% endblock %}