OpenSlides/openslides/assignment/templates/assignment/overview.html

46 lines
2.4 KiB
HTML
Raw Normal View History

2011-07-31 10:46:29 +02:00
{% extends "assignment/base_assignment.html" %}
{% block title %}{{ block.super }} - {%trans "Elections" %}{% endblock %}
{% block content %}
<h1>{%trans "Elections" %}</h1>
<p><form action="{{request.url}}" name="filter" method="get">
{%trans "Filter" %}:
<select class="default-input" name="status" onchange="document.forms['filter'].submit()">
<option value="---">-- {%trans "Status" %}--</option>
<option value="sea" {% if 'sea' in request.GET.status %}selected{% endif %}>{%trans "Searching for candidates" %}</option>
<option value="vot" {% if 'vot' in request.GET.status %}selected{% endif %}>{%trans "Voting" %}</option>
<option value="fin" {% if 'fin' in request.GET.status %}selected{% endif %}>{%trans "Finished" %}</option>
</select>
</form>
</p>
{{ assignments|length }}
2011-09-07 22:46:47 +02:00
{% blocktrans count counter=assignments|length %}election{% plural %}elections{% endblocktrans %}
2011-07-31 10:46:29 +02:00
<table>
<tr>
<th><a href="?sort=name{% if 'name' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{%trans "Elections" %}</a></th>
<th>{%trans "Candidates" %}</th>
<th><a href="?sort=status{% if 'status' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{%trans "Status" %}</a></th>
{% if perms.assignment.can_manage_assignment %}
<th>{%trans "Actions" %}</th>
{% endif %}
</tr>
{% for assignment in assignments %}
<tr class="{% cycle '' 'odd' %}">
<td><a href="{% url assignment_view assignment.id %}">{{ assignment }}</a></td>
<td>{{ assignment.profile.count }} / {{ assignment.posts }}</td>
2011-07-31 10:46:29 +02:00
<td>{{ assignment.get_status_display }}</td>
{% if perms.assignment.can_manage_assignment %}
<td><a href="{% url assignment_edit assignment.id %}"><img src="/static/images/icons/document-edit.png" title="{%trans 'Edit assignment' %}"></a>
<a href="{% url assignment_delete assignment.id %}"><img src="/static/images/icons/edit-delete.png" title="{%trans 'Delete assignment' %}"></a>
</td>
{% endif %}
</tr>
{% empty %}
<tr>
<td colspan="4"><i>{%trans "No assignments available." %}</i></td>
</tr>
{% endfor %}
</table>
{% endblock %}