Class: Arclight::ExpandHierarchyButtonComponent

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

Overview

Component for rendering an expand button in the hierarchy view

Instance Method Summary collapse

Constructor Details

#initialize(path:, classes: 'btn btn-secondary btn-sm') ⇒ ExpandHierarchyButtonComponent

Returns a new instance of ExpandHierarchyButtonComponent.



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

def initialize(path:, classes: 'btn btn-secondary btn-sm')
  super()
  @path = path
  @classes = classes
end

Instance Method Details



12
13
14
# File 'app/components/arclight/expand_hierarchy_button_component.rb', line 12

def expand_link
  link_to t('arclight.views.show.expand'), @path, class: @classes
end