Skip to content

Commit f4766ee

Browse files
committed
WIP: Try to get arclight working on BL9.0.0.beta8 by providing index param.
- may be best to modify BL MetadataFieldLayoutComponent so index param defaults to 0 if not provided
1 parent 52625bb commit f4766ee

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
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/repository_location_component.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<%= render(@layout.new(field: @field)) do |component| %>
1+
<%= render(@layout.new(field: @field, index: 0)) do |component| %>
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/upper_metadata_layout_component.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
module Arclight
44
# Override upstream to add an offset bootstrap column class
55
class UpperMetadataLayoutComponent < Blacklight::MetadataFieldLayoutComponent
6-
def initialize(field:, label_class: 'col-md-3 offset-md-1', value_class: 'col-md-8')
7-
super
6+
def initialize(field:, index: 0, label_class: 'col-md-3 offset-md-1', value_class: 'col-md-8')
7+
@index = index
8+
super(field: field, label_class: label_class, value_class: value_class)
89
end
910
end
1011
end

lib/generators/arclight/templates/arclight.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
}
44

55
// Arclight, imported from arclight frontend package
6-
@import 'arclight/app/assets/stylesheets/arclight/application';
6+
//@import 'arclight/app/assets/stylesheets/arclight/application';
7+
@import '../../../arclight/app/assets/stylesheets/arclight/application';

0 commit comments

Comments
 (0)