From ebbacfd443d7cbb235d83f5e87ca3ee767901abd Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Mon, 2 Apr 2012 07:32:42 +0200 Subject: [PATCH] #80: New participant status filter --- .../participant/templates/participant/overview.html | 13 +++++++++---- openslides/participant/views.py | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/openslides/participant/templates/participant/overview.html b/openslides/participant/templates/participant/overview.html index 978d2acb7..73d517799 100644 --- a/openslides/participant/templates/participant/overview.html +++ b/openslides/participant/templates/participant/overview.html @@ -8,20 +8,20 @@ {% csrf_token %} {%trans "Filter" %}: +

{{ users|length }} {% trans "Participant" %} diff --git a/openslides/participant/views.py b/openslides/participant/views.py index 3847101c2..a0a8bed7f 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -60,7 +60,7 @@ def get_overview(request): except KeyError: sortfilter = {} - for value in [u'gender', u'group', u'type', u'committee', u'sort', u'reverse']: + for value in [u'gender', u'group', u'type', u'committee', u'status', u'sort', u'reverse']: if value in request.REQUEST: if request.REQUEST[value] == '---': try: @@ -79,6 +79,8 @@ def get_overview(request): query = query.filter(profile__type__iexact=sortfilter['type'][0]) if 'committee' in sortfilter: query = query.filter(profile__committee__iexact=sortfilter['committee'][0]) + if 'status' in sortfilter: + query = query.filter(is_active=sortfilter['status'][0]) if 'sort' in sortfilter: if sortfilter['sort'][0] in ['first_name', 'last_name','username','last_login','email']: query = query.order_by(sortfilter['sort'][0])