Skip to content

Commit

Permalink
Fix: Disable slices not hiding the slices section in the home page (#797
Browse files Browse the repository at this point in the history
)

* 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
  • Loading branch information
syphax-bouazzouni authored Oct 30, 2024
1 parent d67ba52 commit e616842
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/views/home/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e616842

Please sign in to comment.