From e15494de5865f05006da3e6c8afbea7e41f39298 Mon Sep 17 00:00:00 2001 From: Bilel KIHAL Date: Thu, 2 Jan 2025 17:57:36 +0100 Subject: [PATCH] show private only switch in browse page only for logged in users --- app/views/ontologies/browser/browse.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/ontologies/browser/browse.html.haml b/app/views/ontologies/browser/browse.html.haml index 974868aaf..7704140f2 100644 --- a/app/views/ontologies/browser/browse.html.haml +++ b/app/views/ontologies/browser/browse.html.haml @@ -40,7 +40,8 @@ %p.browse-filters-title= t("ontologies.filters") %div.browse-filter - = switch_input(id:'filter-private', name:'private_only', checked: @show_private_only, label: t("ontologies.browser.show_private_ontology")) + - if session[:user] + = switch_input(id:'filter-private', name:'private_only', checked: @show_private_only, label: t("ontologies.browser.show_private_ontology")) = switch_input(id:'filter-views', name:'views', checked: @show_views, label: t("ontologies.browser.show_ontology_views")) = switch_input(id:'filter-retired', name:'retired',checked: @show_retired , label: t("ontologies.browser.show_retired_ontologies"))