blacklight-spotlight 3.0.0.rc5 → 3.0.0.rc6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/spotlight/base.rb +1 -1
  3. data/app/controllers/spotlight/browse_controller.rb +5 -16
  4. data/app/controllers/spotlight/catalog_controller.rb +7 -5
  5. data/app/controllers/spotlight/dashboards_controller.rb +3 -3
  6. data/app/controllers/spotlight/pages_controller.rb +3 -5
  7. data/app/helpers/spotlight/application_helper.rb +1 -1
  8. data/app/helpers/spotlight/main_app_helpers.rb +3 -4
  9. data/app/helpers/spotlight/meta_helper.rb +2 -2
  10. data/app/helpers/spotlight/searches_helper.rb +1 -1
  11. data/app/models/concerns/spotlight/browse_category_search_builder.rb +59 -0
  12. data/app/models/concerns/spotlight/search_builder.rb +11 -0
  13. data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +9 -0
  14. data/app/models/spotlight/blacklight_configuration.rb +14 -5
  15. data/app/models/spotlight/page_configurations.rb +10 -9
  16. data/app/presenters/spotlight/iiif_manifest_presenter.rb +1 -1
  17. data/app/views/catalog/_add_tags.html.erb +1 -1
  18. data/app/views/catalog/_change_visibility.html.erb +1 -1
  19. data/app/views/catalog/_remove_tags.html.erb +1 -1
  20. data/app/views/catalog/_save_search.html.erb +1 -1
  21. data/app/views/spotlight/browse/_search_box.html.erb +9 -9
  22. data/app/views/spotlight/catalog/_admin_index_header_default.html.erb +1 -1
  23. data/app/views/spotlight/catalog/_admin_thumbnail_default.html.erb +3 -2
  24. data/app/views/spotlight/catalog/index.iiif_json.jbuilder +1 -1
  25. data/app/views/spotlight/featured_images/_form.html.erb +1 -1
  26. data/app/views/spotlight/metadata_configurations/_metadata_field.html.erb +2 -2
  27. data/app/views/spotlight/pages/_view_type_group.html.erb +3 -3
  28. data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +2 -2
  29. data/app/views/spotlight/searches/_form.html.erb +2 -2
  30. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb +5 -5
  31. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb +5 -5
  32. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb +7 -5
  33. data/app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb +3 -3
  34. data/config/routes.rb +1 -0
  35. data/db/migrate/20210308090000_migrate_caption_values_for_title_key.rb +29 -0
  36. data/lib/generators/spotlight/install_generator.rb +2 -2
  37. data/lib/spotlight/version.rb +1 -1
  38. data/spec/controllers/spotlight/browse_controller_spec.rb +0 -6
  39. data/spec/examples.txt +1489 -1488
  40. data/spec/features/javascript/blocks/solr_documents_block_spec.rb +1 -1
  41. data/spec/helpers/spotlight/application_helper_spec.rb +5 -5
  42. data/spec/models/spotlight/blacklight_configuration_spec.rb +14 -14
  43. data/spec/models/spotlight/browse_category_search_builder_spec.rb +49 -0
  44. data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +1 -1
  45. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  46. data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +3 -4
  47. data/spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb +1 -1
  48. data/spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb +1 -1
  49. data/spec/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb_spec.rb +1 -1
  50. data/spec/views/spotlight/sir_trevor/blocks/_rule_block.html.erb_spec.rb +1 -1
  51. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +8 -4
  52. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +7 -2
  53. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +8 -5
  54. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb_spec.rb +3 -2
  55. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +9 -4
  56. metadata +9 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e21e66d81a96d330d76726b9a41e44ea7495653b75d9d5b211f4a607cc4afec
4
- data.tar.gz: 9f6cc613d234db387773a9b80ae7a72e7c3610ab01996a116df4997668dc0703
3
+ metadata.gz: e12354462a54e6452e05a01e1dd5ee3bd423f64c715a4aee8e4fb2413ba3cd6b
4
+ data.tar.gz: 38e4d4d33090d3c53e01fe2b87f0b5f5448e49f6470aa893ee88c8f97271fef1
5
5
  SHA512:
6
- metadata.gz: dc889b0bf136bde52dcb6e8d99776be47261cff5e4310ad3297018e77d5d25818f46df0d874ac379dfa91f8177a648135e84f4ef0ee5810c30bc3d87c90caed8
7
- data.tar.gz: efe143a5c7125d9b6d18aa972d2a1c4357cf2c42f34ed62c0b2b402af4d16c6473087c63b3cb605a07127edb2f65a0d038772037bb7560ca5497a734f6b89bfd
6
+ metadata.gz: 51c662524cc71e728230452ef634762b44203d425f0b7acae6528b473657c9ff4b8d463d43702cb98abe8ed07ba67d5ecf8efce41dcb883b35389554a7841097
7
+ data.tar.gz: deb75ac5fc45e0261804bd17767d1410ab5654b5d9f7322f7aeb0c88a97ec32807ffc45d6f85fb42282649e8859a02279a304e8874720429a13555b1e2e486ce
@@ -32,7 +32,7 @@ module Spotlight
32
32
  def autocomplete_json_response_for_document(doc)
33
33
  {
34
34
  id: doc.id,
35
- title: CGI.unescapeHTML(view_context.presenter(doc).heading.to_str),
35
+ title: CGI.unescapeHTML(view_context.document_presenter(doc).heading.to_str),
36
36
  thumbnail: doc.first(blacklight_config.index.thumbnail_field),
37
37
  full_image_url: doc.first(Spotlight::Engine.config.full_image_field),
38
38
  description: doc.id,
@@ -15,13 +15,15 @@ module Spotlight
15
15
  before_action :attach_search_breadcrumb, only: :show
16
16
  record_search_parameters only: :show
17
17
 
18
- helper_method :should_render_spotlight_search_bar?, :presenter
18
+ helper_method :should_render_spotlight_search_bar?
19
19
 
20
20
  before_action :swap_actions_configuration, only: :show
21
21
 
22
22
  before_action do
23
23
  blacklight_config.track_search_session = false
24
- blacklight_config.view.gallery.classes = 'row-cols-2 row-cols-md-4'
24
+ blacklight_config.view.gallery.classes = 'row-cols-2 row-cols-md-4' if blacklight_config.view.key? :gallery
25
+ blacklight_config.action_mapping.default = blacklight_config.index
26
+ blacklight_config.action_mapping.show = blacklight_config.index
25
27
  end
26
28
 
27
29
  def index
@@ -31,15 +33,11 @@ module Spotlight
31
33
 
32
34
  def show
33
35
  @response, @document_list = search_service.search_results do |builder|
34
- builder.with(search_query)
36
+ builder.with(params.merge(browse_category_id: @search.id))
35
37
  end
36
38
 
37
39
  respond_to do |format|
38
40
  format.html
39
- format.json do
40
- @presenter = Blacklight::JsonPresenter.new(@response, blacklight_config)
41
- render template: 'catalog/index'
42
- end
43
41
  end
44
42
  end
45
43
 
@@ -50,11 +48,6 @@ module Spotlight
50
48
  blacklight_config.action_mapping.show.top_level_config = :index if blacklight_config.key?(:action_mapping)
51
49
  end
52
50
 
53
- def search_query
54
- @search.query_params['q'] = [@search.query_params['q'], params[:browse_q]].join(' ')
55
- @search.merge_params_for_search(params, blacklight_config)
56
- end
57
-
58
51
  ##
59
52
  # Browsing an exhibit should start a new search session
60
53
  def start_new_search_session?
@@ -128,10 +121,6 @@ module Spotlight
128
121
  Spotlight::Engine.config.default_browse_index_view_type
129
122
  end
130
123
 
131
- def presenter(document)
132
- view_context.index_presenter(document)
133
- end
134
-
135
124
  def render_save_this_search?
136
125
  false
137
126
  end
@@ -27,8 +27,7 @@ module Spotlight
27
27
 
28
28
  before_action only: :admin do
29
29
  blacklight_config.view.select! { |k, _v| k == :admin_table }
30
- blacklight_config.view.admin_table.partials = [:index_compact]
31
- blacklight_config.view.admin_table.document_actions = []
30
+ blacklight_config.view.admin_table(partials: [:index_compact], document_actions: []) unless blacklight_config.view.key? :admin_table
32
31
  blacklight_config.track_search_session = false
33
32
 
34
33
  unless blacklight_config.sort_fields.key? :timestamp
@@ -38,8 +37,7 @@ module Spotlight
38
37
  end
39
38
 
40
39
  before_action only: :edit do
41
- blacklight_config.view.edit.partials = blacklight_config.view_config(:show).partials.dup
42
- blacklight_config.view.edit.partials.insert(2, :edit)
40
+ blacklight_config.view.edit(partials: blacklight_config.view_config(:show).partials.dup.insert(2, :edit)) unless blacklight_config.view.key? :edit
43
41
  end
44
42
 
45
43
  def show
@@ -199,6 +197,10 @@ module Spotlight
199
197
  redirect_to spotlight.exhibit_root_path(@exhibit) unless has_search_parameters?
200
198
  end
201
199
 
200
+ def has_search_parameters? # rubocop:disable Naming/PredicateName
201
+ super || params[:browse_category_id].present?
202
+ end
203
+
202
204
  def add_breadcrumb_with_search_params
203
205
  return unless has_search_parameters?
204
206
 
@@ -216,7 +218,7 @@ module Spotlight
216
218
  add_breadcrumb t(:'spotlight.catalog.breadcrumb.index'), search_action_url(current_search_session.query_params)
217
219
  end
218
220
 
219
- add_breadcrumb view_context.show_presenter(document).heading, polymorphic_path([current_exhibit, document])
221
+ add_breadcrumb view_context.document_presenter(document).heading, polymorphic_path([current_exhibit, document])
220
222
  end
221
223
  # rubocop:enable Metrics/AbcSize
222
224
 
@@ -11,9 +11,9 @@ module Spotlight
11
11
  include Spotlight::SearchHelper
12
12
 
13
13
  before_action only: [:show] do
14
- blacklight_config.view.reject! { |_k, _v| true }
15
- blacklight_config.view.admin_table.partials = ['index_compact']
16
- blacklight_config.view.admin_table.document_actions = []
14
+ blacklight_config.action_mapping&.delete(:show)
15
+ blacklight_config.view.clear
16
+ blacklight_config.view.admin_table(partials: ['index_compact'], document_actions: [])
17
17
  blacklight_config.track_search_session = false
18
18
  blacklight_config.action_mapping.show.top_level_config = :index if blacklight_config.key?(:action_mapping)
19
19
  end
@@ -17,9 +17,11 @@ module Spotlight
17
17
  include Spotlight::Base
18
18
  include Blacklight::SearchContext
19
19
 
20
- helper_method :get_search_results, :search_results, :fetch, :page_collection_name, :presenter
20
+ helper_method :get_search_results, :search_results, :fetch, :page_collection_name
21
21
 
22
22
  before_action do
23
+ blacklight_config.action_mapping.default = blacklight_config.index
24
+ blacklight_config.action_mapping.show = blacklight_config.index
23
25
  blacklight_config.view.gallery.classes = 'row-cols-2 row-cols-md-4' unless @page&.display_sidebar
24
26
  end
25
27
 
@@ -204,10 +206,6 @@ module Spotlight
204
206
  raise ActiveRecord::RecordNotFound
205
207
  end
206
208
  end
207
-
208
- def presenter(document)
209
- view_context.index_presenter(document)
210
- end
211
209
  end
212
210
  # rubocop:enable Metrics/ClassLength
213
211
  end
@@ -92,7 +92,7 @@ module Spotlight
92
92
  # Helper to turn tag data into facets
93
93
  def url_to_tag_facet(tag)
94
94
  if current_exhibit
95
- search_action_url(search_state.reset.add_facet_params(:exhibit_tags, tag))
95
+ search_action_url(search_state.reset.filter(:exhibit_tags).add(tag).params)
96
96
  else
97
97
  search_action_url(q: tag)
98
98
  end
@@ -28,12 +28,11 @@ module Spotlight
28
28
  super
29
29
  end
30
30
 
31
- def presenter(document)
32
- case action_name
33
- when 'index'
31
+ def document_presenter_class(_document)
32
+ if action_name == 'index'
34
33
  super
35
34
  else
36
- show_presenter(document)
35
+ blacklight_config.view_config(action_name: :show).document_presenter_class
37
36
  end
38
37
  end
39
38
 
@@ -81,7 +81,7 @@ module Spotlight
81
81
  end
82
82
 
83
83
  def document_twitter_card_content(document)
84
- presenter = show_presenter(document)
84
+ presenter = document_presenter(document)
85
85
 
86
86
  twitter_card('summary_large_image') do |card|
87
87
  card.title presenter.heading
@@ -90,7 +90,7 @@ module Spotlight
90
90
  end
91
91
 
92
92
  def document_opengraph_content(document)
93
- presenter = show_presenter(document)
93
+ presenter = document_presenter(document)
94
94
 
95
95
  opengraph do |graph|
96
96
  graph.site_name application_name
@@ -4,7 +4,7 @@ module Spotlight
4
4
  # Saved search helpers
5
5
  module SearchesHelper
6
6
  def available_document_index_views
7
- blacklight_config.view.to_h.reject { |_k, v| v.if == false }.keys
7
+ blacklight_config.view.to_h.reject { |_k, v| v.if == false }
8
8
  end
9
9
  end
10
10
  end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spotlight
4
+ # Enforce exhibit visibility for index queries
5
+ module BrowseCategorySearchBuilder
6
+ extend ActiveSupport::Concern
7
+
8
+ included do
9
+ self.default_processor_chain = %i[apply_browse_category_defaults] +
10
+ default_processor_chain +
11
+ %i[fix_up_browse_category_defaults fix_up_browse_category_queries]
12
+ end
13
+
14
+ # Adds a filter that excludes resources that have been marked as not-visible
15
+ def apply_browse_category_defaults(solr_params)
16
+ return unless current_browse_category
17
+
18
+ solr_params.merge!(browse_category_search_builder.to_hash)
19
+ end
20
+
21
+ def fix_up_browse_category_defaults(solr_params)
22
+ return if current_browse_category.nil? || search_state.send(:sort_field_key).present?
23
+
24
+ solr_params[:sort] = browse_category_search_builder.sort
25
+ end
26
+
27
+ def fix_up_browse_category_queries(solr_params)
28
+ return unless solr_params.dig(:json, :query, :bool, :must) && blacklight_params[:q]
29
+
30
+ # This replicates existing spotlight 2.x search behavior, more or less. It
31
+ # doesn't take into account the possibility that the browse category query
32
+ # could use a different search field (which.. doesn't have an existing UI
33
+ # control.. and may require additional upstream work to properly encapsulate
34
+ # the two query parameters)
35
+ solr_params[:json][:query][:bool][:must].map! do |q|
36
+ q.is_a?(String) ? { edismax: { query: q } } : q
37
+ end
38
+ end
39
+
40
+ private
41
+
42
+ def current_exhibit
43
+ blacklight_config.current_exhibit
44
+ end
45
+
46
+ def current_browse_category
47
+ return unless current_exhibit && blacklight_params[:browse_category_id].present?
48
+
49
+ @current_browse_category ||= current_exhibit.searches.find(blacklight_params[:browse_category_id])
50
+ end
51
+
52
+ def browse_category_search_builder
53
+ @browse_category_search_builder ||= begin
54
+ search_builder = self.class.new(@processor_chain, @scope)
55
+ search_builder.with(current_browse_category.query_params)
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spotlight
4
+ # Enforce exhibit visibility for index queries
5
+ module SearchBuilder
6
+ extend ActiveSupport::Concern
7
+
8
+ include Spotlight::AccessControlsEnforcementSearchBuilder
9
+ include Spotlight::BrowseCategorySearchBuilder
10
+ end
11
+ end
@@ -43,6 +43,15 @@ module SirTrevorRails
43
43
  ActiveModel::Type::Boolean.new.cast(send(:'show-primary-caption'))
44
44
  end
45
45
 
46
+ def document_caption(presenter, caption_field, default: nil)
47
+ caption_field ||= default
48
+
49
+ return unless caption_field
50
+ return presenter.heading if caption_field == Spotlight::PageConfigurations::DOCUMENT_TITLE_KEY
51
+
52
+ presenter.field_value(solr_helper.blacklight_config.index_fields[caption_field] || Blacklight::Configuration::NullField.new(caption_field))
53
+ end
54
+
46
55
  def secondary_caption?
47
56
  secondary_caption_field.present? && show_secondary_caption?
48
57
  end
@@ -74,6 +74,14 @@ module Spotlight
74
74
 
75
75
  config.current_exhibit = exhibit
76
76
 
77
+ config.document_presenter_class = lambda do |context|
78
+ if context.action_name == 'index'
79
+ config.index.document_presenter_class
80
+ else
81
+ config.show.document_presenter_class
82
+ end
83
+ end
84
+
77
85
  config.show.merge! show unless show.blank?
78
86
  config.index.merge! index unless index.blank?
79
87
  config.index.respond_to[:iiif_json] = true
@@ -84,22 +92,23 @@ module Spotlight
84
92
 
85
93
  unless config.curator_actions
86
94
  config.curator_actions ||= Blacklight::NestedOpenStructWithHashAccess.new(Blacklight::Configuration::ToolConfig)
87
- config.curator_actions.save_search
88
- config.curator_actions.bulk_actions
95
+ config.curator_actions.save_search!
96
+ config.curator_actions.bulk_actions!
89
97
  end
90
98
 
91
99
  unless config.bulk_actions
92
100
  config.bulk_actions ||= Blacklight::NestedOpenStructWithHashAccess.new(Blacklight::Configuration::ToolConfig)
93
101
 
94
- config.bulk_actions.change_visibility
95
- config.bulk_actions.add_tags
96
- config.bulk_actions.remove_tags
102
+ config.bulk_actions.change_visibility!
103
+ config.bulk_actions.add_tags!
104
+ config.bulk_actions.remove_tags!
97
105
  end
98
106
 
99
107
  config.default_solr_params = config.default_solr_params.merge(default_solr_params)
100
108
 
101
109
  config.default_per_page = default_per_page if default_per_page
102
110
 
111
+ config.view.embed!
103
112
  config.view.embed.partials ||= ['openseadragon']
104
113
  config.view.embed.if = false
105
114
  config.view.embed.locals ||= { osd_container_class: '' }
@@ -18,14 +18,12 @@ module Spotlight
18
18
  delegate :available_view_fields,
19
19
  :blacklight_config,
20
20
  :current_exhibit,
21
- :document_show_link_field,
22
- :index_fields,
23
- :index_field_label,
24
21
  :spotlight,
25
22
  :t,
26
- :view_label,
27
23
  to: :context
28
24
 
25
+ DOCUMENT_TITLE_KEY = '__spotlight_document_title___'
26
+
29
27
  attr_reader :context, :page
30
28
 
31
29
  def initialize(context:, page:)
@@ -35,7 +33,7 @@ module Spotlight
35
33
 
36
34
  def as_json(*)
37
35
  {
38
- 'blacklight-configuration-index-fields': available_index_fields,
36
+ 'blacklight-configuration-index-fields': available_caption_fields,
39
37
  'blacklight-configuration-search-views': available_view_configs,
40
38
  'attachment-endpoint': attachment_endpoint,
41
39
  'autocomplete-exhibit-catalog-path': exhibit_autocomplete_endpoint,
@@ -48,15 +46,18 @@ module Spotlight
48
46
 
49
47
  private
50
48
 
51
- def available_index_fields
52
- fields = blacklight_config.index_fields.map { |k, _v| { key: k, label: index_field_label(blacklight_config.document_model.new, k) } }
53
- fields.unshift(key: document_show_link_field, label: t(:'spotlight.pages.form.title_placeholder')) unless index_fields.include? document_show_link_field
49
+ def available_caption_fields
50
+ default_caption_fields + blacklight_config.index_fields.reject { |_k, v| v.caption == false }.map { |k, v| { key: k, label: v.display_label } }
51
+ end
54
52
 
53
+ def default_caption_fields
54
+ fields = []
55
+ fields << { key: DOCUMENT_TITLE_KEY, label: t(:'spotlight.pages.form.title_placeholder') } unless blacklight_config.index_fields.key? DOCUMENT_TITLE_KEY
55
56
  fields
56
57
  end
57
58
 
58
59
  def available_view_configs
59
- available_view_fields.map { |k, _| { key: k, label: view_label(k) } }
60
+ available_view_fields.map { |k, v| { key: k, label: v.display_label(k) } }
60
61
  end
61
62
 
62
63
  def attachment_endpoint
@@ -70,7 +70,7 @@ module Spotlight
70
70
  private
71
71
 
72
72
  def presenter
73
- controller.view_context.show_presenter(resource)
73
+ controller.view_context.document_presenter(resource)
74
74
  end
75
75
 
76
76
  def endpoint
@@ -16,7 +16,7 @@
16
16
  <%= label_tag :tags, t(:'spotlight.bulk_actions.add_tags.label') %>
17
17
  <%= text_field_tag :tags, '', class: 'form-control', data: { autocomplete_tag: true, autocomplete_url: exhibit_tags_path(current_exhibit, format: 'json')} %>
18
18
  </div>
19
- <%= render_hash_as_hidden_fields(search_state.params_for_search) %>
19
+ <%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search) %>
20
20
  </div>
21
21
  <div class="modal-footer d-flex flex-row-reverse justify-content-start">
22
22
  <%= f.submit t(:'spotlight.bulk_actions.add'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
@@ -23,7 +23,7 @@
23
23
  <% end %>
24
24
  </div>
25
25
  <% end %>
26
- <%= render_hash_as_hidden_fields(search_state.params_for_search) %>
26
+ <%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search) %>
27
27
  </div>
28
28
  <div class="modal-footer d-flex flex-row-reverse justify-content-start">
29
29
  <%= f.submit t(:'spotlight.bulk_actions.change'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
@@ -25,7 +25,7 @@
25
25
  <%= label_tag :tags, t(:'spotlight.bulk_actions.remove_tags.label') %>
26
26
  <%= text_field_tag :tags, '', class: 'form-control', data: { autocomplete_tag: true, autocomplete_url: exhibit_tags_path(current_exhibit, format: 'json')} %>
27
27
  </div>
28
- <%= render_hash_as_hidden_fields(search_state.params_for_search) %>
28
+ <%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search) %>
29
29
  </div>
30
30
  <div class="modal-footer d-flex flex-row-reverse justify-content-start">
31
31
  <%= f.submit t(:'spotlight.bulk_actions.remove'), class: 'btn btn-primary', data: { confirm: t(:'spotlight.bulk_actions.confirm') } %>
@@ -13,7 +13,7 @@
13
13
  <%= f.text_field :title, label: t(:'spotlight.saved_search.title') %>
14
14
  <%= label_tag :id, t(:'spotlight.saved_search.id'), class: 'col-form-label' %>
15
15
  <%= select_tag :id, options_for_select(current_exhibit.searches.map { |s| [s.full_title, s.id] }), include_blank: true, class: 'form-control' %>
16
- <%= render_hash_as_hidden_fields(search_state.params_for_search.except(:qt, :page, :utf8)) %>
16
+ <%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search.except(:qt, :page)) %>
17
17
  </div>
18
18
  <div class="modal-footer d-flex flex-row-reverse justify-content-start">
19
19
  <%= f.submit nil, class: 'btn btn-primary' %>