11
|
1 [%
|
|
2 BLOCK INIT;
|
|
3 document.css.push( app.location.css.Child('display-float.css') );
|
|
4 END;
|
|
5 labels({
|
|
6 fullNameLabel = 'Full name',
|
|
7 uidLabel = 'User ID',
|
|
8 gecosLabel = 'Description',
|
|
9 mailLabel = 'eMail',
|
|
10 givenNameLabel = 'Given name',
|
|
11 telephoneNumberLabel = 'Phone',
|
|
12 roomNumberLabel = 'Room',
|
|
13 departmentNumberLabel = 'Department',
|
|
14 RolesLabel = 'Roles'
|
|
15 });
|
|
16 %]
|
|
17 [% MACRO element(field) BLOCK %]
|
|
18 <div class="field">
|
|
19 <span class="field-name">[% ${"${field}Label"} %]</span>
|
|
20 <span class="field-value">[% display_for(field) %]</span>
|
|
21 </div>
|
|
22 [% END %]
|
|
23 <div class="float object-data">
|
|
24 [%
|
|
25 FOREACH field IN [
|
|
26 'uid',
|
|
27 'fullName'
|
|
28 ];
|
|
29 element(field) IF model.${field};
|
|
30 END;
|
|
31 %]
|
|
32 <br style="clear:both"/>
|
|
33 </div>
|
|
34 <div class="float object-data">
|
|
35 [%
|
|
36 FOREACH field IN [
|
|
37 'gecos',
|
|
38 'mail',
|
|
39 'telephoneNumber',
|
|
40 'roomNumber',
|
|
41 'departmentNumber'
|
|
42 ];
|
|
43 element(field) IF model.${field};
|
|
44 END;
|
|
45 %]
|
|
46 <br style="clear:both"/>
|
|
47 </div>
|
|
48 [% IF showRoles %]
|
|
49 <div class="float object-data">
|
|
50 [%
|
|
51 roles = [];
|
|
52 FOREACH role IN security.roles.Query(member = model).data;
|
|
53 roles.push(role.description || role.roleName);
|
|
54 END;
|
|
55 %]
|
|
56 <div class="field">
|
|
57 <span class="field-name">$RolesLabel</span>
|
|
58 <span class="field-value">[% roles.join(', ')%]</span>
|
|
59 </div>
|
|
60 <br style="clear:both"/>
|
|
61 </div>
|
|
62 [% END %]
|
|
63 <div class="align-right comment">
|
|
64 <small>LDAP record</small>
|
|
65 </div>
|