class ActiveAdmin::Views::Pages::Dashboard
Public Instance Methods
main_content()
click to toggle source
# File lib/active_admin/views/pages/dashboard.rb, line 6 def main_content if assigns[:dashboard_sections] && assigns[:dashboard_sections].any? render_sections(assigns[:dashboard_sections]) else default_welcome_section end end
Protected Instance Methods
default_welcome_section()
click to toggle source
# File lib/active_admin/views/pages/dashboard.rb, line 50 def default_welcome_section div :class => "blank_slate_container", :id => "dashboard_default_message" do span :class => "blank_slate" do span I18n.t('active_admin.dashboard_welcome.welcome') small I18n.t('active_admin.dashboard_welcome.call_to_action') end end end
render_section(section)
click to toggle source
Renders each section using their renderer
# File lib/active_admin/views/pages/dashboard.rb, line 38 def render_section(section) insert_tag section_renderer(section), section end
render_sections(sections)
click to toggle source
# File lib/active_admin/views/pages/dashboard.rb, line 23 def render_sections(sections) table :class => "dashboard" do sections.in_groups_of(3, false).each do |row| tr do row.each do |section| td do render_section(section) end end end end end end
section_renderer(section)
click to toggle source
# File lib/active_admin/views/pages/dashboard.rb, line 42 def section_renderer(section) if section.options[:as] view_factory["dashboard_section_as_#{section.options[:as]}"] else view_factory.dashboard_section end end
title()
click to toggle source
# File lib/active_admin/views/pages/dashboard.rb, line 19 def title I18n.t("active_admin.dashboard") end