From 38fc9ce28448de4cf8068429a4e01c716f9cfc8b Mon Sep 17 00:00:00 2001 From: stefanorosanelli Date: Thu, 6 Jul 2023 10:15:00 +0200 Subject: [PATCH] chore: avoid empty view groups --- templates/Element/Form/other_properties.twig | 24 ++++---------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/templates/Element/Form/other_properties.twig b/templates/Element/Form/other_properties.twig index 181fe6718..ca052f6e8 100644 --- a/templates/Element/Form/other_properties.twig +++ b/templates/Element/Form/other_properties.twig @@ -1,26 +1,9 @@ {# Remaining properties groups: 'other' and custom groups not in 'core', '_keep', 'publish', 'advanced' #} {% set otherProperties = Array.removeKeys(properties, ['core', '_keep', 'publish', 'advanced']) %} {% for group, props in otherProperties %} - {% if props %} - - -
-
-

{{ Layout.tr(group) }}

-
- -
- - {{ element('Form/group_properties', {'properties' : props, 'group': group}) }} - -
-
- -
- {% else %} + {% set customElement = Element.custom(group, 'group') %} + {% if props or customElement %} @@ -33,9 +16,10 @@
- {% set customElement = Element.custom(group, 'group') %} {% if customElement %} {{ element(customElement) }} + {% else %} + {{ element('Form/group_properties', {'properties' : props, 'group': group}) }} {% endif %}