Class: Trestle::Toolbar::Dropdown
Instance Attribute Summary
Attributes inherited from Item
#menu
Instance Method Summary
collapse
Methods inherited from Button
#render
Methods inherited from Item
#==, #button_classes, #button_label, #button_style, #initialize, #render, #to_s
Instance Method Details
100
101
102
|
# File 'lib/trestle/toolbar/item.rb', line 100
def button_style_classes
super + ["dropdown-toggle"]
end
|
#label ⇒ Object
94
95
96
97
98
|
# File 'lib/trestle/toolbar/item.rb', line 94
def label
safe_join([
super, tag.span("", class: "caret")
], " ")
end
|
#options ⇒ Object
90
91
92
|
# File 'lib/trestle/toolbar/item.rb', line 90
def options
super.merge(type: "button", data: { bs_toggle: "dropdown" })
end
|
104
105
106
|
# File 'lib/trestle/toolbar/item.rb', line 104
def
[.render_items]
end
|