diff --git a/app/controllers/spotlight/catalog_controller.rb b/app/controllers/spotlight/catalog_controller.rb index 265d40c5e..3e82a4b4c 100644 --- a/app/controllers/spotlight/catalog_controller.rb +++ b/app/controllers/spotlight/catalog_controller.rb @@ -42,6 +42,8 @@ class CatalogController < ::CatalogController partials: [:index_compact], document_actions: []) end + blacklight_config.view.admin_table.document_component ||= Spotlight::DocumentAdminTableComponent + if Blacklight::VERSION > '8' blacklight_config.track_search_session.storage = false else diff --git a/app/views/spotlight/catalog/_document_admin_table.html.erb b/app/views/spotlight/catalog/_document_admin_table.html.erb index 9bff143e5..6d5e6aeed 100644 --- a/app/views/spotlight/catalog/_document_admin_table.html.erb +++ b/app/views/spotlight/catalog/_document_admin_table.html.erb @@ -11,7 +11,7 @@ <% if Blacklight.version < '8.0' %> - <%= render view_config.document_component.with_collection(documents) %> + <%= render (view_config.document_component || Spotlight::DocumentAdminTableComponent).with_collection(documents) %> <% else %> <% document_presenters = documents.map { |doc| document_presenter(doc) } -%> <%= render view_config.document_component.with_collection(document_presenters) %>