Class: Avo::ActionsComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Avo::ActionsComponent
show all
- Includes:
- ApplicationHelper
- Defined in:
- app/components/avo/actions_component.rb
Instance Method Summary
collapse
#a_button, #a_link, #appearance_neutral_labels, #avo_appearance_t, #body_classes, #button_classes, #chart_color, #container_classes, #d, #decode_filter_params, #e, #editor_file_path, #editor_url, #empty_state, #encode_filter_params, #frame_id, #get_model_class, #input_classes, #manual_frame_cookie_name, #manual_frame_remembered?, #mount_path, #number_to_social, #possibly_rails_authentication?, #render_header_menu_items, #render_license_warning, #root_path_without_url, #rtl?, #safe_blob_path, #safe_blob_representation_url, #safe_blob_url, #text_direction, #ui, #wrap_in_modal
#summary_chart_params_for
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_selector_data_attributes, #record_path, #record_title, #resource_for_record, #resource_grid, #resource_show_path, #resource_table
Instance Method Details
#after_initialize ⇒ Object
39
40
41
42
43
44
45
46
47
48
|
# File 'app/components/avo/actions_component.rb', line 39
def after_initialize
filter_actions unless @custom_list
if @as_row_control
@actions.each do |action|
action.hydrate(resource: @resource, record: @resource.record) if action.respond_to?(:hydrate)
end
end
end
|
#filter_actions ⇒ Object
54
55
56
57
58
59
60
61
62
63
64
|
# File 'app/components/avo/actions_component.rb', line 54
def filter_actions
@actions = @actions.dup
if @exclude.any?
@actions.reject! { |action| @exclude.include?(action.class) }
end
if @include.any?
@actions.select! { |action| @include.include?(action.class) }
end
end
|
#render? ⇒ Boolean
50
51
52
|
# File 'app/components/avo/actions_component.rb', line 50
def render?
@actions.present?
end
|