Skip to content

Commit

Permalink
Merge pull request #1501 from projectblacklight/add_creator
Browse files Browse the repository at this point in the history
Adds creator field for components
  • Loading branch information
lfarrell authored Dec 18, 2023
2 parents b5d7b33 + 59ea913 commit 9e73925
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lib/arclight/traject/ead2_component_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@
to_field 'indexes_html_tesm', extract_xpath('./index', to_text: false)
to_field 'indexes_tesim', extract_xpath('./index')

to_field 'creator_ssm', extract_xpath('./did/origination')
to_field 'creator_ssim', extract_xpath('./did/origination')
to_field 'creators_ssim', extract_xpath('./did/origination')
to_field 'creator_sort' do |record, accumulator|
accumulator << record.xpath('./did/origination').map(&:text).join(', ')
end
Expand Down
3 changes: 2 additions & 1 deletion lib/generators/arclight/templates/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class CatalogController < ApplicationController
# ===========================

# Collection Show Page - Summary Section
config.add_summary_field 'creators', field: 'creators_ssim', link_to_facet: true
config.add_summary_field 'creators', field: 'creator_ssim', link_to_facet: true
config.add_summary_field 'abstract', field: 'abstract_html_tesm', helper_method: :render_html_tags
config.add_summary_field 'extent', field: 'extent_ssm'
config.add_summary_field 'language', field: 'language_ssim'
Expand Down Expand Up @@ -342,6 +342,7 @@ class CatalogController < ApplicationController
}, if: lambda { |_context, _field_config, document|
document.containers.present?
}
config.add_component_field 'creators', field: 'creator_ssim', link_to_facet: true
config.add_component_field 'abstract', field: 'abstract_html_tesm', helper_method: :render_html_tags
config.add_component_field 'extent', field: 'extent_ssm'
config.add_component_field 'scopecontent', field: 'scopecontent_html_tesm', helper_method: :render_html_tags
Expand Down

0 comments on commit 9e73925

Please sign in to comment.