Created
December 5, 2013 07:47
-
-
Save riscos/7801616 to your computer and use it in GitHub Desktop.
My partial for creatinga list of roles by account that a user has.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{namespace ro=Vendor\Package\ViewHelpers} | |
<section id="tab-user-2" class="tabPane"> | |
<div class="fieldContainer"> | |
<div class="accounts"> | |
<f:for each="{user.accounts}" as="account"> | |
<div class="account"> | |
<p class="fieldRowLabel">{account.accountIdentifier}</p> | |
<div class="rolesContainer"> | |
<table class="roles" cellspacing="0"> | |
<tbody> | |
<f:for each="{roles}" as="role"> | |
<tr> | |
<td class="labelCheckbox"> | |
<span class="checkboxBox checkboxBox-icons"> | |
<f:if condition="{ro:account.hasRole(account: account, role: role)}"> | |
<f:then> | |
<f:form.checkbox property="account.roles" class="hiddenInput formField" checked="1" value="{role -> f:format.identifier()}" /> | |
<span class="checkbox selected"><span> </span></span> | |
</f:then> | |
<f:else> | |
<f:form.checkbox property="accounts.roles" class="hiddenInput formField" value="{role -> f:format.identifier()}" /> | |
<span class="checkbox"><span> </span></span> | |
</f:else> | |
</f:if> | |
</span><!-- /checkboxBox --> | |
</td> | |
<td class="label">{role.name}</td> | |
</tr> | |
</f:for> | |
</tbody> | |
</table> | |
</div> | |
</div> | |
</f:for> | |
</div> | |
</div><!-- /fieldContainer --> | |
</section><!-- /tab-user-2 --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment