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

69 lines
2.6 KiB
HTML

{% extends 'assignment/base_assignment.html' %}
{% block title %}{{ block.super }} - {%trans "Poll" %} "{{ poll }}"{% endblock %}
{% block content %}
<h1>{{ poll }}</h1>
<p>{{ ballotnumber }}. {%trans "ballot" %}: {{options.count}}
{% blocktrans count counter=options|length %}candidate{% plural %}candidates{% endblocktrans %}
</p>
<p><b>{% trans "Short description" %}:</b> {{ poll.description }}</p>
<i>-1 := {% trans 'majority' %}, -2 := {% trans 'undocumented' %}</i>
<form action="" method="post">{% csrf_token %}
<table class="table" style="width:auto;">
<tr>
<th>{%trans "Option" %}</th>
{% if poll.optiondecision %}
<th>{%trans "Yes" %}</th>
<th>{%trans "No" %}</th>
<th>{%trans "Abstention" %}</th>
{% else %}
<th>{%trans "Votes" %}</th>
{% endif %}
</tr>
{% for option in options %}
<tr class="{% cycle 'odd' '' %}">
<td>{{ option }}</td>
{% if poll.optiondecision %}
<td>{{ option.form.yes.errors }}{{ option.form.yes }}</td>
<td>{{ option.form.no.errors }}{{ option.form.no }}</td>
<td>{{ option.form.undesided.errors }}{{ option.form.undesided }}</td>
{% else %}
<td>{{ option.form.yes.errors }}{{ option.form.yes }}</td>
{% endif %}
</tr>
{% endfor %}
<tr class="total">
<td>{% trans "Invalid votes" %}</td>
<td {% if poll.optiondecision %}colspan="3"{% endif %}>{{ form.invalid.errors }}{{ form.invalid }}</td>
</tr>
<tr class="total">
<td style="white-space: nowrap;"><b>{% trans "Votes cast" %}</b></td>
<td {% if poll.optiondecision %}colspan="3"{% endif %}>{{ form.votescast.errors }}{{ form.votescast }}</td>
</tr>
</table>
<p>
<a href='{% url print_assignment_poll poll.id %}'>
<span class="button">
<span class="icon pdf">{%trans 'Print ballot' %}</span>
</span>
</a>
</p>
<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 %}