Skip to content

Commit

Permalink
add related record field
Browse files Browse the repository at this point in the history
  • Loading branch information
jendiamond committed Nov 1, 2023
1 parent f5dc152 commit 45caa42
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ class CatalogController < ApplicationController
config.add_show_field 'resp_statement_tesim', label: 'Statement of Responsibility'
config.add_show_field 'citation_source_tesim', label: 'References'
config.add_show_field 'related_to_ssm', label: 'Related Items', auto_link: true # make this field url aware
config.add_show_field 'related_record_ssm', label: 'Related Records', auto_link: true # make this field url aware

# Physical description
config.add_show_field 'medium_tesim', label: 'Medium'
Expand Down
1 change: 1 addition & 0 deletions config/metadata/note_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ colophon_tesim: 'Colophon'
provenance_tesim: 'Provenance'
note_tesim: 'Note'
related_to_ssm: 'Related items'
related_record_ssm: 'Related records'
# toc_tesim: 'Table of Contents' (render_table_of_contents_key / value)
resp_statement_tesim: 'Statement of Responsibility'
citation_source_tesim: 'References'
Expand Down
1 change: 1 addition & 0 deletions config/oai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ DC:
description:
- content_disclaimer_ssm
- related_to_ssm
- related_record_ssm
DPLA:
parent_schema: default
object:
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"interviewer_tesim", "interviewee_tesim", "cartographer_tesim",
"artist_tesim", "recipient_tesim", "director_tesim", "producer_tesim", "host_tesim",
"musician_tesim", "printer_tesim", "researcher_tesim",
'format_book_tesim', 'resp_statement_tesim', 'citation_source_tesim', 'related_to_ssm', "oai_set_ssim"]
'format_book_tesim', 'resp_statement_tesim', 'citation_source_tesim', 'related_to_ssm', 'related_record_ssm', "oai_set_ssim"]
end

it 'has exactly expected show fields' do
Expand Down
11 changes: 8 additions & 3 deletions spec/presenters/ursus/note_metadata_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
'provenance_tesim' => 'Provenance',
'note_tesim' => 'Note',
'related_to_ssm' => 'Related items',
'resp_statement_tesim' => 'Statement of Responsibility',
'related_record_ssm' => 'Related records',
'resp_statement_tesim' => 'Statement of responsibility',
'citation_source_tesim' => 'References',
'incipit_tesim' => 'Incipit',
'explicit_tesim' => 'Explicit'
Expand Down Expand Up @@ -63,8 +64,12 @@
expect(config['related_to_ssm'].to_s).to eq('Related items')
end

it 'returns the Related records Key' do
expect(config['related_record_ssm'].to_s).to eq('Related records')
end

it 'returns the Statement of Responsibility Key' do
expect(config['resp_statement_tesim'].to_s).to eq('Statement of Responsibility')
expect(config['resp_statement_tesim'].to_s).to eq('Statement of responsibility')
end

it 'returns the References Key' do
Expand All @@ -86,7 +91,7 @@

it "returns existing keys" do
expect(presenter_object.note_terms).to be_instance_of(Hash)
expect(all).to eq 12
expect(all).to eq 13
expect(config.length).to eq all
end

Expand Down

0 comments on commit 45caa42

Please sign in to comment.