blacklight 7.14.0 → 7.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -2
  3. data/VERSION +1 -1
  4. data/app/assets/stylesheets/blacklight/_header.scss +0 -5
  5. data/app/assets/stylesheets/blacklight/_icons.scss +5 -1
  6. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +5 -1
  7. data/app/components/blacklight/advanced_search_form_component.html.erb +46 -0
  8. data/app/components/blacklight/advanced_search_form_component.rb +75 -0
  9. data/app/components/blacklight/constraint_component.html.erb +1 -1
  10. data/app/components/blacklight/constraint_layout_component.html.erb +1 -1
  11. data/app/components/blacklight/constraints_component.rb +36 -17
  12. data/app/components/blacklight/document/action_component.html.erb +1 -1
  13. data/app/components/blacklight/document/action_component.rb +2 -1
  14. data/app/components/blacklight/document/actions_component.html.erb +1 -1
  15. data/app/components/blacklight/document/actions_component.rb +2 -1
  16. data/app/components/blacklight/document/thumbnail_component.html.erb +1 -1
  17. data/app/components/blacklight/document/thumbnail_component.rb +4 -1
  18. data/app/components/blacklight/document_component.rb +7 -2
  19. data/app/components/blacklight/document_metadata_component.rb +1 -1
  20. data/app/components/blacklight/facet_field_checkboxes_component.html.erb +23 -0
  21. data/app/components/blacklight/facet_field_checkboxes_component.rb +24 -0
  22. data/app/components/blacklight/facet_field_inclusive_constraint_component.html.erb +6 -0
  23. data/app/components/blacklight/facet_field_inclusive_constraint_component.rb +29 -0
  24. data/app/components/blacklight/facet_field_list_component.html.erb +1 -0
  25. data/app/components/blacklight/facet_field_pagination_component.rb +1 -1
  26. data/app/components/blacklight/facet_item_component.rb +4 -2
  27. data/app/components/blacklight/search_bar_component.html.erb +4 -0
  28. data/app/components/blacklight/search_bar_component.rb +9 -3
  29. data/app/controllers/concerns/blacklight/bookmarks.rb +1 -1
  30. data/app/controllers/concerns/blacklight/catalog.rb +7 -1
  31. data/app/helpers/blacklight/blacklight_helper_behavior.rb +3 -4
  32. data/app/helpers/blacklight/component_helper_behavior.rb +2 -2
  33. data/app/helpers/blacklight/configuration_helper_behavior.rb +4 -4
  34. data/app/helpers/blacklight/facets_helper_behavior.rb +1 -1
  35. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +2 -2
  36. data/app/models/concerns/blacklight/suggest/response.rb +1 -1
  37. data/app/presenters/blacklight/clause_presenter.rb +37 -0
  38. data/app/presenters/blacklight/document_presenter.rb +13 -5
  39. data/app/presenters/blacklight/facet_field_presenter.rb +4 -0
  40. data/app/presenters/blacklight/facet_grouped_item_presenter.rb +45 -0
  41. data/app/presenters/blacklight/facet_item_presenter.rb +32 -20
  42. data/app/presenters/blacklight/field_presenter.rb +1 -1
  43. data/app/presenters/blacklight/inclusive_facet_item_presenter.rb +16 -0
  44. data/app/presenters/blacklight/rendering/helper_method.rb +4 -4
  45. data/app/presenters/blacklight/search_bar_presenter.rb +4 -0
  46. data/app/services/blacklight/search_service.rb +1 -1
  47. data/app/views/bookmarks/_tools.html.erb +1 -1
  48. data/app/views/catalog/_advanced_search_form.html.erb +7 -0
  49. data/app/views/catalog/_advanced_search_help.html.erb +24 -0
  50. data/app/views/catalog/_search_form.html.erb +1 -0
  51. data/app/views/catalog/_show_main_content.html.erb +2 -2
  52. data/app/views/catalog/_zero_results.html.erb +1 -1
  53. data/app/views/catalog/advanced_search.html.erb +17 -0
  54. data/blacklight.gemspec +1 -1
  55. data/config/i18n-tasks.yml +1 -0
  56. data/config/locales/blacklight.en.yml +17 -0
  57. data/lib/blacklight/configuration.rb +52 -6
  58. data/lib/blacklight/configuration/field.rb +1 -1
  59. data/lib/blacklight/configuration/sort_field.rb +1 -1
  60. data/lib/blacklight/configuration/view_config.rb +16 -5
  61. data/lib/blacklight/open_struct_with_hash_access.rb +22 -1
  62. data/lib/blacklight/routes/searchable.rb +1 -0
  63. data/lib/blacklight/search_builder.rb +2 -0
  64. data/lib/blacklight/search_state.rb +7 -3
  65. data/lib/blacklight/search_state/filter_field.rb +17 -7
  66. data/lib/blacklight/solr/repository.rb +11 -2
  67. data/lib/blacklight/solr/search_builder_behavior.rb +98 -24
  68. data/spec/components/blacklight/advanced_search_form_component_spec.rb +51 -0
  69. data/spec/components/blacklight/document_component_spec.rb +15 -0
  70. data/spec/components/blacklight/facet_field_checkboxes_component_spec.rb +55 -0
  71. data/spec/components/blacklight/facet_field_list_component_spec.rb +39 -4
  72. data/spec/controllers/catalog_controller_spec.rb +9 -0
  73. data/spec/features/advanced_search_spec.rb +67 -0
  74. data/spec/features/bookmarks_spec.rb +1 -9
  75. data/spec/lib/blacklight/configuration/view_config_spec.rb +1 -1
  76. data/spec/lib/blacklight/open_struct_with_hash_access_spec.rb +20 -0
  77. data/spec/lib/blacklight/search_state/filter_field_spec.rb +65 -0
  78. data/spec/models/blacklight/configuration_spec.rb +64 -0
  79. data/spec/models/blacklight/solr/repository_spec.rb +12 -0
  80. data/spec/models/blacklight/solr/search_builder_spec.rb +60 -0
  81. data/spec/presenters/blacklight/clause_presenter_spec.rb +34 -0
  82. data/spec/presenters/blacklight/document_presenter_spec.rb +13 -0
  83. data/spec/presenters/blacklight/facet_grouped_item_presenter_spec.rb +41 -0
  84. data/spec/views/catalog/index.atom.builder_spec.rb +1 -1
  85. metadata +29 -7
