2011-07-31 10:46:29 +02:00
{% extends "participant/base_participant.html" %}
2012-02-09 16:57:10 +01:00
{% load i18n %}
2012-04-14 14:51:56 +02:00
{% load staticfiles %}
2012-06-30 10:39:58 +02:00
{% load tags %}
2012-02-09 16:57:10 +01:00
2012-07-13 01:10:58 +02:00
{% block title %}{{ block.super }} – {% trans "Participants" %}{% endblock %}
2011-07-31 10:46:29 +02:00
2012-04-02 08:35:10 +02:00
{% block header %}
{% if perms.agenda.can_manage_agenda %}
2012-04-14 14:51:56 +02:00
< link type = "text/css" rel = "stylesheet" media = "all" href = "{% static 'styles/participant.css' %}" / >
< script type = "text/javascript" src = "{% static 'javascript/participant.js' %}" > < / script >
2012-04-02 08:35:10 +02:00
{% endif %}
{% endblock %}
2011-07-31 10:46:29 +02:00
{% block content %}
2011-09-07 22:46:47 +02:00
< h1 > {% trans "Participants" %}< / h1 >
2011-07-31 10:46:29 +02:00
2011-09-10 00:16:57 +02:00
< p > < form action = "{{request.url}}" name = "filter" method = "post" >
{% csrf_token %}
2012-07-16 14:00:29 +02:00
{% trans "Filter" %}:
2011-07-31 10:46:29 +02:00
< select class = "default-input" name = "gender" onchange = "document.forms['filter'].submit()" >
2012-07-16 14:00:29 +02:00
< 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 = "" { % if ' ' 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()" >
2012-07-16 14:00:29 +02:00
< option value = "---" > -- {% trans "Group" %} --< / option >
2011-07-31 10:46:29 +02:00
{% for group in groups %}
2011-09-10 00:16:57 +02:00
< 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()" >
2012-07-16 14:00:29 +02:00
< 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 >
< option value = "" { % if ' ' in sortfilter . type % } selected { % endif % } > {% trans "Not specified" %}< / option >
2011-07-31 10:46:29 +02:00
< / select >
< select class = "default-input" name = "committee" onchange = "document.forms['filter'].submit()" >
2012-07-16 14:00:29 +02:00
< option value = "---" > -- {% trans "Committee" %} --< / option >
2011-07-31 10:46:29 +02:00
{% for committee in committees %}
2011-09-10 00:16:57 +02:00
< option value = "{{ committee }}" { % if committee in sortfilter . committee % } selected { % endif % } >
2011-07-31 10:46:29 +02:00
{{ committee }}< / option >
{% endfor %}
< / select >
2012-04-02 08:31:26 +02:00
< select class = "default-input" name = "status" onchange = "document.forms['filter'].submit()" >
2012-07-16 14:00:29 +02:00
< option value = "---" > -- {% trans "Status" %} --< / option >
< option value = "1" { % if ' 1 ' in sortfilter . status % } selected { % endif % } > {% trans "Active" %}< / option >
< option value = "0" { % if ' 0 ' in sortfilter . status % } selected { % endif % } > {% trans "Inactive" %}< / option >
2012-04-02 08:31:26 +02:00
< / select >
2011-07-31 10:46:29 +02:00
< / form >
< / p >
2012-04-02 08:37:34 +02:00
{% if users|length == allusers|length %}
2012-04-20 08:14:23 +02:00
{{ users|length }}
2012-04-20 11:15:15 +02:00
{% blocktrans count counter=users|length %}participant{% plural %}participants{% endblocktrans %}
2012-04-02 08:37:34 +02:00
{% else %}
{{ users|length }} {% trans "of" %} {{ allusers|length }} {% trans "Participants" %} (= {{ percent }} %)
{% endif %}
2011-07-31 10:46:29 +02:00
< table >
< tr >
2012-07-16 14:00:29 +02:00
< 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 %}
2012-07-16 14:00:29 +02:00
< th > < a href = "?sort=comment&reverse={% if 'comment' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}" > {% trans "Comment" %}< / 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 >
< th > {% trans "Actions" %}< / th >
2011-07-31 10:46:29 +02:00
{% 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 %}
2012-06-30 10:39:58 +02:00
< td > {{ user.profile.comment|first_line }}< / td >
2011-07-31 10:46:29 +02:00
< td > {% if user.last_login > user.date_joined %}
{{ user.last_login }}
{% endif %}< / td >
2011-11-14 20:14:56 +01:00
< td > < span style = "width: 1px; white-space: nowrap;" >
2012-07-16 14:00:29 +02:00
< a href = "{% url user_edit user.id %}" > < img src = "{% static 'images/icons/edit.png' %}" title = "{% trans 'Edit participant' %}" > < / a >
< a href = "{% url user_delete user.id %}" > < img src = "{% static 'images/icons/delete.png' %}" title = "{% trans 'Delete participant' %}" > < / a >
2012-05-19 19:22:20 +02:00
< a class = "status_link {% if user.is_active %}active{% endif %}"
href="{% url user_status user.id %}"
2012-07-16 14:00:29 +02:00
title="{% trans 'Change status (active/inactive)' %}">
2012-04-02 08:35:10 +02:00
< span > < / span >
< / a >
2011-11-14 20:14:56 +01:00
< / span >
2011-07-31 10:46:29 +02:00
< / td >
{% endif %}
< / tr >
{% empty %}
< tr >
2012-07-16 14:00:29 +02:00
< td colspan = "9" > < i > {% trans "No participants available." %}< / i > < / td >
2011-07-31 10:46:29 +02:00
< / tr >
{% endfor %}
< / table >
{% endblock %}