Skip to content

Commit

Permalink
Adding label to auto-injected exhibit_tags field
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyf committed Sep 16, 2022
1 parent ebed5d6 commit acea401
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
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')
)
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

0 comments on commit acea401

Please sign in to comment.