From 3cae74ba5d90d19d069b7af74710fe35ca5b11ef Mon Sep 17 00:00:00 2001 From: apple Date: Fri, 15 Dec 2023 13:28:58 -0500 Subject: [PATCH] Display at component and collection levels --- lib/generators/arclight/templates/catalog_controller.rb | 4 ++-- spec/features/collection_page_spec.rb | 3 +++ spec/features/component_page_spec.rb | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/generators/arclight/templates/catalog_controller.rb b/lib/generators/arclight/templates/catalog_controller.rb index 7b6aba897..8bbe0c474 100644 --- a/lib/generators/arclight/templates/catalog_controller.rb +++ b/lib/generators/arclight/templates/catalog_controller.rb @@ -306,7 +306,7 @@ class CatalogController < ApplicationController config.add_related_field 'otherfindaid', field: 'otherfindaid_html_tesm', helper_method: :render_html_tags config.add_related_field 'altformavail', field: 'altformavail_html_tesm', helper_method: :render_html_tags config.add_related_field 'originalsloc', field: 'originalsloc_html_tesm', helper_method: :render_html_tags - config.add_related_field 'odd', field: 'odd_html_tesim', helper_method: :render_html_tags + config.add_related_field 'odd', field: 'odd_html_tesm', helper_method: :render_html_tags # Collection Show Page - Indexed Terms Section config.add_indexed_terms_field 'access_subjects', field: 'access_subjects_ssim', link_to_facet: true, separator_options: { @@ -361,7 +361,7 @@ class CatalogController < ApplicationController config.add_component_field 'fileplan', field: 'fileplan_html_tesim', helper_method: :render_html_tags config.add_component_field 'altformavail', field: 'altformavail_html_tesim', helper_method: :render_html_tags config.add_component_field 'otherfindaid', field: 'otherfindaid_html_tesm', helper_method: :render_html_tags - config.add_component_field 'odd', field: 'odd_html_tesim', helper_method: :render_html_tags + config.add_component_field 'odd', field: 'odd_html_tesm', helper_method: :render_html_tags config.add_component_field 'relatedmaterial', field: 'relatedmaterial_html_tesm', helper_method: :render_html_tags 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 diff --git a/spec/features/collection_page_spec.rb b/spec/features/collection_page_spec.rb index 523fdf42f..6fd80f576 100644 --- a/spec/features/collection_page_spec.rb +++ b/spec/features/collection_page_spec.rb @@ -129,6 +129,9 @@ expect(page).to have_css('dt', text: 'Location of originals') expect(page).to have_css('dd', text: /^Something incredible is waiting/) + + expect(page).to have_css('dt', text: 'Other descriptive data') + expect(page).to have_css('dd', text: /^Contact Information/) end end diff --git a/spec/features/component_page_spec.rb b/spec/features/component_page_spec.rb index 5a6326f0e..10051a7a5 100644 --- a/spec/features/component_page_spec.rb +++ b/spec/features/component_page_spec.rb @@ -122,6 +122,15 @@ end end + describe 'odd' do + let(:doc_id) { 'umich-bhl-851981_aspace_533f0fb03170d86408e0b1dde0d92fa7' } + + it 'displays odd' do + expect(page).to have_css('dt', text: 'Other descriptive data') + expect(page).to have_css('dd', text: /^WJR and WMAQ/) + end + end + describe 'collection context', js: true do it 'has ancestor component with badge having children count' do within '#collection-context' do