Mercurial > pub > site.implab
view shared_view/includes/templates/User.tt @ 13:a9ce584a7f3b
test for mercurial repositories
author | sergey |
---|---|
date | Mon, 19 May 2014 04:34:28 +0400 |
parents | d9551c7e7101 |
children |
line wrap: on
line source
[% BLOCK INIT; document.css.push( css.Child('display-float') ); 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>