Skip to content

Commit

Permalink
Merge branch '5.x' into fix/zwsp_in_xliff
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 authored Oct 7, 2024
2 parents 6b54c66 + 831f14a commit 2e33aa2
Show file tree
Hide file tree
Showing 104 changed files with 1,670 additions and 1,217 deletions.
56 changes: 28 additions & 28 deletions EMS/admin-ui-bundle/composer.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"name" : "elasticms/admin-ui-bundle",
"description" : "Admin ui bundle for elasticms",
"type" : "symfony-bundle",
"keywords" : [
"elasticms",
"admin",
"ui"
],
"license" : "MIT",
"authors" : [
{
"name" : "EMS Community",
"homepage" : "https://github.com/ems-project/EMSAdminUIBundle/contributors"
}
],
"require" : {
"php": "^8.1",
"elasticms/core-bundle": "5.21.*"
},
"autoload" : {
"psr-4" : {
"EMS\\AdminUIBundle\\" : "src/"
}
},
"config": {
"lock": false,
"sort-packages": true
}
"name": "elasticms/admin-ui-bundle",
"description": "Admin ui bundle for elasticms",
"type": "symfony-bundle",
"keywords": [
"elasticms",
"admin",
"ui"
],
"license": "MIT",
"authors": [
{
"name": "EMS Community",
"homepage": "https://github.com/ems-project/EMSAdminUIBundle/contributors"
}
],
"require": {
"php": "^8.1",
"elasticms/core-bundle": "5.21.*"
},
"autoload": {
"psr-4": {
"EMS\\AdminUIBundle\\": "src/"
}
},
"config": {
"lock": false,
"sort-packages": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@
{% set values = [locale]|merge(values|filter(v => v != locale)) %}
{% endif %}

{% if dataField.fieldType.displayOptions.localePreferredFirst|default(false) and app.user.localePreferred|default(false) and app.user.localePreferred in values %}
{% set values = values|sort((a, b) => a == app.user.localePreferred ? -1 : b == app.user.localePreferred ? 1 : 0) %}
{% if dataField.fieldType.displayOptions.localePreferredFirst|default(false) and app.user.language in values %}
{% set values = values|sort((a, b) => a == app.user.language ? -1 : b == app.user.language ? 1 : 0) %}
{% endif %}

<div class="nav-tabs-custom">
Expand Down Expand Up @@ -471,16 +471,23 @@
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
{% set counter = 1 %}
{% for child in dataField.getChildren|filter(child => not child.fieldType.deleted) %}

{% set tabs = dataField.getChildren|filter(child => not child.fieldType.deleted) %}
{% set tabsLocalePreferredFirst = dataField.fieldType.displayOptions.localePreferredFirst|default(false) %}
{% if tabsLocalePreferredFirst and app.user.language in tabs|keys %}
{% set tabs = tabs|sort((a, b) => a.fieldType.name == app.user.language ? -1 : b.fieldType.name == app.user.language ? 1 : 0) %}
{% endif %}

{% for child in tabs %}
{% if 'EMS\\CoreBundle\\Form\\DataField\\MultiplexedTabContainerFieldType' == child.fieldType.type|default(null) %}
{% set labels = child.fieldType.displayOptions.labels|default('')|replace({"\r":''})|split('\n') %}
{% set values = child.fieldType.displayOptions.values|default('')|replace({"\r":''})|split('\n')%}
{% set choices = [] %}
{% for value in values %}
{% set choices = choices|merge({(value): attribute(labels, loop.index0)|default(value)}) %}
{% endfor %}
{% if child.fieldType.displayOptions.localePreferredFirst|default(false) and app.user.localePreferred|default(false) and app.user.localePreferred in values %}
{% set values = values|sort((a, b) => a == app.user.localePreferred ? -1 : b == app.user.localePreferred ? 1 : 0) %}
{% if child.fieldType.displayOptions.localePreferredFirst|default(false) and app.user.language in values %}
{% set values = values|sort((a, b) => a == app.user.language ? -1 : b == app.user.language ? 1 : 0) %}
{% endif %}

{% for value in values %}
Expand Down Expand Up @@ -511,7 +518,7 @@
</ul>
<div class="tab-content">
{% set counter = 1 %}
{% for child in dataField.getChildren|filter(child => not child.fieldType.deleted) %}
{% for child in tabs %}
{% if 'EMS\\CoreBundle\\Form\\DataField\\MultiplexedTabContainerFieldType' == child.fieldType.type|default(null) %}
{% for key, item in child.getChildren %}
{% with {
Expand Down Expand Up @@ -725,7 +732,10 @@
{% set displayOptions = dataField.fieldType.displayOptions %}
{% set iframeUrl = path('emsco_wysiwyg_styleset_iframe', {
'name': displayOptions.styles_set|default('default'),
'language': displayOptions.language|default('en'),
'language': dataField.formOptions.locale|default('en'),
'emsLink': dataField.formOptions.referredEmsId|default(null),
'field': dataField.fieldType.name,
'fieldPath': dataField.fieldType.path
}) %}
<iframe src="{{ iframeUrl }}" class="styleset-preview panel-body" data-iframe-body="{{ panelBody|e('html_attr') }}"></iframe>
{% else %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
{% endif %}
{% endapply %}
</head>
<body class="wysiwyg-preview">
<body class="wysiwyg-preview"
data-field="{{ field }}"
data-field-path="{{ fieldPath|e('html_attr') }}"
{% if emsLink %}data-document-url="{{ path('emsco_interface_document_get', { interface: 'json', name: emsLink.contentType, ouuid: emsLink.ouuid }) }}"{% endif %} >
{% if null != styleSet.contentJs %}
<script src="{{ asset(styleSet.contentJs, styleSet.saveDir == null ? 'emsch' : null) }}"></script>
{% endif %}
Expand Down
98 changes: 49 additions & 49 deletions EMS/client-helper-bundle/composer.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
{
"name" : "elasticms/client-helper-bundle",
"description" : "An elasticms extension for client helper functions (Graphical frontend, API, ... )",
"type" : "symfony-bundle",
"keywords" : [
"elasticms"
],
"license" : "MIT",
"authors" : [
{
"name" : "EMS Community",
"homepage" : "https://github.com/ems-project/EMSClientHelperBundle/contributors"
}
],
"require" : {
"php": "^8.1",
"composer/ca-bundle": "^1.1",
"elasticms/common-bundle": "5.21.*",
"onelogin/php-saml": "^4.1",
"stevenmaguire/oauth2-keycloak": "^5.1",
"symfony-cmf/routing": "^2.3",
"symfony/asset": "^5.4",
"symfony/console": "^5.4",
"symfony/event-dispatcher": "^5.4",
"symfony/mime": "^5.4",
"symfony/security-bundle": "^5.4",
"symfony/security-csrf": "^5.4",
"symfony/twig-bundle": "^5.4",
"symfony/yaml": "^5.4"
},
"require-dev" : {
"symfony/test-pack": "^1.0"
},
"autoload" : {
"psr-4" : {
"EMS\\ClientHelperBundle\\" : "src/"
}
},
"autoload-dev" : {
"psr-4" : {
"EMS\\ClientHelperBundle\\Tests\\" : "tests/"
}
},
"config": {
"lock": false,
"sort-packages": true
},
"scripts": {
"phpunit": "phpunit"
}
"name": "elasticms/client-helper-bundle",
"description": "An elasticms extension for client helper functions (Graphical frontend, API, ... )",
"type": "symfony-bundle",
"keywords": [
"elasticms"
],
"license": "MIT",
"authors": [
{
"name": "EMS Community",
"homepage": "https://github.com/ems-project/EMSClientHelperBundle/contributors"
}
],
"require": {
"php": "^8.1",
"composer/ca-bundle": "^1.1",
"elasticms/common-bundle": "5.21.*",
"onelogin/php-saml": "^4.1",
"stevenmaguire/oauth2-keycloak": "^5.1",
"symfony-cmf/routing": "^2.3",
"symfony/asset": "^5.4",
"symfony/console": "^5.4",
"symfony/event-dispatcher": "^5.4",
"symfony/mime": "^5.4",
"symfony/security-bundle": "^5.4",
"symfony/security-csrf": "^5.4",
"symfony/twig-bundle": "^5.4",
"symfony/yaml": "^5.4"
},
"require-dev": {
"symfony/test-pack": "^1.0"
},
"autoload": {
"psr-4": {
"EMS\\ClientHelperBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"EMS\\ClientHelperBundle\\Tests\\": "tests/"
}
},
"config": {
"lock": false,
"sort-packages": true
},
"scripts": {
"phpunit": "phpunit"
}
}
Loading

0 comments on commit 2e33aa2

Please sign in to comment.