app/presenters/blacklight/facet_item_presenter.rb in blacklight-7.11.1 vs app/presenters/blacklight/facet_item_presenter.rb in blacklight-7.12.0
- old
+ new
@@ -19,10 +19,14 @@
# given value.
def selected?
search_state.has_facet? facet_config, value: facet_value
end
+ def field_label
+ facet_field_presenter.label
+ end
+
##
# Get the displayable version of a facet's value
#
# @return [String]
def label
@@ -74,8 +78,12 @@
if facet_item.respond_to? :value
facet_item.value
else
facet_item
end
+ end
+
+ def facet_field_presenter
+ @facet_field_presenter ||= view_context.facet_field_presenter(facet_config, {})
end
end
end