From f8a9d2021af4bb0920cd86d565c1ab720ea4b691 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Wed, 17 Oct 2007 13:42:45 -0700 Subject: [PATCH] Sort users by last name. Make labeleduri a link. --- ipa-server/ipa-gui/ipagui/subcontrollers/ipacontroller.py | 8 ++++---- ipa-server/ipa-gui/ipagui/templates/usershow.kid | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ipa-server/ipa-gui/ipagui/subcontrollers/ipacontroller.py b/ipa-server/ipa-gui/ipagui/subcontrollers/ipacontroller.py index e003ab96d..425df0074 100644 --- a/ipa-server/ipa-gui/ipagui/subcontrollers/ipacontroller.py +++ b/ipa-server/ipa-gui/ipagui/subcontrollers/ipacontroller.py @@ -32,19 +32,19 @@ class IPAController(controllers.Controller): def sort_group_member(self, a, b): """Comparator function used for sorting group members.""" if a.getValue('uid') and b.getValue('uid'): - if a.getValue('givenname') == b.getValue('givenname'): - if a.getValue('sn') == b.getValue('sn'): + if a.getValue('sn') == b.getValue('sn'): + if a.getValue('givenName') == b.getValue('givenName'): if a.getValue('uid') == b.getValue('uid'): return 0 elif a.getValue('uid') < b.getValue('uid'): return -1 else: return 1 - elif a.getValue('sn') < b.getValue('sn'): + elif a.getValue('givenName') < b.getValue('givenName'): return -1 else: return 1 - elif a.getValue('givenname') < b.getValue('givenname'): + elif a.getValue('sn') < b.getValue('sn'): return -1 else: return 1 diff --git a/ipa-server/ipa-gui/ipagui/templates/usershow.kid b/ipa-server/ipa-gui/ipagui/templates/usershow.kid index 319567384..9220b9747 100644 --- a/ipa-server/ipa-gui/ipagui/templates/usershow.kid +++ b/ipa-server/ipa-gui/ipagui/templates/usershow.kid @@ -248,7 +248,9 @@ else: