From a6652e3fb45543d79677182f635b908072d6bdfd Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Sun, 4 Sep 2011 09:12:15 +0200 Subject: [PATCH] Updated participants list with permissions. --- .../templates/participant/overview.html | 16 ++++------------ openslides/participant/views.py | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/openslides/participant/templates/participant/overview.html b/openslides/participant/templates/participant/overview.html index 595f07671..409059c82 100644 --- a/openslides/participant/templates/participant/overview.html +++ b/openslides/participant/templates/participant/overview.html @@ -40,14 +40,13 @@ {%trans "First Name" %} {%trans "Last Name" %} - {%trans "Gender" %} {%trans "Group" %} - {%trans "Type" %} {%trans "Committee" %} + {% if perms.participant.can_manage_participants %} + {%trans "Type" %} {%trans "Username" %} {%trans "Email" %} {%trans "Last Login" %} - {% if perms.participant.can_manage_participants %} {%trans "Actions" %} {% endif %} @@ -55,22 +54,15 @@ {{ user.first_name }} {{ user.last_name }} - {% if "none" not in user.profile.gender %} - {% if user.profile.gender == 'male' %} - {% trans "Male" %} - {% else %} - {% trans "Female" %} - {% endif %} - {% endif %} {{ user.profile.group }} - {{ user.profile.type }} {{ user.profile.committee }} + {% if perms.participant.can_manage_participants %} + {{ user.profile.type }} {{ user.username }} {{ user.email }} {% if user.last_login > user.date_joined %} {{ user.last_login }} {% endif %} - {% if perms.participant.can_manage_participants %} {% if user.is_active %} diff --git a/openslides/participant/views.py b/openslides/participant/views.py index a9fba59b7..43dcee56c 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -46,7 +46,7 @@ def get_overview(request): sort = request.GET['sort'] if sort in ['first_name', 'last_name','username','last_login','email']: query = query.order_by(sort) - elif sort in ['gender', 'group', 'type', 'committee']: + elif sort in ['group', 'type', 'committee']: query = query.order_by('profile__%s' % sort) except KeyError: pass