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

Adding label to auto-injected exhibit_tags field #2843

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 13 additions & 4 deletions app/models/spotlight/blacklight_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,22 @@ def add_exhibit_specific_fields(config)
def add_exhibit_tags_fields(config)
# rubocop:disable Style/GuardClause
unless config.show_fields.include? :exhibit_tags
config.add_show_field :exhibit_tags, field: config.document_model.solr_field_for_tagger(exhibit),
link_to_facet: true,
separator_options: { words_connector: nil, two_words_connector: nil, last_word_connector: nil }
config.add_show_field(
:exhibit_tags,
field: config.document_model.solr_field_for_tagger(exhibit),
link_to_facet: true,
separator_options: { words_connector: nil, two_words_connector: nil, last_word_connector: nil },
label: I18n.t('spotlight.search.fields.facet.exhibit_tags')
jeremyf marked this conversation as resolved.
Show resolved Hide resolved
)
end

unless config.facet_fields.include? :exhibit_tags
config.add_facet_field :exhibit_tags, field: config.document_model.solr_field_for_tagger(exhibit), limit: true
config.add_facet_field(
:exhibit_tags,
field: config.document_model.solr_field_for_tagger(exhibit),
limit: true,
label: I18n.t('spotlight.search.fields.facet.exhibit_tags')
)
end
# rubocop:enable Style/GuardClause
end
Expand Down
1 change: 1 addition & 0 deletions config/locales/spotlight.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ en:
fields:
abstract_tesim: Abstract
corporate_name_ssm: Corporate names
exhibit_tags: Exhibit tags
facet:
corporate_name_ssm: Corporate names
exhibit_tags: Exhibit tags
Expand Down