Sha256: 847add62d8919bd3c62349b3855f6986becb7c8ec1ea819a8f9de2f67495212d

Contents?: true

Size: 1.51 KB

Versions: 32

Compression:

Stored size: 1.51 KB

Contents

ActiveAdmin::Dashboards.build do

  # Define your dashboard sections here. Each block will be
  # rendered on the dashboard in the context of the view. So just
  # return the content which you would like to display.
  
  # == Simple Dashboard Section
  # Here is an example of a simple dashboard section
  #
  #   section "Recent Posts" do
  #     ul do
  #       Post.recent(5).collect do |post|
  #         li link_to(post.title, admin_post_path(post))
  #       end
  #     end
  #   end
  
  # == Render Partial Section
  # The block is rendered within the context of the view, so you can
  # easily render a partial rather than build content in ruby.
  #
  #   section "Recent Posts" do
  #     div do
  #       render 'recent_posts' # => this will render /app/views/admin/dashboard/_recent_posts.html.erb
  #     end
  #   end
  
  # == Section Ordering
  # The dashboard sections are ordered by a given priority from top left to
  # bottom right. The default priority is 10. By giving a section numerically lower
  # priority it will be sorted higher. For example:
  #
  #   section "Recent Posts", :priority => 10
  #   section "Recent User", :priority => 1
  #
  # Will render the "Recent Users" then the "Recent Posts" sections on the dashboard.
  
  # == Conditionally Display
  # Provide a method name or Proc object to conditionally render a section at run time.
  #
  # section "Membership Summary", :if => :memberships_enabled?
  # section "Membership Summary", :if => Proc.new { current_admin_user.account.memberships.any? }

end

Version data entries

32 entries across 32 versions & 6 rubygems

Version Path
aa_associations-0.1.2 test/dummy/app/admin/dashboards.rb
active_admin_editor-1.0.1 spec/dummy/app/admin/dashboards.rb
active_admin_editor-1.0.0 spec/dummy/app/admin/dashboards.rb
active_admin_editor-0.3.6 test/dummy/app/admin/dashboards.rb
ecm_cms_navigation-0.0.6 test/dummy/app/admin/dashboards.rb
aa_associations-0.1.1 test/dummy/app/admin/dashboards.rb
aa_associations-0.1.0 test/dummy/app/admin/dashboards.rb
ecm_cms_core-0.0.3 test/dummy/app/admin/dashboards.rb
ecm_cms_core-0.0.2 test/dummy/app/admin/dashboards.rb
ecm_cms_navigation-0.0.5 test/dummy/app/admin/dashboards.rb
ecm_cms_navigation-0.0.4 test/dummy/app/admin/dashboards.rb
active_admin_editor-0.3.5 test/dummy/app/admin/dashboards.rb
active_admin_editor-0.3.4 test/dummy/app/admin/dashboards.rb
active_admin_editor-0.3.3 test/dummy/app/admin/dashboards.rb
active_admin_editor-0.3.2 test/dummy/app/admin/dashboards.rb
active_admin_editor-0.3.1 test/dummy/app/admin/dashboards.rb
active_admin_editor-0.3.0 test/dummy/app/admin/dashboards.rb
active_admin_editor-0.2.4 test/dummy/app/admin/dashboards.rb
activeadmin-0.4.4 lib/generators/active_admin/install/templates/dashboards.rb
active_admin_editor-0.2.3 test/dummy/app/admin/dashboards.rb