[Freeipa-devel] [PATCH] sort by last name. uri attribute link.
Kevin McCarthy
kmccarth at redhat.com
Wed Oct 17 20:45:34 UTC 2007
One more "micro-patch".
This patch changes the sort order for people to be by last name.
It also make the labeleduri a link on the urishow page.
-Kevin
-------------- next part --------------
# HG changeset patch
# User Kevin McCarthy <kmccarth at redhat.com>
# Date 1192653765 25200
# Node ID 759e9e1eaa5b8e3b848a186e64c9f4d96605d693
# Parent 8985d3968184535bd1fedab77ac9e09910efc94d
Sort users by last name. Make labeleduri a link.
diff -r 8985d3968184 -r 759e9e1eaa5b ipa-server/ipa-gui/ipagui/subcontrollers/ipacontroller.py
--- a/ipa-server/ipa-gui/ipagui/subcontrollers/ipacontroller.py Wed Oct 17 13:12:43 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/subcontrollers/ipacontroller.py Wed Oct 17 13:42:45 2007 -0700
@@ -32,19 +32,19 @@ class IPAController(controllers.Controll
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 -r 8985d3968184 -r 759e9e1eaa5b ipa-server/ipa-gui/ipagui/templates/usershow.kid
--- a/ipa-server/ipa-gui/ipagui/templates/usershow.kid Wed Oct 17 13:12:43 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/usershow.kid Wed Oct 17 13:42:45 2007 -0700
@@ -248,7 +248,9 @@ else:
<th>
<label class="fieldlabel" py:content="fields.labeleduri.label" />:
</th>
- <td>${user.get("labeleduri")}</td>
+ <td>
+ <a href="${user.get('labeleduri')}">${user.get('labeleduri')}</a>
+ </td>
</tr>
</table>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4054 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20071017/cff017d1/attachment.bin>
More information about the Freeipa-devel
mailing list