Skip to content

Commit

Permalink
Merge pull request #1500 from projectblacklight/add_notes
Browse files Browse the repository at this point in the history
Fixes missing _html_tesm fields and <notes>
  • Loading branch information
lfarrell authored Dec 18, 2023
2 parents 9e73925 + adaf88d commit 7922386
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/arclight/traject/ead2_component_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
abstract
materialspec
physloc
note
].freeze

# ==================
Expand Down Expand Up @@ -304,7 +305,6 @@
DID_SEARCHABLE_NOTES_FIELDS.map do |selector|
to_field "#{selector}_html_tesm", extract_xpath("./did/#{selector}", to_text: false)
end
to_field 'did_note_ssm', extract_xpath('./did/note')

# =============================
# Each component child document
Expand Down
1 change: 1 addition & 0 deletions lib/arclight/traject/ead2_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
abstract
materialspec
physloc
note
].freeze

settings do
Expand Down
12 changes: 7 additions & 5 deletions lib/generators/arclight/templates/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,10 @@ class CatalogController < ApplicationController
config.add_background_field 'physdesc', field: 'physdesc_tesim', helper_method: :render_html_tags
config.add_background_field 'physfacet', field: 'physfacet_tesim', helper_method: :render_html_tags
config.add_background_field 'dimensions', field: 'dimensions_tesim', helper_method: :render_html_tags
config.add_background_field 'materialspec', field: 'materialspec_tesim', helper_method: :render_html_tags
config.add_background_field 'fileplan', field: 'fileplan_html_tesim', helper_method: :render_html_tags
config.add_background_field 'materialspec', field: 'materialspec_html_tesm', helper_method: :render_html_tags
config.add_background_field 'fileplan', field: 'fileplan_html_tesm', helper_method: :render_html_tags
config.add_background_field 'descrules', field: 'descrules_ssm', helper_method: :render_html_tags
config.add_background_field 'note', field: 'note_html_tesm', helper_method: :render_html_tags

# Collection Show Page - Related Section
config.add_related_field 'relatedmaterial', field: 'relatedmaterial_html_tesm', helper_method: :render_html_tags
Expand Down Expand Up @@ -354,18 +355,19 @@ class CatalogController < ApplicationController
config.add_component_field 'arrangement', field: 'arrangement_html_tesm', helper_method: :render_html_tags
config.add_component_field 'accruals', field: 'accruals_html_tesm', helper_method: :render_html_tags
config.add_component_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags
config.add_component_field 'materialspec', field: 'materialspec_tesim', helper_method: :render_html_tags
config.add_component_field 'materialspec', field: 'materialspec_html_tesm', helper_method: :render_html_tags
config.add_component_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags
config.add_component_field 'physdesc', field: 'physdesc_tesim', helper_method: :render_html_tags
config.add_component_field 'physfacet', field: 'physfacet_tesim', helper_method: :render_html_tags
config.add_component_field 'dimensions', field: 'dimensions_tesim', helper_method: :render_html_tags
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 'fileplan', field: 'fileplan_html_tesm', helper_method: :render_html_tags
config.add_component_field 'altformavail', field: 'altformavail_html_tesm', 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_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
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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ en:
materialspec: Material specific details
fileplan: File plan
odd: Other descriptive data
note: Note
did_note: Note

access_subjects: Subjects
names_coll: Names
Expand Down
3 changes: 3 additions & 0 deletions spec/fixtures/ead/nlm/alphaomegaalpha.xml
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,9 @@
<unitdate normal="1902/1973" type="inclusive">1902-1973</unitdate>
<abstract id="aspace_e806089c6553f2132b727ead99b47a70">Contains a mixture of membership
cards and membership rosters.</abstract>
<note>
<p>For more information, please contact us.</p>
</note>
</did>
</c>
<c id="aspace_d5765d98e333f83b6278c00e9a81f31f" level="series">
Expand Down
3 changes: 3 additions & 0 deletions spec/fixtures/ead/sul-spec/a0011.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@
here: http://purl.stanford.edu/kc844kt2526
</p>
</altformavail>
<note>
<p>For more information, please contact us.</p>
</note>
<controlaccess>
<genreform source="aat">Photoprints.</genreform>
<geogname source="lcsh">Yosemite National Park (Calif.)
Expand Down

0 comments on commit 7922386

Please sign in to comment.