@@ -0,0 +1,6 @@
1
+ <div class="inclusive_or card card-body bg-light mb-3">
2
+ <h5><%= t('blacklight.advanced_search.any_of') %></h5>
3
+ <ul class="list-unstyled facet-values">
4
+ <%= @view_context.render(Blacklight::FacetItemComponent.with_collection(presenters.to_a)) %>
5
+ </ul>
6
+ </div>
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Blacklight
4
+ class FacetFieldInclusiveConstraintComponent < ::ViewComponent::Base
5
+ with_collection_parameter :facet_field
6
+
7
+ def initialize(facet_field:, values: nil)
8
+ @facet_field = facet_field
9
+ @values = values
10
+ end
11
+
12
+ def values
13
+ @values ||= @facet_field.values.find { |v| v.is_a? Array }
14
+ @values || []
15
+ end
16
+
17
+ def render?
18
+ values.present?
19
+ end
20
+
21
+ def presenters
22
+ return to_enum(:presenters) unless block_given?
23
+
24
+ values.each do |item|
25
+ yield Blacklight::FacetGroupedItemPresenter.new(values, item, @facet_field.facet_field, @view_context, @facet_field.key, @facet_field.search_state)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -3,6 +3,7 @@
3
3
  <%= @facet_field.label %>
4
4
  <% end %>
5
5
  <% component.with(:body) do %>
6
+ <%= @view_context.render(Blacklight::FacetFieldInclusiveConstraintComponent.new(facet_field: @facet_field)) %>
6
7
  <ul class="facet-values list-unstyled">
7
8
  <%= render_facet_limit_list @facet_field.paginator, @facet_field.key %>
8
9
  </ul>
@@ -7,7 +7,7 @@ module Blacklight
7
7
  end
8
8
 
9
9
  def sort_facet_url(sort)
10
- @facet_field.paginator.params_for_resort_url(sort, @facet_fieldsearch_state.to_h)
10
+ @facet_field.paginator.params_for_resort_url(sort, @facet_field.search_state.to_h)
11
11
  end
12
12
 
13
13
  def param_name
