Skip to content

Commit 46ec421

Browse files
committed
Test on blacklight 9
1 parent 3bf60b6 commit 46ec421

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

app/components/arclight/embed_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
module Arclight
44
# Render digital object links for a document
55
class EmbedComponent < ViewComponent::Base
6-
def initialize(document:, presenter:, **kwargs) # rubocop:disable Lint/UnusedMethodArgument
6+
def initialize(presenter:, document_counter: nil, **kwargs) # rubocop:disable Lint/UnusedMethodArgument
77
super()
88

9-
@document = document
9+
@document = presenter.document
1010
@presenter = presenter
1111
end
1212

app/components/arclight/index_metadata_field_component.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<%= tag.dt @field.label, class: 'visually-hidden' %>
33
<% if truncate? %>
44
<%= tag.dd(class: @classes + ['truncator'], data: { controller: 'arclight-truncate' }) do %>
5-
<%= tag.div @field.render, class: 'content', data: { arclight_truncate_target: 'content' } %>
5+
<%= tag.div helpers.safe_join(@field.render), class: 'content', data: { arclight_truncate_target: 'content' } %>
66
<%= button_tag(type: :button, class: 'btn btn-sm btn-link px-0',
77
data: { action: 'click->arclight-truncate#trigger' }) do %>
88
<%= tag.span t('arclight.truncation.view_more'), class: 'view-more' %>
@@ -11,6 +11,6 @@
1111
<% end %>
1212
<% end %>
1313
<% else %>
14-
<%= tag.dd @field.render, class: @classes %>
14+
<%= tag.dd helpers.safe_join(@field.render), class: @classes %>
1515
<% end %>
1616
</div>

app/components/arclight/repository_location_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<% component.with_label do %>
33
<%= label %>
44
<% end %>
5-
<% component.with_value do %>
5+
<% component.with_value(index: 0) do %>
66
<div class='al-in-person-repository-name'>
77
<% if repository.thumbnail_url %>
88
<%= image_tag repository.thumbnail_url, alt: '', class: 'img-fluid float-left' %>

app/components/arclight/search_result_component.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<%= content_tag @component,
22
id: @id,
33
data: {
4-
'document-id': @document.id.to_s.parameterize,
4+
'document-id': presenter.document.id.to_s.parameterize,
55
'document-counter': @counter,
66
},
77
itemscope: true,
8-
itemtype: @document.itemtype,
8+
itemtype: presenter.document.itemtype,
99
class: classes.flatten.join(' ') do %>
1010
<div class="px-2 document-type-icon">
1111
<%= icon %>
1212
</div>
1313
<div class="container">
14-
<%= render Arclight::SearchResultTitleComponent.new(document: document, compact: compact?) %>
14+
<%= render Arclight::SearchResultTitleComponent.new(presenter: presenter, compact: compact?) %>
1515

1616
<div class="row">
1717
<%= metadata %>

app/components/arclight/search_result_title_component.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<header class="documentHeader row" data-document-id="<%= @document.id %>">
1+
<header class="documentHeader row" data-document-id="<%= presenter.document.id %>">
22
<h3 class="index_title document-title-heading col">
3-
<%= helpers.link_to_document @document, counter: @counter %>
4-
<% @document.extent.each do |extent| %>
3+
<%= helpers.link_to_document presenter.document, counter: @counter %>
4+
<% presenter.document.extent.each do |extent| %>
55
<%= tag.span extent, class: 'al-document-extent badge' unless compact? %>
66
<% end %>
77
<%= tag.span class: 'al-document-container text-muted' do %>
8-
<%= @document.containers.join(', ') %>
9-
<% end if @document.containers.present? %>
8+
<%= presenter.document.containers.join(', ') %>
9+
<% end if presenter.document.containers.present? %>
1010
</h3>
1111

1212
<% actions.each do |action| %>

arclight.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
2424
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2525
spec.require_paths = ['lib']
2626

27-
spec.add_dependency 'blacklight', '>= 8.0.0', '< 9'
27+
spec.add_dependency 'blacklight', '>= 9.0.0', '< 10'
2828
spec.add_dependency 'gretel'
2929
spec.add_dependency 'rails', '>= 7.1', '< 9'
3030
spec.add_dependency 'traject', '~> 3.0'

spec/components/arclight/search_bar_component_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
end
1414

1515
let(:params) { {} }
16-
let(:component) { described_class.new(url: '/', params: params) }
16+
let(:component) { described_class.new(url: '/', params: params, advanced_search_url: '/advanced') }
1717

1818
describe 'within collection dropdown' do
1919
context 'when in a collection context on the search results page' do

0 commit comments

Comments
 (0)