Class: ActiveAdmin::Views::Pages::Layout
- Inherits:
-
Base
- Object
- Arbre::HTML::Element
- Arbre::HTML::Tag
- Arbre::HTML::Document
- Base
- ActiveAdmin::Views::Pages::Layout
- Defined in:
- lib/active_admin/views/pages/layout.rb
Overview
Acts as a standard rails Layout for use when logged out or when rendering custom actions.
Constant Summary
Constants included from Arbre::HTML
Arbre::HTML::AUTO_BUILD_ELEMENTS, Arbre::HTML::HTML5_ELEMENTS
Instance Attribute Summary
Attributes inherited from Arbre::HTML::Tag
Attributes inherited from Arbre::HTML::Element
Instance Method Summary collapse
-
#main_content ⇒ Object
Render the content_for(:layout) into the main content area.
- #title ⇒ Object
Methods inherited from Base
Methods inherited from Arbre::HTML::Document
#build, #build_body, #build_head, #doctype, #document, #tag_name, #to_html
Methods inherited from Arbre::HTML::Tag
#add_class, #build, #class_list, #class_names, #get_attribute, #has_attribute?, #id, #id!, #id=, #initialize, #remove_attribute, #remove_class, #set_attribute, #to_html
Methods inherited from Arbre::HTML::Element
#+, #<<, #add_child, #assigns, #build, builder_method, #content, #content=, #document, #each, #get_elements_by_tag_name, #helpers, #html_safe, #indent_level, #initialize, #parent?, #remove_child, #tag_name, #to_ary, #to_html, #to_s, #to_str
Methods included from Arbre::HTML::BuilderMethods
#build_tag, #current_dom_context, #insert_tag, #insert_text_node_if_string, #with_current_dom_context
Methods included from Arbre::HTML
#current_dom_context, #helpers, #method_missing
Constructor Details
This class inherits a constructor from Arbre::HTML::Tag
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Arbre::HTML
Instance Method Details
#main_content ⇒ Object
Render the content_for(:layout) into the main content area
14 15 16 17 18 19 20 21 |
# File 'lib/active_admin/views/pages/layout.rb', line 14 def main_content content_for_layout = content_for(:layout) if content_for_layout.is_a?(Arbre::HTML::Element) current_dom_context.add_child content_for_layout.children else text_node content_for_layout end end |
#title ⇒ Object
9 10 11 |
# File 'lib/active_admin/views/pages/layout.rb', line 9 def title assigns[:page_title] || I18n.t("active_admin.#{params[:action]}", :default => params[:action].to_s.titleize) end |