Class: Arclight::SearchResultComponent

Inherits:
Blacklight::DocumentComponent
  • Object
show all
Defined in:
app/components/arclight/search_result_component.rb

Overview

Render a document for a search result; this works with both the compact and list views for grouped or ungrouped results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



8
9
10
# File 'app/components/arclight/search_result_component.rb', line 8

def document
  @document
end

Instance Method Details

#compact?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/components/arclight/search_result_component.rb', line 10

def compact?
  presenter.view_config.key.to_s == 'compact'
end

#iconObject



14
15
16
# File 'app/components/arclight/search_result_component.rb', line 14

def icon
  helpers.blacklight_icon helpers.document_or_parent_icon(@document)
end