Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display specific fields in the index and metadata configuration page only for Parker exhibit #2643

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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', 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