Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display <odd> at component and collection levels #1498

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 9 additions & 0 deletions spec/features/component_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down