From 526fc996c891578a17ac92405985346515260e43 Mon Sep 17 00:00:00 2001 From: Jakub Brzegowski Date: Tue, 13 Feb 2024 13:09:47 +0100 Subject: [PATCH] IBX-7773: Fixed Sub-items sorting order form vertical alignment (#1167) * IBX-7773: Fix Sub-items sorting order form vertical alignment (content details tab) * UI fixes * dropdown fix --- .../Resources/public/scss/_dropdown.scss | 4 +++ .../admin/content/tab/details.html.twig | 32 +++++++++++++++---- .../ui/component/dropdown/dropdown.html.twig | 2 +- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/bundle/Resources/public/scss/_dropdown.scss b/src/bundle/Resources/public/scss/_dropdown.scss index 3fc9885aaa..685d65d276 100644 --- a/src/bundle/Resources/public/scss/_dropdown.scss +++ b/src/bundle/Resources/public/scss/_dropdown.scss @@ -203,6 +203,10 @@ font-weight: 400; line-height: calculateRem(18px); padding: calculateRem(12px) calculateRem(16px) 0; + + &:empty { + padding: 0; + } } &__items-list { diff --git a/src/bundle/Resources/views/themes/admin/content/tab/details.html.twig b/src/bundle/Resources/views/themes/admin/content/tab/details.html.twig index 28a7a5f82f..1833416925 100644 --- a/src/bundle/Resources/views/themes/admin/content/tab/details.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/tab/details.html.twig @@ -137,13 +137,31 @@ 'method': 'POST', 'action': path('ibexa.location.update'), 'attr': {'class': 'form-inline ibexa-form-inline justify-content-start'} - }) }} - - {{ form_label(form_location_update.sort_field, 'tab.details.sub_items_listing_by.order_by'|trans|desc('Order by')) }} - {{ form_widget(form_location_update.sort_field, { 'attr': {'class': 'ibexa-form-autosubmit ml-2'} }) }} - - {{ form_label(form_location_update.sort_order, 'tab.details.sub_items_listing_by.in'|trans|desc('in')) }} - {{ form_widget(form_location_update.sort_order, { 'attr': {'class': 'ibexa-form-autosubmit ml-2'} }) }} + }) }} + +
+ {{ form_label( + form_location_update.sort_field, + 'tab.details.sub_items_listing_by.order_by'|trans|desc('Order by'), + { label_attr: { class: 'mb-0 mt-3' } }, + ) }} + {{ form_widget( + form_location_update.sort_field, + { attr: { class: 'ibexa-form-autosubmit', dropdown_class: 'ms-0', is_small: true }} + ) }} +
+ +
+ {{ form_label( + form_location_update.sort_order, + 'tab.details.sub_items_listing_by.in'|trans|desc('in'), + { label_attr: { class: 'mb-0 mt-3' } }, + ) }} + {{ form_widget( + form_location_update.sort_order, + { attr: { class: ' ibexa-form-autosubmit', dropdown_class: 'ms-0', is_small: true } } + ) }} +
{% do form_location_update.update.setRendered() %} {{ form_end(form_location_update) }} diff --git a/src/bundle/Resources/views/themes/admin/ui/component/dropdown/dropdown.html.twig b/src/bundle/Resources/views/themes/admin/ui/component/dropdown/dropdown.html.twig index abac130716..6ed7168765 100644 --- a/src/bundle/Resources/views/themes/admin/ui/component/dropdown/dropdown.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/component/dropdown/dropdown.html.twig @@ -126,7 +126,7 @@ {% block items_list_header %} {% if items_list_header is defined %}
- {{ items_list_header }} + {{- items_list_header -}}
{% endif %} {% endblock items_list_header %}