From 33a1776909d56577cba06e30561eb6076244706b Mon Sep 17 00:00:00 2001 From: Sean Aery Date: Tue, 19 Dec 2023 09:27:03 -0500 Subject: [PATCH] Display the language field at the component level if present. Closes #1508 --- lib/generators/arclight/templates/catalog_controller.rb | 3 ++- spec/features/component_page_spec.rb | 2 ++ spec/fixtures/ead/nlm/alphaomegaalpha.xml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/generators/arclight/templates/catalog_controller.rb b/lib/generators/arclight/templates/catalog_controller.rb index 84f847b07..fdccba164 100644 --- a/lib/generators/arclight/templates/catalog_controller.rb +++ b/lib/generators/arclight/templates/catalog_controller.rb @@ -347,6 +347,7 @@ class CatalogController < ApplicationController 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 + config.add_component_field 'language', field: 'language_ssim' config.add_component_field 'acqinfo', field: 'acqinfo_ssim', helper_method: :render_html_tags config.add_component_field 'bioghist', field: 'bioghist_html_tesm', helper_method: :render_html_tags config.add_component_field 'appraisal', field: 'appraisal_html_tesm', helper_method: :render_html_tags @@ -368,7 +369,7 @@ class CatalogController < ApplicationController config.add_component_field 'separatedmaterial', field: 'separatedmaterial_html_tesm', helper_method: :render_html_tags config.add_component_field 'originalsloc', field: 'originalsloc_html_tesm', helper_method: :render_html_tags config.add_component_field 'note', field: 'note_html_tesm', helper_method: :render_html_tags - + # Component Show Page - Indexed Terms Section config.add_component_indexed_terms_field 'access_subjects', field: 'access_subjects_ssim', link_to_facet: true, separator_options: { words_connector: '
', diff --git a/spec/features/component_page_spec.rb b/spec/features/component_page_spec.rb index 10051a7a5..46dd8d4b0 100644 --- a/spec/features/component_page_spec.rb +++ b/spec/features/component_page_spec.rb @@ -86,6 +86,8 @@ it 'shows configured component fields' do expect(page).to have_css('dt', text: 'Extent') expect(page).to have_css('dd', text: /^2 Linear Feet/) + expect(page).to have_css('dt', text: 'Language') + expect(page).to have_css('dd', text: 'English') expect(page).to have_css('dt', text: 'Physical description') expect(page).to have_css('dd', text: /^Mixed Materials/) expect(page).to have_css('dt', text: 'Dimensions') diff --git a/spec/fixtures/ead/nlm/alphaomegaalpha.xml b/spec/fixtures/ead/nlm/alphaomegaalpha.xml index ff61c68d3..6c6f413d9 100644 --- a/spec/fixtures/ead/nlm/alphaomegaalpha.xml +++ b/spec/fixtures/ead/nlm/alphaomegaalpha.xml @@ -490,6 +490,9 @@ Constitution and by-laws - drafts, 1902-1904 + + English + Mixed Materials