Skip to content

Commit

Permalink
refactoring based on upstream spotlight refactoring, putting componen…
Browse files Browse the repository at this point in the history
…ts in top level directory
  • Loading branch information
hudajkhan committed Oct 5, 2024
1 parent 595e009 commit f341946
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 38 deletions.
7 changes: 7 additions & 0 deletions app/components/exhibit_navbar_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class ExhibitNavbarComponent < Spotlight::ExhibitNavbarComponent
def prepend_to_search_bar
render SearchTipsLinkComponent.new
end
end
6 changes: 0 additions & 6 deletions app/components/exhibits/search_tips_component.rb

This file was deleted.

6 changes: 0 additions & 6 deletions app/components/exhibits/search_tips_link_component.rb

This file was deleted.

4 changes: 4 additions & 0 deletions app/components/search_tips_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

class SearchTipsComponent < ViewComponent::Base
end
5 changes: 5 additions & 0 deletions app/components/search_tips_link_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

class SearchTipsLinkComponent < ViewComponent::Base
end

1 change: 1 addition & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class CatalogController < ApplicationController
configure_blacklight do |config|
config.http_method = :post
config.header_component = Spotlight::HeaderComponent
config.index.exhibit_navbar_component = ExhibitNavbarComponent
config.index.default_thumbnail = :exhibits_default_thumbnail

config.document_solr_request_handler = 'document'
Expand Down
2 changes: 1 addition & 1 deletion app/views/catalog/search_tips.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%= render Exhibits::SearchTipsComponent.new %>
<%= render SearchTipsComponent.new %>
25 changes: 0 additions & 25 deletions app/views/shared/_exhibit_navbar.html.erb

This file was deleted.

0 comments on commit f341946

Please sign in to comment.