diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1ad824206..3f69732af 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -106,8 +106,8 @@ def error_message_alert end end - def onts_for_select - ontologies ||= LinkedData::Client::Models::Ontology.all(include: "acronym,name") + def onts_for_select(include_views: false) + ontologies ||= LinkedData::Client::Models::Ontology.all({include: "acronym,name", include_views: include_views}) onts_for_select = [['', '']] ontologies.each do |ont| next if ( ont.acronym.nil? or ont.acronym.empty? ) diff --git a/app/views/search/index.html.haml b/app/views/search/index.html.haml index a53fccdbe..c193b6cd0 100644 --- a/app/views/search/index.html.haml +++ b/app/views/search/index.html.haml @@ -14,8 +14,8 @@ .title = t("search.advanced_options.ontologies") .field - = ontologies_selector(id:'search_page_ontologies' ,name: 'ontologies[]', selected: params[:ontologies]&.split(',')) - - if federation_enabled? + = ontologies_selector(id:'search_page_ontologies' ,name: 'ontologies[]', selected: params[:ontologies]&.split(','), ontologies: onts_for_select(include_views: true)) + - if federation_enabled? .filter-container .title = t('federation.results_from_external_portals')