Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.3' into 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubitz committed Jan 17, 2025
2 parents 7476324 + 3028ea8 commit 632df3e
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 109 deletions.
12 changes: 6 additions & 6 deletions Neos.Media.Browser/Resources/Public/JavaScript/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,25 @@ window.addEventListener('DOMContentLoaded', () => {
const assets = document.querySelectorAll('[data-asset-identifier]');
assets.forEach((asset) => {
asset.addEventListener('click', (e) => {
const assetLink = e.target.closest('a[data-asset-identifier], button[data-asset-identifier]');
if (!assetLink) {
if(e.target.closest('.neos-action')) {
return;
}
const assetLink = e.currentTarget;

const localAssetIdentifier = asset.dataset.localAssetIdentifier;
const localAssetIdentifier = assetLink.dataset.localAssetIdentifier;
if (localAssetIdentifier !== '' && !NeosCMS.Helper.isNil(localAssetIdentifier)) {
NeosMediaBrowserCallbacks.assetChosen(localAssetIdentifier);
} else {
if (asset.dataset.importInProcess !== 'true') {
asset.dataset.importInProcess = 'true';
if (assetLink.dataset.importInProcess !== 'true') {
assetLink.dataset.importInProcess = 'true';
const message = NeosCMS.I18n.translate(
'assetImport.importInfo',
'Asset is being imported. Please wait.',
'Neos.Media.Browser'
);
NeosCMS.Notification.ok(message);

importAsset(asset);
importAsset(assetLink);
} else {
const message = NeosCMS.I18n.translate(
'assetImport.importInProcess',
Expand Down
8 changes: 4 additions & 4 deletions Neos.Neos/Documentation/References/NodeTypeDefinition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NodeType Definition Reference
=============================

THe manual to understand NodeType definitions can be found in the Neos Docs (https://docs.neos.io/cms/manual/content-repository/nodetype-definition).
The manual to understand NodeType definitions can be found in the Neos Docs (https://docs.neos.io/cms/manual/content-repository/nodetype-definition).

The following options are allowed for defining a NodeType:

Expand Down Expand Up @@ -55,7 +55,7 @@ The following options are allowed for defining a NodeType:
Here is an example::

childNodes:
someChild:
'some-child':
type: 'Neos.Neos:ContentCollection'
constraints:
nodeTypes:
Expand All @@ -68,11 +68,11 @@ The following options are allowed for defining a NodeType:

'Neos.NodeTypes:Page':
childNodes:
'someChild':
'some-child':
type: 'Neos.Neos:ContentCollection'
position: 'before main'

This adds a new ContentCollection called someChild to the default page.
This adds a new ContentCollection called ``some-child`` to the default page.
It will be positioned before the main ContentCollection that the default page has.
The position setting follows the same sorting logic used in Fusion
(see the :ref:`neos-fusion-reference`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="neos-control-group">
<label class="neos-control-label">{neos:backend.translate(source: 'Modules', id: 'users.username')}</label>
<div class="neos-controls">
<span class="neos-span12 neos-uneditable-input" title="{neos:backend.translate(source: 'Modules', id: 'users.usernameCannotBeChanged')}">{account.accountIdentifier}</span>
<span class="neos-span12 neos-uneditable-input" title="{neos:backend.translate(source: 'Modules', id: 'users.usernameCannotBeChanged')}">{account.accountIdentifier}</span>
</div>
</div>

Expand All @@ -28,83 +28,7 @@

<f:if condition="{showRoles}">
<fieldset class="neos-span6">
<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: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)}"/>
<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:render partial="Module/Shared/RolesSelection" arguments="{availableRoles: availableRoles, account: account}" />
</fieldset>
</f:if>
</div>

<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>
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>
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,17 @@ <h2>{neos:backend.translate(id: 'user.new.subtitle', value: 'Create a new user',
<f:render partial="Module/Shared/FieldValidationResults" arguments="{fieldname: 'password'}"/>
</div>
</div>
<f:if condition="{providers -> f:count()} > 1">
<f:then>
<div class="neos-control-group{f:validation.ifHasErrors(for: 'authenticationProviderName', then: ' neos-error')}">
<label class="neos-control-label" for="authenticationProviderName">{neos:backend.translate(id: 'users.new.userData.authenticationProviderName', value: 'Authentication Provider', source: 'Modules', package: 'Neos.Neos')}</label>
<div class="neos-controls">
<f:form.select name="authenticationProviderName" id="authenticationProviderName" options="{providers}" optionLabelField="label" optionValueField="identifier" prependOptionLabel="{neos:backend.translate(id: 'users.new.userData.authenticationProviderName.useDefault', source: 'Modules', value: 'Use system default')}" prependOptionValue="" class="neos-span12" />
<f:render partial="Module/Shared/FieldValidationResults" arguments="{fieldname: 'authenticationProviderName'}"/>
</div>
</div>
</f:then>
</f:if>
<div class="neos-control-group">
<label class="neos-control-label">{neos:backend.translate(id: 'users.new.userData.roles', value: 'Role(s)', source: 'Modules', package: 'Neos.Neos')}</label>
<f:for each="{roles}" as="role" iteration="rolesIteration">
<div class="neos-controls">
<label for="roles-{rolesIteration.cycle}" class="neos-checkbox" title="{role.packageKey}" data-neos-toggle="tooltip" data-placement="right">
<f:form.checkbox name="roleIdentifiers" multiple="true" value="{role.identifier}" id="roles-{rolesIteration.cycle}" /><span></span>
{f:if(condition: role.label, then: role.label, else: role.name)}
</label>
<f:if condition="{providers -> f:count()} > 1">
<f:then>
<div class="neos-control-group{f:validation.ifHasErrors(for: 'authenticationProviderName', then: ' neos-error')}">
<label class="neos-control-label" for="authenticationProviderName">{neos:backend.translate(id: 'users.new.userData.authenticationProviderName', value: 'Authentication Provider', source: 'Modules', package: 'Neos.Neos')}</label>
<div class="neos-controls">
<f:form.select name="authenticationProviderName" id="authenticationProviderName" options="{providers}" optionLabelField="label" optionValueField="identifier" prependOptionLabel="{neos:backend.translate(id: 'users.new.userData.authenticationProviderName.useDefault', source: 'Modules', value: 'Use system default')}" prependOptionValue="" class="neos-span12" />
<f:render partial="Module/Shared/FieldValidationResults" arguments="{fieldname: 'authenticationProviderName'}"/>
</div>
</div>
</f:for>
</div>
</f:then>
</f:if>
</fieldset>

<fieldset class="neos-span5 neos-offset1">
Expand Down Expand Up @@ -86,6 +75,11 @@ <h2>{neos:backend.translate(id: 'user.new.subtitle', value: 'Create a new user',
</div>
</fieldset>
</div>
<div class="neos-row-fluid">
<fieldset class="neos-span12">
<f:render partial="Module/Shared/RolesSelection" arguments="{availableRoles: roles, account: null}" />
</fieldset>
</div>
<div class="neos-footer">
<f:link.action action="index" class="neos-button">{neos:backend.translate(id: 'cancel', value: 'Cancel', source: 'Modules', package: 'Neos.Neos')}</f:link.action>
<f:form.submit value="{neos:backend.translate(id: 'users.new.createButton', value: 'Create user', source: 'Modules', package: 'Neos.Neos')}" class="neos-button neos-button-primary" />
Expand Down

0 comments on commit 632df3e

Please sign in to comment.