@@ -86,8 +86,8 @@ module Blacklight
86
86
  tag.span(@label, class: "selected") +
87
87
  # remove link
88
88
  link_to(@href, class: "remove") do
89
- tag.span('✖', class: "remove-icon") +
90
- tag.span('[remove]', class: 'sr-only')
89
+ tag.span('✖', class: "remove-icon", aria: { hidden: true }) +
90
+ tag.span(@view_context.t(:'blacklight.search.facets.selected.remove'), class: 'sr-only')
91
91
  end
92
92
  end + render_facet_count(classes: ["selected"])
93
93
  end
@@ -103,6 +103,8 @@ module Blacklight
103
103
  def render_facet_count(options = {})
104
104
  return @view_context.render_facet_count(@hits, options) unless @view_context.method(:render_facet_count).owner == Blacklight::FacetsHelperBehavior || explicit_component_configuration?
105
105
 
106
+ return '' if @hits.blank?
107
+
106
108
  classes = (options[:classes] || []) << "facet-count"
107
109
  tag.span(t('blacklight.search.facets.count', number: number_with_delimiter(@hits)), class: classes)
108
110
  end
@@ -29,3 +29,7 @@
29
29
  </span>
30
30
  </div>
31
31
  <% end %>
32
+
33
+ <% if presenter.advanced_search_enabled? %>
34
+ <%= link_to t('blacklight.advanced_search.more_options'), @advanced_search_url, class: 'advanced_search btn btn-secondary'%>
35
+ <% end %>
@@ -6,12 +6,14 @@ module Blacklight
6
6
 
7
7
  # rubocop:disable Metrics/ParameterLists
8
8
  def initialize(
9
- url:, params:, classes: ['search-query-form'], presenter: nil,
10
- prefix: '', method: 'GET', q: nil, query_param: :q,
9
+ url:, advanced_search_url: nil, params:,
10
+ classes: ['search-query-form'], presenter: nil, prefix: '',
11
+ method: 'GET', q: nil, query_param: :q,
11
12
  search_field: nil, search_fields: [], autocomplete_path: nil,
12
13
  autofocus: nil, i18n: { scope: 'blacklight.search.form' }
13
14
  )
14
15
  @url = url
16
+ @advanced_search_url = advanced_search_url
15
17
  @q = q || params[:q]
16
18
  @query_param = query_param
17
19
  @search_field = search_field || params[:search_field]
@@ -44,7 +46,11 @@ module Blacklight
44
46
  private
45
47
 
46
48
  def presenter
47
- @presenter ||= blacklight_config.index.search_bar_presenter_class.new(controller, blacklight_config)
49
+ @presenter ||= presenter_class.new(controller, blacklight_config)
50
+ end
51
+
52
+ def presenter_class
53
+ blacklight_config.view_config(action_name: :index).search_bar_presenter_class
48
54
  end
49
55
 
50
56
  def blacklight_config
@@ -25,7 +25,7 @@ module Blacklight::Bookmarks
25
25
  def action_documents
26
26
  bookmarks = token_or_current_or_guest_user.bookmarks
27
27
  bookmark_ids = bookmarks.collect { |b| b.document_id.to_s }
28
- search_service.fetch(bookmark_ids)
28
+ search_service.fetch(bookmark_ids, rows: bookmark_ids.count)
29
29
  end
30
30
 
31
31
  def action_success_redirect_path
@@ -56,6 +56,12 @@ module Blacklight::Catalog
56
56
  end
57
57
  end
58
58
 
59
+ def advanced_search
60
+ empty_service = search_service_class.new(config: blacklight_config, user_params: {}, **search_service_context)
61
+
62
+ (@response, _deprecated_document_list) = empty_service.search_results
63
+ end
64
+
59
65
  # get a single document from the index
60
66
  def raw
61
67
  raise(ActionController::RoutingError, 'Not Found') unless blacklight_config.raw_endpoint.enabled
@@ -192,7 +198,7 @@ module Blacklight::Catalog
192
198
  # @example
193
199
  # config.index.respond_to.txt = Proc.new { render plain: "A list of docs." }
194
200
  def additional_response_formats(format)
195
- blacklight_config.index.respond_to.each do |key, config|
201
+ blacklight_config.view_config(action_name: :index).respond_to.each do |key, config|
196
202
  format.send key do
