Class: Arclight::OnlineStatusIndicatorComponent

Inherits:
Blacklight::Component
  • Object
show all
Defined in:
app/components/arclight/online_status_indicator_component.rb

Overview

Render an online status indicator for a document

Instance Method Summary collapse

Constructor Details

#initialize(document:) ⇒ OnlineStatusIndicatorComponent

Returns a new instance of OnlineStatusIndicatorComponent.



6
7
8
9
# File 'app/components/arclight/online_status_indicator_component.rb', line 6

def initialize(document:, **)
  @document = document
  super
end

Instance Method Details

#callObject



15
16
17
# File 'app/components/arclight/online_status_indicator_component.rb', line 15

def call
  tag.span helpers.blacklight_icon(:online), class: 'al-online-content-icon'
end

#render?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/components/arclight/online_status_indicator_component.rb', line 11

def render?
  @document.online_content?
end