Skip to content

Commit

Permalink
Pass the icon key to the render_view_type_group_icon helper
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Apr 21, 2021
1 parent 560af8a commit 465917e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize(view:, key: nil, selected: false, search_state: nil, classes: 'bt
end

def icon
@view_context.render_view_type_group_icon(@view)
@view_context.render_view_type_group_icon(@view.icon || @key)
end

def label
Expand Down
2 changes: 2 additions & 0 deletions lib/blacklight/configuration/view_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class ViewConfig < Blacklight::OpenStructWithHashAccess
# @return [String, Symbol] solr field to use to render a document title
# @!attribute display_type_field
# @return [String, Symbol] solr field to use to render format-specific partials
# @!attribute icon
# @return [String, Symbol] icon file to use in the view picker
# @!attribute document_actions
# @return [NestedOpenStructWithHashAccess{Symbol => Blacklight::Configuration::ToolConfig}] 'tools' to render for each document
def search_bar_presenter_class
Expand Down

0 comments on commit 465917e

Please sign in to comment.