197
203
  case config
198
204
  when false
@@ -380,7 +380,7 @@ module Blacklight::BlacklightHelperBehavior
380
380
  def show_presenter_class(_document)
381
381
  Deprecation.warn(Blacklight::BlacklightHelperBehavior, '#show_presenter_class is deprecated; use #document_presenter_class instead')
382
382
 
383
- blacklight_config.show.document_presenter_class
383
+ blacklight_config.view_config(:show, action_name: action_name).document_presenter_class
384
384
  end
385
385
 
386
386
  # @deprecated
@@ -388,13 +388,12 @@ module Blacklight::BlacklightHelperBehavior
388
388
  def index_presenter_class(_document)
389
389
  Deprecation.warn(Blacklight::BlacklightHelperBehavior, '#index_presenter_class is deprecated; use #document_presenter_class instead')
390
390
 
391
- (blacklight_config.view.key?(document_index_view_type) && blacklight_config.dig(:view, document_index_view_type, :document_presenter_class)) ||
392
- blacklight_config.index.document_presenter_class
391
+ blacklight_config.view_config(document_index_view_type, action_name: action_name).document_presenter_class
393
392
  end
394
393
 
395
394
  # @return [Class]
396
395
  def search_bar_presenter_class
397
- blacklight_config.index.search_bar_presenter_class
396
+ blacklight_config.view_config(action_name: :index).search_bar_presenter_class
398
397
  end
399
398
 
400
399
  # @!group Layout helpers
@@ -94,11 +94,11 @@ module Blacklight
94
94
  end
95
95
 
96
96
  def show_doc_actions?(document = @document, options = {})
97
- filter_partials(blacklight_config.show.document_actions, { document: document }.merge(options)).any?
97
+ filter_partials(blacklight_config.view_config(:show).document_actions, { document: document }.merge(options)).any?
98
98
  end
99
99
 
100
100
  def document_actions(document, options: {})
101
- filter_partials(blacklight_config.show.document_actions, { document: document }.merge(options)).map { |_k, v| v }
101
+ filter_partials(blacklight_config.view_config(:show).document_actions, { document: document }.merge(options)).map { |_k, v| v }
102
102
  end
103
103
 
104
104
  private
@@ -101,9 +101,9 @@ module Blacklight::ConfigurationHelperBehavior
101
101
 
102
102
  # Return the label for a search view
103
103
  # @return [String]
104
- def view_label view
104
+ def view_label(view)
105
105
  view_config = blacklight_config.view[view]
106
- view_config.display_label(view)
106
+ view_config.display_label
107
107
  end
108
108
  deprecation_deprecate view_label: 'Moving to ViewConfig#display_label and Blacklight::Response::ViewTypeComponent'
109
109
 
@@ -189,7 +189,7 @@ module Blacklight::ConfigurationHelperBehavior
189
189
 
190
190
  field = fields.first if document.nil?
191
191
  field ||= fields.find { |f| document.has? f }
192
- field &&= field.try(:to_sym)
192
+ field &&= field&.to_sym
193
193
 
194
194
  field
195
195
  end
@@ -198,7 +198,7 @@ module Blacklight::ConfigurationHelperBehavior
198
198
  ##
199
199
  # Default sort field
200
200
  def default_sort_field
201
- (active_sort_fields.find { |_k, config| config.respond_to?(:default) && config.default } || active_sort_fields.first).try(:last)
201
+ (active_sort_fields.find { |_k, config| config.respond_to?(:default) && config.default } || active_sort_fields.first)&.last
202
202
  end
203
203
 
204
204
  ##
@@ -180,7 +180,7 @@ module Blacklight::FacetsHelperBehavior
180
180
  # @return [String]
181
181
  def facet_partial_name(display_facet = nil)
182
182
  config = facet_configuration_for_field(display_facet.name)
183
- name = config.try(:partial)
183
+ name = config.partial
184
184
  name ||= "facet_pivot" if config.pivot
185
185
  name || "facet_limit"
186
186
  end
@@ -88,8 +88,8 @@ module Blacklight::RenderConstraintsHelperBehavior
88
88
  return "".html_safe if search_state.filter_params.blank?
89
89
 
90
90
  Deprecation.silence(Blacklight::RenderConstraintsHelperBehavior) do
