Skip to content

Commit

Permalink
Merge branch 'release/5.5.15'
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Sep 5, 2022
2 parents 1284415 + 3a0fd8b commit ae00f6c
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 97 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 5.5.15
## 09/05/2022

1. [Common](#common)
1. [](#improved)
- Improved Twig 2/3 compatibility in the template files (#3052)
2. [](#bugfix)
- Fixed PHP 8.1 error in Twig (#3052)
3. [Joomla](#joomla)
1. [](#new)
- Added Joomla 4.2 support
3. [WordPress](#wordpress)
1. [](#new)
- Added WordPress 6 support

# 5.5.14
## 06/15/2022

Expand Down
12 changes: 8 additions & 4 deletions engines/common/nucleus/templates/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
{% endset -%}

{%- set offcanvas = null -%}
{%- for segment in segments if segment.type == 'offcanvas' %}
{%- set offcanvas = segment -%}
{%- for segment in segments %}
{% if segment.type == 'offcanvas' %}
{%- set offcanvas = segment -%}
{% endif %}
{% endfor -%}

{%- set page_offcanvas %}
Expand All @@ -28,8 +30,10 @@

{%- set page_layout %}
{% block page_layout %}
{% for segment in segments if segment.type != 'offcanvas' %}
{% include '@nucleus/layout/' ~ segment.type ~ '.html.twig' with { 'segments': segment.children } %}
{% for segment in segments %}
{% if segment.type != 'offcanvas' %}
{% include '@nucleus/layout/' ~ segment.type ~ '.html.twig' with { 'segments': segment.children } %}
{% endif %}
{% endfor %}
{% endblock %}
{% endset -%}
Expand Down
22 changes: 12 additions & 10 deletions platforms/common/templates/layouts/switcher.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,18 @@
>
{{ 'GANTRY5_PLATFORM_BASE_OUTLINE'|trans }}
</li>
{% for key,current in user_conf if key != configuration %}
{% set label=current|replace({'_': ' '})|trim|title %}
<li tabindex="0"
aria-label="{{ 'GANTRY5_PLATFORM_X_OUTLINE'|trans(label) }}"
role="button"
data-switch="{{ gantry.route('configurations/' ~ configuration ~ '/layout/switch/' ~ key) }}"
class="g-switch-configuration"
>
{{ label }}
</li>
{% for key,current in user_conf %}
{% if key != configuration %}
{% set label=current|replace({'_': ' '})|trim|title %}
<li tabindex="0"
aria-label="{{ 'GANTRY5_PLATFORM_X_OUTLINE'|trans(label) }}"
role="button"
data-switch="{{ gantry.route('configurations/' ~ configuration ~ '/layout/switch/' ~ key) }}"
class="g-switch-configuration"
>
{{ label }}
</li>
{% endif %}
{% endfor %}
</ul>

Expand Down
80 changes: 41 additions & 39 deletions platforms/common/templates/pages/configurations/page/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,55 @@
<button type="submit" class="button button-primary button-save" data-save="Page Settings">
<i class="fa fa-fw fa-check" aria-hidden="true"></i> <span>{{ 'GANTRY5_PLATFORM_SAVE_PAGESETTINGS'|trans }}</span></button>
</span>
{% for group, list in page if (group != 'hidden') %}
<h2 class="page-title">
<span class="title">{{ group|capitalize }} {{ 'GANTRY5_PLATFORM_PAGESETTINGS'|trans }}</span>
</h2>
{% for group, list in page %}
{% if group != 'hidden' %}
<h2 class="page-title">
<span class="title">{{ group|capitalize }} {{ 'GANTRY5_PLATFORM_PAGESETTINGS'|trans }}</span>
</h2>

<div class="g-filter-actions">
<div class="g-panel-filters" data-g-global-filter="">
<div class="search settings-block">
<input type="text" data-g-collapse-filter="" placeholder="{{ 'GANTRY5_PLATFORM_FILTER'|trans }} {{ group|capitalize }}..." aria-label="{{ 'GANTRY5_PLATFORM_FILTER'|trans }} {{ group|capitalize }}..." role="search" />
<i class="fa fa-fw fa-search" aria-hidden="true"></i>
<div class="g-filter-actions">
<div class="g-panel-filters" data-g-global-filter="">
<div class="search settings-block">
<input type="text" data-g-collapse-filter="" placeholder="{{ 'GANTRY5_PLATFORM_FILTER'|trans }} {{ group|capitalize }}..." aria-label="{{ 'GANTRY5_PLATFORM_FILTER'|trans }} {{ group|capitalize }}..." role="search" />
<i class="fa fa-fw fa-search" aria-hidden="true"></i>
</div>
<button class="button" type="button" data-g-collapse-all="true"><i class="far fa-fw fa-caret-square-up" aria-hidden="true"></i> {{ 'GANTRY5_PLATFORM_COLLAPSE_ALL'|trans }}</button>
<button class="button" type="button" data-g-collapse-all="false"><i class="far fa-fw fa-caret-square-down" aria-hidden="true"></i> {{ 'GANTRY5_PLATFORM_EXPAND_ALL'|trans }}</button>
</div>
<button class="button" type="button" data-g-collapse-all="true"><i class="far fa-fw fa-caret-square-up" aria-hidden="true"></i> {{ 'GANTRY5_PLATFORM_COLLAPSE_ALL'|trans }}</button>
<button class="button" type="button" data-g-collapse-all="false"><i class="far fa-fw fa-caret-square-down" aria-hidden="true"></i> {{ 'GANTRY5_PLATFORM_EXPAND_ALL'|trans }}</button>
</div>
</div>

<div class="cards-wrapper g-grid">
{% for id, particle in list %}
{% if not particle.hidden %}
{% set particle = gantry.page.getBlueprintForm(id) %}
{% set prefix = 'page.' ~ id ~ '.' %}
{% set collapsed = particle.form.collapsed or attribute(stored_data, prefix) %}
{% set labels = {collapse: 'GANTRY5_PLATFORM_COLLAPSE'|trans, expand: 'GANTRY5_PLATFORM_EXPAND'|trans} %}
<div class="card settings-block{{ collapsed ? ' g-collapsed' : '' }}">
<input type="hidden" name="page[{{ id }}]"/>
<h4 data-g-collapse="{{ labels|merge({collapsed: collapsed ? true : false, id: prefix, target: '~ .inner-params' })|json_encode|e('html_attr') }}"
data-g-collapse-id="{{ prefix }}"
{{ overrideable ? ' class="card-overrideable"' : '' }}
>
<span class="g-collapse" data-title="{{ collapsed ? labels.expand : labels.collapse }}" data-tip="{{ collapsed ? labels.expand : labels.collapse }}" data-tip-place="top-right"><i class="fa fa-fw fa-caret-up" aria-hidden="true"></i></span>
<span class="g-title">{{ particle.name }}</span>
{% if particle.form.fields.enabled %}
{% include 'forms/fields/enable/enable.html.twig' with {'default': true, 'scope': prefix, 'name': 'enabled', 'field': particle.form.fields.enabled, 'value': data.get(prefix ~ 'enabled')} %}
<div class="cards-wrapper g-grid">
{% for id, particle in list %}
{% if not particle.hidden %}
{% set particle = gantry.page.getBlueprintForm(id) %}
{% set prefix = 'page.' ~ id ~ '.' %}
{% set collapsed = particle.form.collapsed or attribute(stored_data, prefix) %}
{% set labels = {collapse: 'GANTRY5_PLATFORM_COLLAPSE'|trans, expand: 'GANTRY5_PLATFORM_EXPAND'|trans} %}
<div class="card settings-block{{ collapsed ? ' g-collapsed' : '' }}">
<input type="hidden" name="page[{{ id }}]"/>
<h4 data-g-collapse="{{ labels|merge({collapsed: collapsed ? true : false, id: prefix, target: '~ .inner-params' })|json_encode|e('html_attr') }}"
data-g-collapse-id="{{ prefix }}"
{{ overrideable ? ' class="card-overrideable"' : '' }}
>
<span class="g-collapse" data-title="{{ collapsed ? labels.expand : labels.collapse }}" data-tip="{{ collapsed ? labels.expand : labels.collapse }}" data-tip-place="top-right"><i class="fa fa-fw fa-caret-up" aria-hidden="true"></i></span>
<span class="g-title">{{ particle.name }}</span>
{% if particle.form.fields.enabled %}
{% include 'forms/fields/enable/enable.html.twig' with {'default': true, 'scope': prefix, 'name': 'enabled', 'field': particle.form.fields.enabled, 'value': data.get(prefix ~ 'enabled')} %}

{% if overrideable %}
{% include 'forms/override.html.twig' with {'scope': prefix, 'name': 'enabled', 'field': {'label': 'Enabled of the ' ~ particle.name ~ ' Particle' }} %}
{% if overrideable %}
{% include 'forms/override.html.twig' with {'scope': prefix, 'name': 'enabled', 'field': {'label': 'Enabled of the ' ~ particle.name ~ ' Particle' }} %}
{% endif %}
{% endif %}
{% endif %}
</h4>
</h4>

<div class="inner-params">
{% include 'forms/fields.html.twig' with {'ignore_not_overrideable': true, 'overrideable': overrideable, 'blueprints': particle.form, skip: ['enabled'], "prefix": prefix} %}
<div class="inner-params">
{% include 'forms/fields.html.twig' with {'ignore_not_overrideable': true, 'overrideable': overrideable, 'blueprints': particle.form, skip: ['enabled'], "prefix": prefix} %}
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}

{% include '@gantry-admin/pages/configurations/page/atoms.html.twig' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,55 @@
<button type="submit" class="button button-primary button-save" data-save="Particle Defaults">
<i class="fa fa-fw fa-check" aria-hidden="true"></i> <span>{{ 'GANTRY5_PLATFORM_SAVE_PARTICLE_DEFAULTS'|trans }}</span></button>
</span>
{% for group, list in particles if list and (group != 'hidden') %}
<h2 class="page-title">
<span class="title">{{ group|capitalize }} {{ 'GANTRY5_PLATFORM_DEFAULTS'|trans }}</span>
</h2>
{% for group, list in particles %}
{% if list and (group != 'hidden') %}
<h2 class="page-title">
<span class="title">{{ group|capitalize }} {{ 'GANTRY5_PLATFORM_DEFAULTS'|trans }}</span>
</h2>

<div class="g-filter-actions">
<div class="g-panel-filters" data-g-global-filter="">
<div class="search settings-block">
<input type="text" data-g-collapse-filter placeholder="{{ 'GANTRY5_PLATFORM_FILTER'|trans }} {{ group|capitalize }}..." aria-label="{{ 'GANTRY5_PLATFORM_FILTER'|trans }} {{ group|capitalize }}..." role="search" />
<i class="fa fa-fw fa-search" aria-hidden="true"></i>
<div class="g-filter-actions">
<div class="g-panel-filters" data-g-global-filter="">
<div class="search settings-block">
<input type="text" data-g-collapse-filter placeholder="{{ 'GANTRY5_PLATFORM_FILTER'|trans }} {{ group|capitalize }}..." aria-label="{{ 'GANTRY5_PLATFORM_FILTER'|trans }} {{ group|capitalize }}..." role="search" />
<i class="fa fa-fw fa-search" aria-hidden="true"></i>
</div>
<button class="button" type="button" data-g-collapse-all="true"><i class="far fa-fw fa-caret-square-up" aria-hidden="true"></i> {{ 'GANTRY5_PLATFORM_COLLAPSE_ALL'|trans }}</button>
<button class="button" type="button" data-g-collapse-all="false"><i class="far fa-fw fa-caret-square-down" aria-hidden="true"></i> {{ 'GANTRY5_PLATFORM_EXPAND_ALL'|trans }}</button>
</div>
<button class="button" type="button" data-g-collapse-all="true"><i class="far fa-fw fa-caret-square-up" aria-hidden="true"></i> {{ 'GANTRY5_PLATFORM_COLLAPSE_ALL'|trans }}</button>
<button class="button" type="button" data-g-collapse-all="false"><i class="far fa-fw fa-caret-square-down" aria-hidden="true"></i> {{ 'GANTRY5_PLATFORM_EXPAND_ALL'|trans }}</button>
</div>
</div>

<div class="cards-wrapper g-grid">
{% for id, particle in list %}
{% if not particle.hidden %}
{% set particle = gantry.particles.getBlueprintForm(id) %}
{% set prefix = 'particles.' ~ id ~ '.' %}
{% set collapsed = particle.form.collapsed or attribute(stored_data, prefix) %}
{% set labels = {collapse: 'GANTRY5_PLATFORM_COLLAPSE'|trans, expand: 'GANTRY5_PLATFORM_EXPAND'|trans} %}
<div class="card settings-block{{ collapsed ? ' g-collapsed' : '' }}">
<input type="hidden" name="particles[{{ id }}]"/>
<h4 data-g-collapse="{{ labels|merge({collapsed: collapsed ? true : false, id: prefix, target: '~ .inner-params' })|json_encode|e('html_attr') }}"
data-g-collapse-id="{{ prefix }}"
{{ overrideable ? ' class="card-overrideable"' : '' }}
>
<span class="g-collapse" data-title="{{ collapsed ? labels.expand : labels.collapse }}" data-tip="{{ collapsed ? labels.expand : labels.collapse }}" data-tip-place="top-right"><i class="fa fa-fw fa-caret-up" aria-hidden="true"></i></span>
<span class="g-title">{{ particle.name }}</span>
{% if particle.form.fields.enabled %}
{% include 'forms/fields/enable/enable.html.twig' with {'default': true, 'scope': prefix, 'name': 'enabled', 'field': particle.form.fields.enabled, 'value': data.get(prefix ~ 'enabled')} %}
<div class="cards-wrapper g-grid">
{% for id, particle in list %}
{% if not particle.hidden %}
{% set particle = gantry.particles.getBlueprintForm(id) %}
{% set prefix = 'particles.' ~ id ~ '.' %}
{% set collapsed = particle.form.collapsed or attribute(stored_data, prefix) %}
{% set labels = {collapse: 'GANTRY5_PLATFORM_COLLAPSE'|trans, expand: 'GANTRY5_PLATFORM_EXPAND'|trans} %}
<div class="card settings-block{{ collapsed ? ' g-collapsed' : '' }}">
<input type="hidden" name="particles[{{ id }}]"/>
<h4 data-g-collapse="{{ labels|merge({collapsed: collapsed ? true : false, id: prefix, target: '~ .inner-params' })|json_encode|e('html_attr') }}"
data-g-collapse-id="{{ prefix }}"
{{ overrideable ? ' class="card-overrideable"' : '' }}
>
<span class="g-collapse" data-title="{{ collapsed ? labels.expand : labels.collapse }}" data-tip="{{ collapsed ? labels.expand : labels.collapse }}" data-tip-place="top-right"><i class="fa fa-fw fa-caret-up" aria-hidden="true"></i></span>
<span class="g-title">{{ particle.name }}</span>
{% if particle.form.fields.enabled %}
{% include 'forms/fields/enable/enable.html.twig' with {'default': true, 'scope': prefix, 'name': 'enabled', 'field': particle.form.fields.enabled, 'value': data.get(prefix ~ 'enabled')} %}

{% if overrideable %}
{% include 'forms/override.html.twig' with {'scope': prefix, 'name': 'enabled', 'has_value': data.get(prefix ~ 'enabled') is not null, 'field': {'label': 'Enabled of the ' ~ particle.name ~ ' Particle' }} %}
{% if overrideable %}
{% include 'forms/override.html.twig' with {'scope': prefix, 'name': 'enabled', 'has_value': data.get(prefix ~ 'enabled') is not null, 'field': {'label': 'Enabled of the ' ~ particle.name ~ ' Particle' }} %}
{% endif %}
{% endif %}
{% endif %}
</h4>
</h4>

<div class="inner-params">
{% include 'forms/fields.html.twig' with {'ignore_not_overrideable': true, 'overrideable': overrideable, 'not_global_overrideable': particle.form.overrideable is same as(false), 'blueprints': particle.form, skip: ['enabled'], data: data, "prefix": prefix} %}
<div class="inner-params">
{% include 'forms/fields.html.twig' with {'ignore_not_overrideable': true, 'overrideable': overrideable, 'not_global_overrideable': particle.form.overrideable is same as(false), 'blueprints': particle.form, skip: ['enabled'], data: data, "prefix": prefix} %}
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}

<div class="g-footer-actions">
Expand Down

0 comments on commit ae00f6c

Please sign in to comment.