Class: RubyCms::Admin::BulkActionTable::BulkActionTableHeader
- Inherits:
-
RubyCms::Admin::BaseComponent
- Object
- RubyCms::Admin::BaseComponent
- RubyCms::Admin::BulkActionTable::BulkActionTableHeader
- Defined in:
- app/components/ruby_cms/admin/bulk_action_table/bulk_action_table_header.rb
Overview
Table header component Renders <thead> with column headers and optional select-all checkbox
Instance Method Summary collapse
-
#initialize(headers: [], bulk_actions_enabled: true, controller_name: "ruby-cms--bulk-action-table") ⇒ BulkActionTableHeader
constructor
A new instance of BulkActionTableHeader.
- #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(headers: [], bulk_actions_enabled: true, controller_name: "ruby-cms--bulk-action-table") ⇒ BulkActionTableHeader
Returns a new instance of BulkActionTableHeader.
13 14 15 16 17 18 19 20 21 22 |
# File 'app/components/ruby_cms/admin/bulk_action_table/bulk_action_table_header.rb', line 13 def initialize( headers: [], bulk_actions_enabled: true, controller_name: "ruby-cms--bulk-action-table" ) super @headers = headers @bulk_actions_enabled = bulk_actions_enabled @controller_name = controller_name end |
Instance Method Details
#view_template ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'app/components/ruby_cms/admin/bulk_action_table/bulk_action_table_header.rb', line 24 def view_template thead(class: "sticky top-0 z-20 bg-muted/40 [&_tr]:border-b [&_tr]:border-border/60") do tr do render_bulk_checkbox_header render_table_headers end end end |