Skip to content

Commit

Permalink
Merge pull request #2643 from sul-dlss/parkeronly
Browse files Browse the repository at this point in the history
Display specific fields in the index and metadata configuration page only for Parker exhibit
  • Loading branch information
corylown authored Nov 20, 2024
2 parents bace331 + 933d59a commit 0ee6298
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
25 changes: 20 additions & 5 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,32 @@ class CatalogController < ApplicationController
config.add_index_field 'format_main_ssim', label: 'Resource type', if: lambda { |context, *_args|
context.feature_flags.add_resource_type_index_field?
}

# Parker specific fields we do not wish to show in other exhibits
# editor_ssim, university_ssim, range_labels_ssim, and related_document_id_ssim.
config.add_index_field 'book_title_ssim', label: 'Book Title', if: lambda { |context, *_args|
context.feature_flags.add_parker_index_fields?
}
config.add_index_field 'university_ssim', label: 'University', if: lambda { |context, *_args|
context.feature_flags.add_parker_index_fields?
}
config.add_index_field 'edition_ssm', label: 'Edition', if: lambda { |context, *_args|
context.feature_flags.add_parker_index_fields?
}
config.add_index_field 'range_labels_tesim', label: 'Section', if: lambda { |context, *_args|
context.feature_flags.add_parker_index_fields?
}
config.add_index_field 'related_document_id_ssim', label: 'Manuscript', helper_method: :manuscript_link,
if: lambda { |context, *_args|
context.feature_flags.add_parker_index_fields?
}

# Fields added by Zotero API BibTeX import
config.add_index_field 'volume_ssm', label: 'Volume'
config.add_index_field 'pages_ssm', label: 'Pages'
config.add_index_field 'doi_ssim', label: 'DOI'
config.add_index_field 'issue_ssm', label: 'Issue'
config.add_index_field 'edition_ssm', label: 'Edition'
config.add_index_field 'university_ssim', label: 'University'
config.add_index_field 'thesis_type_ssm', label: 'Degree Type'
config.add_index_field 'book_title_ssim', label: 'Book Title'
config.add_index_field 'ref_type_ssm', label: 'Reference Type'
# This was added for the Feigbenbaum exhibit. It includes any general <note> from
# the MODs that do not have attributes. It is used for display and is not facetable.
Expand All @@ -287,8 +304,6 @@ class CatalogController < ApplicationController
config.add_index_field 'incipit_tesim', label: 'Incipit'
config.add_index_field 'toc_search', label: 'Table of contents', helper_method: :table_of_contents_separator
config.add_index_field 'manuscript_number_tesim', label: 'Manuscript number'
config.add_index_field 'range_labels_tesim', label: 'Section'
config.add_index_field 'related_document_id_ssim', label: 'Manuscript', helper_method: :manuscript_link
config.add_index_field(
'full_text_tesimv',
immutable: (config.view.keys - [:list]).push(:show).map { |k| [k, false] }.to_h,
Expand Down
1 change: 1 addition & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ feature_flags:
index_related_content: false # A feature that will index related SDR content. Initial implemented for Parker's IIIF AnnotationLists
add_resource_type_index_field: false # Should the resource type field be added as an index/show field. For some exhibits this is desirable
add_parker_search_fields: false # Parker specific search fields
add_parker_index_fields: false # Parker specific index fields
slack_notifications: false
uat_embed: false
search_across: false
Expand Down

0 comments on commit 0ee6298

Please sign in to comment.