mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-09 07:43:01 -06:00
afb9a3c0a9
Created a MemberDisplayInfo to hold the info needed to render a member. Changed round trip persistance to use that class. Created a single renderMemberInfo method to render the members. Changed dynamic as well as static lists to use renderMemberInfo. Lastly, render groups members in italics. Change view group to render group members in italics.
70 lines
2.0 KiB
Genshi
70 lines
2.0 KiB
Genshi
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
|
|
py:extends="'grouplayout.kid'">
|
|
<head>
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
|
|
<title>View Group</title>
|
|
</head>
|
|
<body>
|
|
<h2>View Group</h2>
|
|
|
|
<div class="formsection">Group Details</div>
|
|
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
|
<tr>
|
|
<th>
|
|
<label class="fieldlabel" py:content="fields.cn.label" />:
|
|
</th>
|
|
<td>${group.get("cn")}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th>
|
|
<label class="fieldlabel" py:content="fields.description.label" />:
|
|
</th>
|
|
<td>${group.get("description")}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th>
|
|
<label class="fieldlabel" py:content="fields.gidnumber.label" />:
|
|
</th>
|
|
<td>${group.get("gidnumber")}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div class="formsection">Group Members</div>
|
|
<div py:for="member in members">
|
|
<?python
|
|
|
|
member_uid = member.get('uid')
|
|
if member_uid:
|
|
member_cn = "%s %s" % (member.get('givenName'), member.get('sn'))
|
|
member_desc = "(%s)" % member_uid
|
|
member_type = "user"
|
|
view_url = tg.url('usershow', uid=member_uid)
|
|
else:
|
|
member_cn = "%s" % member.get('cn')
|
|
member_desc = "[group]"
|
|
member_type = "group"
|
|
view_url = tg.url('groupshow', cn=member_cn)
|
|
?>
|
|
<span py:if='member_type == "user"'>
|
|
<a href="${view_url}"
|
|
>${member_cn}</a> ${member_desc}
|
|
</span>
|
|
<span py:if='member_type == "group"'>
|
|
<i>
|
|
<a href="${view_url}"
|
|
>${member_cn}</a> ${member_desc}
|
|
</i>
|
|
</span>
|
|
</div>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
<a href="${tg.url('/groupedit', cn=group.get('cn'))}">edit</a>
|
|
|
|
</body>
|
|
</html>
|