annotate shared_view/includes/templates/User.tt @ 11:573272ec604b

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