Class: RubyCms::Admin::AdminPage
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- RubyCms::Admin::AdminPage
- Defined in:
- app/components/ruby_cms/admin/admin_page.rb,
app/components/ruby_cms/admin/admin_page/admin_table_content.rb
Overview
Admin page wrapper component (Tailwind-first)
NOTE: This file must exist (at this path) so Zeitwerk autoloads RubyCms::Admin::AdminPage as a CLASS (not a module inferred from the admin_page/ directory).
Defined Under Namespace
Classes: AdminTableContent
Instance Method Summary collapse
- #extract_user_attrs(options) ⇒ Object
-
#initialize(title: nil, footer: nil, **options) ⇒ AdminPage
constructor
A new instance of AdminPage.
- #view_template ⇒ Object
Methods inherited from 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(title: nil, footer: nil, **options) ⇒ AdminPage
Returns a new instance of AdminPage.
11 12 13 14 15 16 17 18 |
# File 'app/components/ruby_cms/admin/admin_page.rb', line 11 def initialize(title: nil, footer: nil, **) super() @title = title = () @user_attrs = extract_user_attrs() end |
Instance Method Details
#extract_user_attrs(options) ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/components/ruby_cms/admin/admin_page.rb', line 20 def extract_user_attrs() excluded_keys = i[ title subtitle actions action_icons search padding overflow content_card turbo_frame ] .except(*excluded_keys) end |
#view_template ⇒ Object
28 29 30 31 |
# File 'app/components/ruby_cms/admin/admin_page.rb', line 28 def view_template(&) content = build_page_content(&) wrap_with_turbo_frame(content) end |