mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 18:01:23 -06:00
Sort users by last name. Make labeleduri a link.
This commit is contained in:
parent
0b2b499e42
commit
f8a9d2021a
@ -32,19 +32,19 @@ class IPAController(controllers.Controller):
|
|||||||
def sort_group_member(self, a, b):
|
def sort_group_member(self, a, b):
|
||||||
"""Comparator function used for sorting group members."""
|
"""Comparator function used for sorting group members."""
|
||||||
if a.getValue('uid') and b.getValue('uid'):
|
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'):
|
if a.getValue('uid') == b.getValue('uid'):
|
||||||
return 0
|
return 0
|
||||||
elif a.getValue('uid') < b.getValue('uid'):
|
elif a.getValue('uid') < b.getValue('uid'):
|
||||||
return -1
|
return -1
|
||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
elif a.getValue('sn') < b.getValue('sn'):
|
elif a.getValue('givenName') < b.getValue('givenName'):
|
||||||
return -1
|
return -1
|
||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
elif a.getValue('givenname') < b.getValue('givenname'):
|
elif a.getValue('sn') < b.getValue('sn'):
|
||||||
return -1
|
return -1
|
||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
|
@ -248,7 +248,9 @@ else:
|
|||||||
<th>
|
<th>
|
||||||
<label class="fieldlabel" py:content="fields.labeleduri.label" />:
|
<label class="fieldlabel" py:content="fields.labeleduri.label" />:
|
||||||
</th>
|
</th>
|
||||||
<td>${user.get("labeleduri")}</td>
|
<td>
|
||||||
|
<a href="${user.get('labeleduri')}">${user.get('labeleduri')}</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user