Class: TinyAdmin::Views::DefaultLayout
- Inherits:
-
BasicLayout
- Object
- Phlex::HTML
- BasicLayout
- TinyAdmin::Views::DefaultLayout
- Defined in:
- lib/tiny_admin/views/default_layout.rb
Direct Known Subclasses
Actions::Index, Actions::Show, Pages::Content, Pages::PageNotAllowed, Pages::PageNotFound, Pages::RecordNotFound, Pages::Root, Pages::SimpleAuthLogin
Instance Attribute Summary collapse
-
#flash_component ⇒ Object
Returns the value of attribute flash_component.
-
#head_component ⇒ Object
Returns the value of attribute head_component.
-
#messages ⇒ Object
Returns the value of attribute messages.
-
#navbar_component ⇒ Object
Returns the value of attribute navbar_component.
-
#options ⇒ Object
Returns the value of attribute options.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from BasicLayout
Instance Method Summary collapse
Methods inherited from BasicLayout
#label_for, #update_attributes
Methods included from Utils
#humanize, #params_to_s, #prepare_page, #to_class
Instance Attribute Details
#flash_component ⇒ Object
Returns the value of attribute flash_component.
6 7 8 |
# File 'lib/tiny_admin/views/default_layout.rb', line 6 def flash_component @flash_component end |
#head_component ⇒ Object
Returns the value of attribute head_component.
6 7 8 |
# File 'lib/tiny_admin/views/default_layout.rb', line 6 def head_component @head_component end |
#messages ⇒ Object
Returns the value of attribute messages.
6 7 8 |
# File 'lib/tiny_admin/views/default_layout.rb', line 6 def @messages end |
#navbar_component ⇒ Object
Returns the value of attribute navbar_component.
6 7 8 |
# File 'lib/tiny_admin/views/default_layout.rb', line 6 def @navbar_component end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/tiny_admin/views/default_layout.rb', line 6 def @options end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/tiny_admin/views/default_layout.rb', line 6 def title @title end |
Instance Method Details
#view_template(&block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/tiny_admin/views/default_layout.rb', line 8 def view_template(&block) extra_styles = TinyAdmin.settings.extra_styles flash_component&. = head_component&.update_attributes(page_title: title, style_links: style_links, extra_styles: extra_styles) doctype html { render head_component if head_component body(class: body_class) { render if main_content { render flash_component if flash_component yield_content(&block) } render_scripts } } end |