Skip to content

Commit

Permalink
Display related fields at component level
Browse files Browse the repository at this point in the history
Closes #1464
  • Loading branch information
marlo-longley committed Dec 14, 2023
1 parent aa81135 commit cb113bb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/generators/arclight/templates/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ class CatalogController < ApplicationController
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 '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


# Component Show Page - Indexed Terms Section
config.add_component_indexed_terms_field 'access_subjects', field: 'access_subjects_ssim', link_to_facet: true, separator_options: {
Expand All @@ -373,6 +377,7 @@ class CatalogController < ApplicationController
last_word_connector: '<br/>'
}


# =================
# ACCESS TAB FIELDS
# =================
Expand Down
2 changes: 1 addition & 1 deletion spec/features/collection_filtering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
click_button 'Search'

expect(page).to have_css('.constraint-value .filter-value', text: 'Alpha Omega Alpha Archives, 1894-1992')
expect(page).to have_css('.al-document-listings .document', count: 1) # has results
expect(page).to have_css('.al-document-listings .document', count: 2) # has results
end

it 'allows the user to choose to search all collections' do
Expand Down
18 changes: 18 additions & 0 deletions spec/fixtures/ead/nlm/alphaomegaalpha.xml
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,24 @@
</did>
</c>
<c id="aspace_0d7174f0081ee8fd43f08872cfd7adc3" level="otherlevel">
<originalsloc>
<p>File contains photocopies of original still held by the donor.</p>
</originalsloc>
<separatedmaterial>
<p>Photographs and sound recordings have been transferred to the appropriate
custodial divisions of the Library where they are identified as part of these papers.
Among the sound recordings are the following broadcasts:</p>
<list>Example broadcast</list>
</separatedmaterial>
<separatedmaterial>
<p>Other papers of Alpha Omega, which relate chiefly to his early years
and public service in California, are held by the California State Archives in
Sacramento.</p>
</separatedmaterial>
<relatedmaterial>
<p>Records relating to the Alpha Omega Commission are held in the National
Archives and Records Administration.</p>
</relatedmaterial>
<did>
<unittitle>Review of constitution and suggestions,</unittitle>
<unitdate>n.d.</unitdate>
Expand Down

0 comments on commit cb113bb

Please sign in to comment.