-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/8.3' into 8.4
- Loading branch information
Showing
5 changed files
with
112 additions
and
109 deletions.
There are no files selected for viewing
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
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
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
85 changes: 85 additions & 0 deletions
85
Neos.Neos/Resources/Private/Partials/Module/Shared/RolesSelection.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{namespace neos=Neos\Neos\ViewHelpers} | ||
<legend class="neos-control-label">{neos:backend.translate(source: 'Modules', id: 'users.roles')}</legend> | ||
<table class="neos-table" data-neos-expandable="dropdown-group"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th>Label</th> | ||
<th>Description</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<f:for each="{availableRoles}" as="role" iteration="rolesIteration"> | ||
<tr> | ||
<td> | ||
<div class="neos-controls"> | ||
<label for="roles-{rolesIteration.cycle}" class="neos-checkbox" title="{role.identifier}" data-neos-toggle="tooltip" data-placement="right"> | ||
<f:if condition="{account}"> | ||
<f:then> | ||
<f:form.checkbox name="roleIdentifiers" multiple="true" value="{role.identifier}" id="roles-{rolesIteration.cycle}" checked="{f:security.ifHasRole(role: role, account: account, then: true, else: false)}"/> | ||
</f:then> | ||
<f:else> | ||
<f:form.checkbox name="roleIdentifiers" multiple="true" value="{role.identifier}" id="roles-{rolesIteration.cycle}"/> | ||
</f:else> | ||
</f:if> | ||
<span></span> | ||
</label> | ||
</div> | ||
</td> | ||
<td> | ||
<div class="neos-controls"> | ||
<label for="roles-{rolesIteration.cycle}" class="neos-checkbox" title="{role.identifier}" data-neos-toggle="tooltip" data-placement="right"> | ||
{role.label} | ||
</label> | ||
</div> | ||
</td> | ||
<td> | ||
<label for="roles-{rolesIteration.cycle}" class="neos-checkbox" title="{role.label}" data-neos-toggle="tooltip" data-placement="right">{role.description}</label> | ||
</td> | ||
<td class="neos-action"> | ||
<div class="neos-pull-right"> | ||
<button data-neos-toggle="tooltip" title="{role.identifier}" class="neos-button neos-dropdown-trigger" aria-controls="neos-dropdown-content-{rolesIteration.cycle}" aria-expanded="false"> | ||
<i class="fas fa-info-circle icon-white"></i> | ||
</button> | ||
</div> | ||
</td> | ||
</tr> | ||
<tr id="neos-dropdown-content-{rolesIteration.cycle}" class="neos-dropdown-content" hidden="true"> | ||
<td></td> | ||
<td colspan="2"> | ||
<h2>{neos:backend.translate(source: 'Modules', id: 'users.roles.directlyAssignedPrivileges')}</h2> | ||
<ul> | ||
<f:render section="privileges" arguments="{role:role}"/> | ||
<f:render section="parentRoles" arguments="{role:role}"/> | ||
</ul> | ||
</td> | ||
<td></td> | ||
</tr> | ||
</f:for> | ||
</tbody> | ||
</table> | ||
|
||
<f:section name="parentRoles"> | ||
<f:for each="{role.allParentRoles}" as="role"> | ||
<f:if condition="{role.privileges->f:count()} > 0"> | ||
<h2><neos:backend.translate id="users.roles.fromParentRole" arguments="{role:role.label}" source="Modules" package="Neos.Neos"/></h2> | ||
<f:render section="privileges" arguments="{role:role}"/> | ||
</f:if> | ||
</f:for> | ||
</f:section> | ||
|
||
<f:section name="privileges"> | ||
<f:for each="{role.privileges}" as="privilege"> | ||
<li> | ||
<label> | ||
<f:switch expression="{privilege.permission}"> | ||
<f:case value="grant"><span class="neos-badge neos-badge-success">Grant</span></f:case> | ||
<f:case value="deny"><span class="neos-badge neos-badge-important">Denied</span></f:case> | ||
<f:case value="abstain"><span class="neos-badge neos-badge-inverse">Abstain</span></f:case> | ||
</f:switch> | ||
{privilege.privilegeTarget.label} | ||
</label> | ||
</li> | ||
</f:for> | ||
</f:section> |
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