Class: RubyCms::Admin::BulkActionTable::BulkActions
- Inherits:
-
RubyCms::Admin::BaseComponent
- Object
- RubyCms::Admin::BaseComponent
- RubyCms::Admin::BulkActionTable::BulkActions
- Defined in:
- app/components/ruby_cms/admin/bulk_action_table/bulk_actions.rb
Overview
Bulk actions bar component Appears when items are selected, shows selected count and action buttons
Instance Method Summary collapse
-
#initialize(controller_name: "ruby-cms--bulk-action-table", item_name: "item", bulk_actions_url: nil, bulk_action_buttons: []) ⇒ BulkActions
constructor
A new instance of BulkActions.
- #view_template ⇒ Object
Methods inherited from RubyCms::Admin::BaseComponent
#build_classes, #conditional_attributes, #controller, #form_authenticity_token, #helpers, #merge_data_attributes, #token_from_controller, #token_from_controller?, #token_from_helpers?
Constructor Details
#initialize(controller_name: "ruby-cms--bulk-action-table", item_name: "item", bulk_actions_url: nil, bulk_action_buttons: []) ⇒ BulkActions
Returns a new instance of BulkActions.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/components/ruby_cms/admin/bulk_action_table/bulk_actions.rb', line 14 def initialize( controller_name: "ruby-cms--bulk-action-table", item_name: "item", bulk_actions_url: nil, bulk_action_buttons: [] ) super @controller_name = controller_name @item_name = item_name @bulk_actions_url = bulk_actions_url = || [] end |
Instance Method Details
#view_template ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/components/ruby_cms/admin/bulk_action_table/bulk_actions.rb', line 27 def view_template div( class: "hidden bg-primary/5 border-t border-border/60 px-5 py-3 backdrop-blur-sm", data: { "#{@controller_name}-target": "bulkBar" } ) do div(class: "flex items-center justify-between gap-4 max-w-full") do render_selection_info end end end |