91
- safe_join(search_state.filter_params.each_pair.map do |facet, values|
92
- render_filter_element(facet, values, search_state)
91
+ safe_join(search_state.filters.map do |field|
92
+ render_filter_element(field.key, field.values, search_state)
93
93
  end, "\n")
94
94
  end
95
95
  end
@@ -22,7 +22,7 @@ module Blacklight
22
22
  # present
23
23
  # @return [Array]
24
24
  def suggestions
25
- (response.try(:[], suggest_path).try(:[], suggester_name).try(:[], request_params[:q]).try(:[], 'suggestions') || []).uniq
25
+ (response.dig(suggest_path, suggester_name, request_params[:q], 'suggestions') || []).uniq
26
26
  end
27
27
  end
28
28
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Blacklight
4
+ class ClausePresenter
5
+ attr_reader :key, :user_parameters, :field_config, :view_context, :search_state
6
+
7
+ def initialize(key, user_parameters, field_config, view_context, search_state = view_context.search_state)
8
+ @key = key
9
+ @user_parameters = user_parameters
10
+ @field_config = field_config
11
+ @view_context = view_context
12
+ @search_state = search_state
13
+ end
14
+
15
+ def field_label
16
+ field_config.display_label('search')
17
+ end
18
+
19
+ ##
20
+ # Get the displayable version of a facet's value
21
+ #
22
+ # @return [String]
23
+ def label
24
+ user_parameters[:query]
25
+ end
26
+
27
+ def remove_href(path = search_state)
28
+ view_context.search_action_path(path.reset_search(clause: path.clause_params.except(key)))
29
+ end
30
+
31
+ private
32
+
33
+ def facet_field_presenter
34
+ @facet_field_presenter ||= view_context.facet_field_presenter(facet_config, {})
35
+ end
36
+ end
37
+ end
@@ -72,9 +72,9 @@ module Blacklight
72
72
  fields += Array.wrap(view_config[:"#{base_name}_display_type_field"]) if base_name && view_config.key?(:"#{base_name}_display_type_field")
73
73
  fields += Array.wrap(view_config.display_type_field)
74
74
 
75
- if fields.empty?
76
- fields += Array.wrap(configuration.show[:"#{base_name}_display_type_field"]) if base_name && configuration.show.key?(:"#{base_name}_display_type_field")
77
- fields += Array.wrap(configuration.show.display_type_field)
75
+ if fields.empty? && show_view_config != view_config
76
+ fields += Array.wrap(show_view_config[:"#{base_name}_display_type_field"]) if base_name && show_view_config.key?(:"#{base_name}_display_type_field")
77
+ fields += Array.wrap(show_view_config.display_type_field)
78
78
  end
79
79
 
80
80
  fields += ['format'] if fields.empty? # backwards compatibility with the old default value for display_type_field
@@ -97,8 +97,12 @@ module Blacklight
97
97
  field_presenter(field_config, options).render
98
98
  end
99
99
 
100
+ def thumbnail_presenter_class
101
+ view_config.thumbnail_presenter || thumbnail_presenter
102
+ end
103
+
100
104
  def thumbnail
101
- @thumbnail ||= thumbnail_presenter.new(document, view_context, view_config)
105
+ @thumbnail ||= thumbnail_presenter_class.new(document, view_context, view_config)
102
106
  end
103
107
 
104
108
  ##
@@ -114,7 +118,11 @@ module Blacklight
114
118
  end
115
119
 
116
120
  def view_config
117
- @view_config ||= configuration.view_config(:show)
121
+ @view_config ||= show_view_config
122
+ end
123
+
124
+ def show_view_config
125
+ configuration.view_config(:show)
118
126
  end
119
127
 
120
128
  private
@@ -40,6 +40,10 @@ module Blacklight
40
40
  view_context.facet_field_label(key)
41
41
  end
42
42
 
43
+ def values
44
+ search_state&.filter(facet_field)&.values || []
45
+ end
46
+
43
47
  # @private
44
48
  # @deprecated
45
49
  def html_id
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Blacklight
4
+ class FacetGroupedItemPresenter < Blacklight::FacetItemPresenter
5
+ attr_reader :group
6
+
7
+ delegate :key, to: :facet_config
8
+
9
+ def initialize(group, facet_item, facet_config, view_context, facet_field, search_state = view_context.search_state)
10
+ @group = group
11
+ @facet_item = facet_item
12
+ @facet_config = facet_config
13
+ @view_context = view_context
14
+ @facet_field = facet_field
15
+ @search_state = search_state
16
+ end
17
+
18
+ ##
19
+ # Check if the query parameters have the given facet field with the
20
+ # given value.
21
+ def selected?
22
+ group.include?(facet_item)
23
+ end
24
+
25
+ # @private
26
+ def remove_href(path = search_state)
27
+ new_state = path.filter(facet_config).remove(group)
28
+ new_state = new_state.filter(facet_config).add(group - [facet_item])
29
+
30
+ view_context.search_action_path(new_state)
31
+ end
32
+
33
+ # @private
34
+ def add_href(_path_options = {})
35
+ if facet_config.url_method
36
+ return view_context.public_send(facet_config.url_method, facet_config.key, facet_item)
37
+ end
38
+
39
+ new_state = search_state.filter(facet_config).remove(@group)
40
+ new_state = new_state.filter(facet_config).add(@group + [facet_item])
41
+
42
+ view_context.search_action_path(new_state)
43
+ end
44
+ end
45
+ end
@@ -4,7 +4,7 @@ module Blacklight
4
4
  class FacetItemPresenter
5
5
  attr_reader :facet_item, :facet_config, :view_context, :search_state, :facet_field
6
6
 
7
- delegate :hits, :items, to: :facet_item
7
+ delegate :key, to: :facet_config
8
8
 
9
9
  def initialize(facet_item, facet_config, view_context, facet_field, search_state = view_context.search_state)
10
10
  @facet_item = facet_item
@@ -14,12 +14,24 @@ module Blacklight
14
14
  @search_state = search_state
15
15
  end
16
16
 
17
+ def hits
18
+ return unless @facet_item.respond_to? :hits
19
+
20
+ @facet_item.hits
21
+ end
22
+
23
+ def items
24
+ return unless @facet_item.respond_to? :items
25
+
26
+ @facet_item.items
27
+ end
28
+
17
29
  ##
18
30
  # Check if the query parameters have the given facet field with the
19
31
  # given value.
20
32
  def selected?
21
33
  Deprecation.silence(Blacklight::SearchState) do
22
- search_state.has_facet? facet_config, value: facet_value
34
+ search_state.has_facet? facet_config, value: value
23
35
  end
24
36
  end
25
37
 
@@ -34,21 +46,29 @@ module Blacklight
34
46
  def label
35
47
  return @view_context.facet_display_value(@facet_field, @facet_item) unless @view_context.method(:facet_display_value).owner == Blacklight::FacetsHelperBehavior
36
48
 
37
- value = if facet_item.respond_to? :label
38
- facet_item.label
39
- else
40
- facet_value
41
- end
49
+ label_value = if facet_item.respond_to? :label
50
+ facet_item.label
51
+ else
52
+ value
53
+ end
42
54
 
43
55
  if facet_config.helper_method
44
- view_context.public_send(facet_config.helper_method, value)
45
- elsif facet_config.query && facet_config.query[value]
46
- facet_config.query[value][:label]
56
+ view_context.public_send(facet_config.helper_method, label_value)
57
+ elsif facet_config.query && facet_config.query[label_value]
58
+ facet_config.query[label_value][:label]
47
59
  elsif facet_config.date
48
60
  localization_options = facet_config.date == true ? {} : facet_config.date
49
- I18n.l(Time.zone.parse(value), **localization_options)
61
+ I18n.l(Time.zone.parse(label_value), **localization_options)
62
+ else
63
+ label_value
64
+ end
65
+ end
66
+
67
+ def value
68
+ if facet_item.respond_to? :value
69
+ facet_item.value
50
70
  else
51
- value
71
+ facet_item
52
72
  end
53
73
  end
54
74
 
@@ -78,14 +98,6 @@ module Blacklight
78
98
 
79
99
  private
80
100
 
81
- def facet_value
82
- if facet_item.respond_to? :value
83
- facet_item.value
84
- else
85
- facet_item
86
- end
87
- end
88
-
89
101
  def facet_field_presenter
90
102
  @facet_field_presenter ||= view_context.facet_field_presenter(facet_config, {})
91
103
  end