From e616842389ae436b47d09f95fe7cc5bfbf2911e2 Mon Sep 17 00:00:00 2001 From: Syphax bouazzouni Date: Wed, 30 Oct 2024 17:38:56 +0100 Subject: [PATCH] Fix: Disable slices not hiding the slices section in the home page (#797) * update select_language_label helper to select f no english found any language remaining over the not tagged * hide the slices section in the home page if slices disabled --- app/helpers/application_helper.rb | 3 +++ app/views/home/index.html.haml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index acf5335c1..6d565bdb2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -121,6 +121,9 @@ def onts_for_select(include_views: false) onts_for_select end + def slices_enabled? + $ENABLE_SLICES.eql?(true) + end def at_slice? !@subdomain_filter.nil? && !@subdomain_filter[:active].nil? && @subdomain_filter[:active] == true diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 253e0546a..8bc39eba9 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -176,7 +176,7 @@ .home-statistics-link.justify-content-end{style: @analytics.empty? && "visibility: hidden"} = link_to t("home.see_details"),'/statistics', target: "_blank" - - if @slices + - if slices_enabled? .home-section .home-section-title .text