Skip to content

Commit

Permalink
Merge pull request #4057 from pulibrary/i4003_display_fast_subject_he…
Browse files Browse the repository at this point in the history
…adings

Add FaST subject heading display
  • Loading branch information
sandbergja authored Jul 24, 2024
2 parents 28c5cab + 20c68d4 commit a1b111f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ class CatalogController < ApplicationController
config.add_show_field 'homoit_genre_s', label: 'Homosaurus genre(s)', helper_method: :subjectify
config.add_show_field 'rbgenr_s', label: 'Rare books genre', helper_method: :subjectify
config.add_show_field 'aat_s', label: 'Getty AAT genre', helper_method: :subjectify
config.add_show_field 'fast_subject_display', label: 'FaST Subject(s)'
config.add_show_field 'related_works_1display', label: 'Related work(s)', helper_method: :name_title_hierarchy
config.add_show_field 'series_display', label: 'Series', series_link: true
config.add_show_field 'contains_1display', label: 'Contains', helper_method: :name_title_hierarchy
Expand Down
4 changes: 4 additions & 0 deletions spec/fixtures/alma/current_fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -30984,6 +30984,10 @@
"Periodicals",
"LGBTQ+ periodicals"
],
"fast_subject_display": [
"Criticism, interpretation, etc.",
"Another uncontrolled subject"
],
"homoit_genre_s": [
"LGBTQ+ periodicals"
],
Expand Down
8 changes: 8 additions & 0 deletions spec/views/catalog/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@
end
end

context 'when a document has FaST subject headings' do
it 'displays the subject headings' do
visit 'catalog/99125527882306421'
expect(page).to have_content('FaST Subject(s)')
expect(page).to have_content('Criticism, interpretation, etc.')
end
end

context 'when a document has no language_iana_s' do
it 'defaults to lang attribute "en"' do
visit 'catalog/99124945733506421'
Expand Down

0 comments on commit a1b111f

Please sign in to comment.