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 52 |
# 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 t ext_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
66 67 68 69 70 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 66 def arbre_content_for :flash_messages do super end end |
#build_footer ⇒ Object
84 85 86 87 88 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 84 def arbre_content_for :footer do super end end |
#build_main_content_wrapper ⇒ Object
72 73 74 75 76 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 72 def build_main_content_wrapper arbre_content_for :main_content do super end end |
#build_sidebar ⇒ Object
78 79 80 81 82 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 78 def arbre_content_for :sidebar do super end end |
#build_title_bar ⇒ Object
60 61 62 63 64 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 60 def arbre_content_for :title_bar do super end end |
#build_unsupported_browser ⇒ Object
54 55 56 57 58 |
# File 'lib/activeadmin_custom_layout/layout/pages/base.rb', line 54 def build_unsupported_browser arbre_content_for :unsupported_browser do super end end |