Skip to content

Commit

Permalink
Display <odd> at component and collection levels
Browse files Browse the repository at this point in the history
  • Loading branch information
marlo-longley committed Dec 15, 2023
1 parent 9142012 commit 684a3be
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/generators/arclight/templates/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions spec/features/collection_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions spec/features/component_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@
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
Expand Down

0 comments on commit 684a3be

Please sign in to comment.