From faffdfb95ded84cd8da50bda028e60410d1ded4f Mon Sep 17 00:00:00 2001 From: Thibeau Fuhrer Date: Wed, 5 Aug 2026 14:34:56 +0200 Subject: [PATCH 1/2] [FIX] #46107 UI: update `MainControls\Footer` section sizes (#10372) * Fixes https://mantis.ilias.de/view.php?id=46107 * Update section 1 and 5 from 4 column grid to 2 column grid * Add section grid size CSS modifier --- .../Component/MainControls/Renderer.php | 31 +++++++++++++++---- .../default/MainControls/tpl.footer.html | 2 +- .../Component/MainControls/FooterTest.php | 12 +++---- .../MainControls/_ui-component_footer.scss | 5 +-- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/components/ILIAS/UI/src/Implementation/Component/MainControls/Renderer.php b/components/ILIAS/UI/src/Implementation/Component/MainControls/Renderer.php index a0603d6eb008..d266ae9a4631 100755 --- a/components/ILIAS/UI/src/Implementation/Component/MainControls/Renderer.php +++ b/components/ILIAS/UI/src/Implementation/Component/MainControls/Renderer.php @@ -44,6 +44,9 @@ class Renderer extends AbstractComponentRenderer public const BLOCK_MAINBAR_TOOLS = 'tool_trigger_item'; public const BLOCK_METABAR_ENTRIES = 'meta_element'; + protected const FOOTER_SECTION_SIZE_MEDIUM = 'md'; + protected const FOOTER_SECTION_SIZE_SMALL = 'sm'; + private array $trigger_signals = []; /** @@ -440,7 +443,12 @@ protected function renderFooter(I\Footer $component, RendererInterface $default_ $template->setCurrentBlock('with_additional_item'); $template->setVariable('ITEM_CONTENT', $this->permanentLink((string) $permanent_url, $default_renderer)); $template->parseCurrentBlock(); - $this->parseFooterSection($template, 'permanent-link', $this->txt('footer_permanent_link')); + $this->parseFooterSection( + $template, + 'permanent-link', + $this->txt('footer_permanent_link'), + self::FOOTER_SECTION_SIZE_MEDIUM, + ); } // maybe render section 2 (link groups): @@ -457,6 +465,7 @@ protected function renderFooter(I\Footer $component, RendererInterface $default_ 'link-groups', $this->txt('footer_link_groups'), $link_groups, + self::FOOTER_SECTION_SIZE_SMALL, ); } @@ -470,6 +479,7 @@ protected function renderFooter(I\Footer $component, RendererInterface $default_ 'links', $this->txt('footer_links'), $links, + self::FOOTER_SECTION_SIZE_SMALL, ); } @@ -493,7 +503,8 @@ protected function renderFooter(I\Footer $component, RendererInterface $default_ $default_renderer, 'icons', $this->txt('footer_icons'), - $icons + $icons, + self::FOOTER_SECTION_SIZE_SMALL, ); } @@ -507,6 +518,7 @@ protected function renderFooter(I\Footer $component, RendererInterface $default_ 'texts', $this->txt('footer_texts'), $texts, + self::FOOTER_SECTION_SIZE_MEDIUM, ); } @@ -517,13 +529,15 @@ protected function renderFooter(I\Footer $component, RendererInterface $default_ /** * @param array $section_items (use as [$content, $title] = ) + * @param string $section_size (self::FOOTER_SECTION_SIZE_MEDIUM|self::FOOTER_SECTION_SIZE_SMALL) */ protected function parseAdditionalFooterSectionItems( Template $template, RendererInterface $default_renderer, string $section_type, string $section_label, - array $section_items = [], + array $section_items, + string $section_size, ): void { foreach ($section_items as [$content, $title]) { $template->setCurrentBlock('with_additional_item'); @@ -539,18 +553,20 @@ protected function parseAdditionalFooterSectionItems( $template->parseCurrentBlock(); } - $this->parseFooterSection($template, $section_type, $section_label); + $this->parseFooterSection($template, $section_type, $section_label, $section_size); } /** * @param array $section_icons + * @param string $section_size (self::FOOTER_SECTION_SIZE_MEDIUM|self::FOOTER_SECTION_SIZE_SMALL) */ protected function parseAdditionalFooterSectionIcons( Template $template, RendererInterface $default_renderer, string $section_type, string $section_label, - array $section_icons = [], + array $section_icons, + string $section_size, ): void { foreach ($section_icons as $icon) { $template->setCurrentBlock('with_additional_icon'); @@ -558,17 +574,20 @@ protected function parseAdditionalFooterSectionIcons( $template->parseCurrentBlock(); } - $this->parseFooterSection($template, $section_type, $section_label); + $this->parseFooterSection($template, $section_type, $section_label, $section_size); } + /** @param string $section_size (self::FOOTER_SECTION_SIZE_MEDIUM|self::FOOTER_SECTION_SIZE_SMALL) */ protected function parseFooterSection( Template $template, string $section_type, string $section_label, + string $section_size, ): void { $template->setCurrentBlock('with_additional_section'); $template->setVariable('SECTION_TYPE', $section_type); $template->setVariable('SECTION_LABEL', $section_label); + $template->setVariable('SECTION_SIZE', $section_size); $template->parseCurrentBlock(); } diff --git a/components/ILIAS/UI/src/templates/default/MainControls/tpl.footer.html b/components/ILIAS/UI/src/templates/default/MainControls/tpl.footer.html index d1b5aecd5b98..7f4b0aa41b62 100755 --- a/components/ILIAS/UI/src/templates/default/MainControls/tpl.footer.html +++ b/components/ILIAS/UI/src/templates/default/MainControls/tpl.footer.html @@ -1,6 +1,6 @@
-
@@ -193,7 +193,7 @@ public function testRenderWithAdditionalIcon(): void $expected_html = << -