Class: Blacklight::Document::ShowToolsComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/blacklight/document/show_tools_component.rb

Overview

Render the tools that display on the sidebar of the show page

Constant Summary

Constants inherited from Component

Component::EXCLUDE_VARIABLES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

compiler, config, #inspect

Constructor Details

#initialize(document:) ⇒ ShowToolsComponent

Returns a new instance of ShowToolsComponent.

Parameters:



8
9
10
# File 'app/components/blacklight/document/show_tools_component.rb', line 8

def initialize(document:)
  @document = document
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



12
13
14
# File 'app/components/blacklight/document/show_tools_component.rb', line 12

def document
  @document
end

Instance Method Details

#actionsObject



18
19
20
# File 'app/components/blacklight/document/show_tools_component.rb', line 18

def actions
  helpers.document_actions(document)
end

#render?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/components/blacklight/document/show_tools_component.rb', line 14

def render?
  helpers.show_doc_actions?
end