Class: Arclight::SearchResultComponent
- Inherits:
-
Blacklight::DocumentComponent
- Object
- Blacklight::DocumentComponent
- Arclight::SearchResultComponent
- 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.
Direct Known Subclasses
DocumentCollectionContextComponent, DocumentCollectionHierarchyComponent
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
Instance Attribute Details
#document ⇒ Object (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
10 11 12 |
# File 'app/components/arclight/search_result_component.rb', line 10 def compact? presenter.view_config.key.to_s == 'compact' end |
#icon ⇒ Object
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 |