OpenSlides/openslides/participant/templates/participant/overview.html

89 lines
5.8 KiB
HTML
Raw Normal View History

2011-07-31 10:46:29 +02:00
{% extends "participant/base_participant.html" %}
{% block title %}{{ block.super }} - {%trans "Participants" %}{% endblock %}
{% block content %}
2011-09-07 22:46:47 +02:00
<h1>{% trans "Participants" %}</h1>
2011-07-31 10:46:29 +02:00
<p><form action="{{request.url}}" name="filter" method="post">
{% csrf_token %}
2011-07-31 10:46:29 +02:00
{%trans "Filter" %}:
<select class="default-input" name="gender" onchange="document.forms['filter'].submit()">
<option value="---">-- {%trans "Gender" %}--</option>
<option value="male" {% if 'male' in sortfilter.gender %}selected{% endif %}>{%trans "Male" %}</option>
<option value="female" {% if 'female' in sortfilter.gender %}selected{% endif %}>{%trans "Female" %}</option>
<option value="none" {% if 'none' in sortfilter.gender %}selected{% endif %}>{%trans "Not specified" %}</option>
2011-07-31 10:46:29 +02:00
</select>
<select class="default-input" name="group" onchange="document.forms['filter'].submit()">
<option value="---">-- {%trans "Group" %}--</option>
{% for group in groups %}
<option value="{{ group }}" {% if group in sortfilter.group %}selected{% endif %}>
2011-07-31 10:46:29 +02:00
{{ group }}</option>
{% endfor %}
</select>
<select class="default-input" name="type" onchange="document.forms['filter'].submit()">
<option value="---">-- {%trans "Type" %}--</option>
<option value="delegate" {% if 'delegate' in sortfilter.type %}selected{% endif %}>{%trans "Delegate" %}</option>
<option value="observer" {% if 'observer' in sortfilter.type %}selected{% endif %}>{%trans "Observer" %}</option>
<option value="staff" {% if 'staff' in sortfilter.type %}selected{% endif %}>{%trans "Staff" %}</option>
<option value="guest" {% if 'guest' in sortfilter.type %}selected{% endif %}>{%trans "Guest" %}</option>
2011-07-31 10:46:29 +02:00
</select>
<select class="default-input" name="committee" onchange="document.forms['filter'].submit()">
<option value="---">-- {%trans "Committee" %}--</option>
{% for committee in committees %}
<option value="{{ committee }}" {% if committee in sortfilter.committee %}selected{% endif %}>
2011-07-31 10:46:29 +02:00
{{ committee }}</option>
{% endfor %}
</select>
</form>
</p>
2011-09-07 22:46:47 +02:00
{{ users|length }} {% trans "Participant" %}
2011-07-31 10:46:29 +02:00
<table>
<tr>
<th><a href="?sort=first_name&reverse={% if 'first_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{%trans "First Name" %}</a></th>
<th><a href="?sort=last_name&reverse={% if 'last_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{%trans "Last Name" %}</a></th>
<th><a href="?sort=group&reverse={% if 'group' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{%trans "Group" %}</a></th>
<th><a href="?sort=type&reverse={% if 'type' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{%trans "Type" %}</a></th>
<th><a href="?sort=committee&reverse={% if 'committee' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{%trans "Committee" %}</a></th>
2011-09-04 12:21:58 +02:00
{% if perms.participant.can_manage_participant %}
<th><a href="?sort=username&reverse={% if 'username' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{%trans "Username" %}</a></th>
<th><a href="?sort=email&reverse={% if 'email' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{%trans "Email" %}</a></th>
<th><a href="?sort=last_login&reverse={% if 'last_login' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{%trans "Last Login" %}</a></th>
2011-07-31 10:46:29 +02:00
<th>{%trans "Actions" %}</th>
{% endif %}
</tr>
{% for user in users %}
<tr class="{% cycle '' 'odd' %}">
<td>{{ user.first_name }}</td>
<td>{{ user.last_name }}</td>
<td>{{ user.profile.group }}</td>
2011-09-21 21:01:56 +02:00
<td>{{ user.profile.get_type_display }}</td>
2011-07-31 10:46:29 +02:00
<td>{{ user.profile.committee }}</td>
2011-09-04 12:21:58 +02:00
{% if perms.participant.can_manage_participant %}
2011-07-31 10:46:29 +02:00
<td>{{ user.username }}</td>
<td>{{ user.email }}</td>
<td>{% if user.last_login > user.date_joined %}
{{ user.last_login }}
{% endif %}</td>
<td style="width: 1px; white-space: nowrap;"><a href="{% url user_edit user.id %}"><img src="/static/images/icons/document-edit.png" title="{%trans 'Edit participant' %}"></a>
<a href="{% url user_delete user.id %}"><img src="/static/images/icons/edit-delete.png" title="{%trans 'Delete participant' %}"></a>
{% if user.is_active %}
<a href="{% url user_set_active user.id %}"><img src="/static/images/icons/user-online.png" title="{%trans 'Participiant is activated. Click to deactivate!' %}"></a>
{% else %}
<a href="{% url user_set_active user.id %}"><img src="/static/images/icons/user-offline.png" title="{%trans 'Participiant is deactivated. Click to activate!' %}"></a>
{% endif %}
{% if user.is_superuser %}
<a href="{% url user_set_superuser user.id %}"><img src="/static/images/icons/meeting-chair.png" title="{%trans 'Administrator. Click to get normal user!' %}"></a>
{% else %}
<a href="{% url user_set_superuser user.id %}"><img src="/static/images/icons/im-user.png" title="{%trans 'Normal user. Click to get administrator!' %}"></a>
{% endif %}
</td>
{% endif %}
</tr>
{% empty %}
<tr>
2011-09-07 18:06:11 +02:00
<td colspan="9"><i>{%trans "No participants available." %}</i></td>
2011-07-31 10:46:29 +02:00
</tr>
{% endfor %}
</table>
{% endblock %}