diff --git a/Gemfile.lock b/Gemfile.lock index 4f42db0e..245cf57a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/geoblacklight/geoblacklight.git - revision: 01961a094e557b02a7cab330750c1cf9fe6d774e + revision: 0d00b850e58e8ab92f5db97166563bb83afa3ea3 branch: main specs: geoblacklight (4.4.0) diff --git a/app/components/earthworks/sidebar_component.html.erb b/app/components/earthworks/document/sidebar_component.html.erb similarity index 100% rename from app/components/earthworks/sidebar_component.html.erb rename to app/components/earthworks/document/sidebar_component.html.erb diff --git a/app/components/earthworks/document/sidebar_component.rb b/app/components/earthworks/document/sidebar_component.rb new file mode 100644 index 00000000..d2616aa2 --- /dev/null +++ b/app/components/earthworks/document/sidebar_component.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Earthworks + # Render the sidebar on the show view + module Document + class SidebarComponent < Geoblacklight::Document::SidebarComponent + def components + [ + Geoblacklight::LoginLinkComponent.new(document: document), + Geoblacklight::StaticMapComponent.new(document: document), + Earthworks::DownloadLinksComponent.new(document: document) + ] + end + end + end +end diff --git a/app/components/earthworks/sidebar_component.rb b/app/components/earthworks/sidebar_component.rb deleted file mode 100644 index 4dee5ebc..00000000 --- a/app/components/earthworks/sidebar_component.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Earthworks - # Render the sidebar on the show view - class SidebarComponent < Geoblacklight::SidebarComponent - def components - [ - Geoblacklight::LoginLinkComponent.new(document: document), - Geoblacklight::StaticMapComponent.new(document: document), - Earthworks::DownloadLinksComponent.new(document: document) - ] - end - end -end diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 6d594d7b..1dc50513 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -48,7 +48,7 @@ class CatalogController < ApplicationController config.show.partials << 'show_default_viewer_information' config.show.partials << 'show_default_canonical_link' config.show.partials << :show - config.show.sidebar_component = Earthworks::SidebarComponent + config.show.sidebar_component = Earthworks::Document::SidebarComponent config.header_component = Geoblacklight::HeaderComponent # solr fields that will be treated as facets by the blacklight application