Skip to content

Commit b90b10d

Browse files
authored
Remove show_sidebar partial and helper (#3334)
1 parent e9e7eff commit b90b10d

File tree

5 files changed

+3
-39
lines changed

5 files changed

+3
-39
lines changed

app/helpers/blacklight/document_helper_behavior.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@ def document_class_prefix
2424
'blacklight-'
2525
end
2626

27-
##
28-
# Render the sidebar partial for a document
29-
# This is used as an integration point by downstream apps to add to the
30-
# default sidebar.
31-
# See: https://github.com/geoblacklight/geoblacklight/blob/7d3c31c7af3362879b97e2c1351a2496c728c59c/app/helpers/blacklight_helper.rb#L7
32-
#
33-
# @param [SolrDocument] document
34-
# @return [String]
35-
def render_document_sidebar_partial(document)
36-
render 'show_sidebar', document: document
37-
end
38-
3927
##
4028
# return the Bookmarks on a set of documents (all bookmarks on the page)
4129
# @private

app/views/catalog/_show_sidebar.html.erb

Lines changed: 0 additions & 2 deletions
This file was deleted.

app/views/catalog/show.html.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<%= render 'show_main_content' %>
22

33
<% content_for(:sidebar) do %>
4-
<%= render_document_sidebar_partial @document %>
4+
<% presenter = document_presenter(@document) %>
5+
<%= render presenter.view_config.sidebar_component.new(presenter: presenter) %>
56
<% end %>

spec/views/catalog/_show_sidebar.erb_spec.rb

Lines changed: 0 additions & 24 deletions
This file was deleted.

spec/views/catalog/show.html.erb_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
before do
99
allow(presenter).to receive(:html_title).and_return('Heading')
10+
allow(document).to receive(:more_like_this).and_return([])
1011
allow(view).to receive_messages(has_user_authentication_provider?: false)
1112
allow(view).to receive_messages(render_document_sidebar_partial: "Sidebar")
1213
allow(view).to receive_messages(current_search_session: nil, search_session: {})

0 commit comments

Comments
 (0)