Module: BasePatch
- Included in:
- ActiveAdmin::Views::Pages::Base
- Defined in:
- lib/activeadmin_custom_layout/layout/pages/base.rb
Instance Method Summary collapse
- #add_classes_to_body ⇒ Object
- #build ⇒ Object
- #build_active_admin_head ⇒ Object
- #build_flash_messages ⇒ Object
- #build_footer ⇒ Object
- #build_main_content_wrapper ⇒ Object
- #build_sidebar ⇒ Object
- #build_title_bar ⇒ Object
- #build_unsupported_browser ⇒ Object
Instance Method Details
#add_classes_to_body ⇒ Object
12 13 14 15 16 17 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 12 def add_classes_to_body super content_for :body_classes do @body.class_names end end |
#build ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 3 def build self.aa_data = { action: params[:action], controller: params[:controller].tr('/', '_'), url: request.path } super end |
#build_active_admin_head ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 19 def build_active_admin_head within @head do arbre_content_for :title do insert_tag Arbre::HTML::Title, [title, render_or_call_method_or_proc_on(self, active_admin_namespace.site_title)].compact.join(" | ") end active_admin_application.stylesheets.each do |style, | arbre_content_for :stylesheets do text_node stylesheet_link_tag(style, ).html_safe end end active_admin_application.javascripts.each do |path| arbre_content_for :javascripts do text_node(javascript_include_tag(path)) end end if active_admin_namespace.favicon arbre_content_for :favicon do text_node(favicon_link_tag(active_admin_namespace.favicon)) end end active_admin_namespace..each do |name, content| arbre_content_for :meta_tags do text_node(tag(:meta, name: name, content: content)) end end text_node end end |
#build_flash_messages ⇒ Object
65 66 67 68 69 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 65 def arbre_content_for :flash_messages do super end end |
#build_footer ⇒ Object
83 84 85 86 87 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 83 def arbre_content_for :footer do super end end |
#build_main_content_wrapper ⇒ Object
71 72 73 74 75 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 71 def build_main_content_wrapper arbre_content_for :main_content do super end end |
#build_sidebar ⇒ Object
77 78 79 80 81 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 77 def arbre_content_for :sidebar do super end end |
#build_title_bar ⇒ Object
59 60 61 62 63 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 59 def arbre_content_for :title_bar do super end end |
#build_unsupported_browser ⇒ Object
53 54 55 56 57 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 53 def build_unsupported_browser arbre_content_for :unsupported_browser do super end end |