Skip to content

Commit

Permalink
Drop BL 7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
corylown committed Feb 12, 2025
1 parent 8d948fc commit 222b399
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<% if body.present? %>
<%= body %>
<% elsif partials? || embed? %>
<% partial_content = capture do %>
<% partials.each do |partial| %>
<%= partial %>
<% end %>
<% end %>

<%= partial_content if partial_content.present? %>
<%= embed if embed? && partial_content.blank? %>
<% elsif embed? %>
<%= embed %>
<% elsif thumbnail? %>
<%= thumbnail %>
<% end %>
6 changes: 0 additions & 6 deletions app/helpers/spotlight/pages_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,5 @@ def resource_alt_text(options, default)

default
end

def embedded_document_presenter(document, view_config: nil)
return document_presenter(document) if view_config.nil? || Blacklight.version < '8.0'

view_config.document_presenter_class.new(document, self, view_config: view_config)
end
end
end
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<div class="box" data-id="<%= document.id %>">
<% view_config = blacklight_config.view_config(:embed) %>
<%= render (view_config.document_component || Spotlight::SolrDocumentLegacyEmbedComponent).new((Blacklight.version > '8.0' ? :document : :presenter) => document_presenter(document, view_config: view_config), counter: nil, block: local_assigns[:block]) do |component| %>
<% component.with_partial do %>
<%= render_document_partials document, view_config.partials, component: component, document_counter: nil, view_config: view_config, block: local_assigns[:block], **(view_config.locals) %>
<% end if view_config&.partials&.any? %>
<% end %>
<%= render (view_config.document_component || Spotlight::SolrDocumentLegacyEmbedComponent).new(:document => document_presenter(document, view_config: view_config), counter: nil, block: local_assigns[:block]) %>
</div>

0 comments on commit 222b399

Please sign in to comment.