Class: UiBibz::Ui::Ux::Actions
- Inherits:
-
Object
- Object
- UiBibz::Ui::Ux::Actions
- Defined in:
- lib/ui_bibz/ui/ux/table/components/actions.rb
Instance Method Summary (collapse)
- - (Object) divider
- - (Object) format(&block)
- - (Object) format_action
- - (Object) header(content = nil, options = nil, html_options = nil, &block)
-
- (Actions) initialize(store)
constructor
A new instance of Actions.
-
- (Object) link(content = nil, options = nil, html_options = nil, &block)
Add link action in table.
-
- (Object) list
Get all actions.
- - (Object) reset
Constructor Details
- (Actions) initialize(store)
Returns a new instance of Actions
7 8 9 10 11 |
# File 'lib/ui_bibz/ui/ux/table/components/actions.rb', line 7 def initialize store @store = store @actions = [] @action_order = -1 end |
Instance Method Details
- (Object) divider
18 19 20 |
# File 'lib/ui_bibz/ui/ux/table/components/actions.rb', line 18 def divider @actions << UiBibz::Ui::Core::DropdownDivider.new.render end |
- (Object) format(&block)
30 31 32 |
# File 'lib/ui_bibz/ui/ux/table/components/actions.rb', line 30 def format &block @format_action = block end |
- (Object) format_action
39 40 41 |
# File 'lib/ui_bibz/ui/ux/table/components/actions.rb', line 39 def format_action @format_action end |
- (Object) header(content = nil, options = nil, html_options = nil, &block)
22 23 24 |
# File 'lib/ui_bibz/ui/ux/table/components/actions.rb', line 22 def header content = nil, = nil, = nil, &block @actions << UiBibz::Ui::Core::DropdownHeader.new(content, , , &block).render end |
- (Object) link(content = nil, options = nil, html_options = nil, &block)
Add link action in table
14 15 16 |
# File 'lib/ui_bibz/ui/ux/table/components/actions.rb', line 14 def link content = nil, = nil, = nil, &block @actions << UiBibz::Ui::Core::DropdownLink.new(content, , , &block).render end |
- (Object) list
Get all actions
35 36 37 |
# File 'lib/ui_bibz/ui/ux/table/components/actions.rb', line 35 def list @actions.empty? ? defaults_actions : @actions end |
- (Object) reset
26 27 28 |
# File 'lib/ui_bibz/ui/ux/table/components/actions.rb', line 26 def reset @actions = [] end |