From 0ccd661cde31f4ca5e639d3ec93d01c520545843 Mon Sep 17 00:00:00 2001 From: Cory Lown Date: Mon, 7 Oct 2024 16:31:57 -0400 Subject: [PATCH] Don't scope exhibit_navbar_comoponent setting to view type --- app/views/shared/_exhibit_navbar.html.erb | 4 ++-- lib/generators/spotlight/templates/catalog_controller.rb | 2 +- spec/test_app_templates/catalog_controller.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/shared/_exhibit_navbar.html.erb b/app/views/shared/_exhibit_navbar.html.erb index ed8f225d6e..96aa6df839 100644 --- a/app/views/shared/_exhibit_navbar.html.erb +++ b/app/views/shared/_exhibit_navbar.html.erb @@ -1,2 +1,2 @@ -<%= render (blacklight_config&.view_config(document_index_view_type)&.exhibit_navbar_component || Spotlight::ExhibitNavbarComponent).new %> -<% Spotlight.deprecator.warn("_exhibit_navbar.html.erb will be removed. Customize the exhibit navbar using components instead.") %> \ No newline at end of file +<%- Spotlight.deprecator.warn("_exhibit_navbar.html.erb will be removed. Customize the exhibit navbar using components instead.") %> +<%= render (blacklight_config&.exhibit_navbar_component || Spotlight::ExhibitNavbarComponent).new %> diff --git a/lib/generators/spotlight/templates/catalog_controller.rb b/lib/generators/spotlight/templates/catalog_controller.rb index f548ec2800..f74f3cb629 100644 --- a/lib/generators/spotlight/templates/catalog_controller.rb +++ b/lib/generators/spotlight/templates/catalog_controller.rb @@ -16,7 +16,7 @@ class CatalogController < ApplicationController # Blacklight 8 sets a default value to 'advanced' config.json_solr_path = nil config.header_component = Spotlight::HeaderComponent - config.index.exhibit_navbar_component = Spotlight::ExhibitNavbarComponent + config.exhibit_navbar_component = Spotlight::ExhibitNavbarComponent config.document_solr_path = 'get' config.document_unique_id_param = 'ids' diff --git a/spec/test_app_templates/catalog_controller.rb b/spec/test_app_templates/catalog_controller.rb index 7cf4e8b72e..427401fa4a 100644 --- a/spec/test_app_templates/catalog_controller.rb +++ b/spec/test_app_templates/catalog_controller.rb @@ -7,7 +7,7 @@ class CatalogController < ApplicationController configure_blacklight do |config| config.header_component = Spotlight::HeaderComponent - config.index.exhibit_navbar_component = Spotlight::ExhibitNavbarComponent + config.exhibit_navbar_component = Spotlight::ExhibitNavbarComponent config.view.gallery(document_component: Blacklight::Gallery::DocumentComponent, icon: Blacklight::Gallery::Icons::GalleryComponent) # config.view.gallery.classes = 'row-cols-2 row-cols-md-3' config.view.masonry(document_component: Blacklight::Gallery::DocumentComponent, icon: Blacklight::Gallery::Icons::MasonryComponent)