Skip to content
Snippets Groups Projects
Commit bf7b134e authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

return to template-based profiles definitions

This make adding new profiles easier. In addition, CSV output is now
generated through a template, making Text::CSV usage obsolete.
parent 067ca53a
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@
<div class="accounts row">
[% FOREACH account IN accounts %]
[% template = account.profile() _ '.tt2' %]
[% PROCESS $template scope=account.scope() id=account.id() | trim %]
<div class="small-12 medium-6 large-4 columns">
<div class="account">
<table>
......@@ -31,7 +33,7 @@
<tr>
<td colspan="2">
<strong>[% lh.maketext("comment:") %]</strong>
<div class="comment">[% lh.maketext(account.comment()) %]</div>
<div class="comment">[% lh.maketext(description) %]</div>
</td>
</tr>
<tr>
......@@ -56,12 +58,12 @@
<caption>[% lh.maketext("List of user attributes") %]</caption>
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName' ] %]
<tr>
<th>[% attribute %]</th><td>[% account.$attribute() %]</td>
<th>[% attribute %]</th><td>[% attributes.$attribute %]</td>
</tr>
[% END %]
[% FOREACH attribute IN [ 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
<tr>
<th>[% attribute %]</th><td>[% account.$attribute().join(', ') %]</td>
<th>[% attribute %]</th><td>[% attributes.$attribute.join(', ') %]</td>
</tr>
[% END %]
<tr>
......
......@@ -18,6 +18,8 @@
<div class="accounts row">
[% FOREACH account IN accounts %]
[% template = account.profile() _ '.tt2' %]
[% PROCESS $template scope=account.scope() id=account.id() | trim %]
<div class="small-12 medium-6 large-4 columns">
<div class="account">
<table>
......@@ -33,7 +35,7 @@
<tr>
<td colspan="2">
<strong>[% lh.maketext("comment:") %]</strong>
<div class="comment">[% lh.maketext(account.comment()) %]</div>
<div class="comment">[% lh.maketext(description) %]</div>
</td>
</tr>
<tr>
......@@ -58,12 +60,12 @@
<caption>[% lh.maketext("List of user attributes") %]</caption>
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName' ] %]
<tr>
<th>[% attribute %]</th><td>[% account.$attribute() %]</td>
<th>[% attribute %]</th><td>[% attributes.$attribute %]</td>
</tr>
[% END %]
[% FOREACH attribute IN [ 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
<tr>
<th>[% attribute %]</th><td>[% account.$attribute().join(', ') %]</td>
<th>[% attribute %]</th><td>[% attributes.$attribute.join(', ') %]</td>
</tr>
[% END %]
<tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment