Mercurial > pub > site.implab
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/shared_view/includes/templates/User.tt Thu May 15 18:24:02 2014 +0400 @@ -0,0 +1,65 @@ +[% + BLOCK INIT; + document.css.push( app.location.css.Child('display-float.css') ); + END; + labels({ + fullNameLabel = 'Full name', + uidLabel = 'User ID', + gecosLabel = 'Description', + mailLabel = 'eMail', + givenNameLabel = 'Given name', + telephoneNumberLabel = 'Phone', + roomNumberLabel = 'Room', + departmentNumberLabel = 'Department', + RolesLabel = 'Roles' + }); +%] +[% MACRO element(field) BLOCK %] + <div class="field"> + <span class="field-name">[% ${"${field}Label"} %]</span> + <span class="field-value">[% display_for(field) %]</span> + </div> +[% END %] +<div class="float object-data"> + [% + FOREACH field IN [ + 'uid', + 'fullName' + ]; + element(field) IF model.${field}; + END; + %] + <br style="clear:both"/> +</div> +<div class="float object-data"> + [% + FOREACH field IN [ + 'gecos', + 'mail', + 'telephoneNumber', + 'roomNumber', + 'departmentNumber' + ]; + element(field) IF model.${field}; + END; + %] + <br style="clear:both"/> +</div> +[% IF showRoles %] + <div class="float object-data"> + [% + roles = []; + FOREACH role IN security.roles.Query(member = model).data; + roles.push(role.description || role.roleName); + END; + %] + <div class="field"> + <span class="field-name">$RolesLabel</span> + <span class="field-value">[% roles.join(', ')%]</span> + </div> + <br style="clear:both"/> + </div> +[% END %] +<div class="align-right comment"> + <small>LDAP record</small> +</div>