Created
February 23, 2013 17:22
-
-
Save mohitjain1/5020570 to your computer and use it in GitHub Desktop.
Dashboard for admin panel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register_page "Dashboard" do | |
sidebar :help do | |
ul do | |
li "Stuck? Contact your manager" | |
li "or drop a mail at [email protected]" | |
end | |
end | |
menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") } | |
content :title => proc{ I18n.t("active_admin.dashboard") } do | |
# div :class => "blank_slate_container", :id => "dashboard_default_message" do | |
# span :class => "blank_slate" do | |
# span "Welcome to Active Admin. This is the default dashboard page." | |
# small "To add dashboard sections, checkout 'app/admin/dashboards.rb'" | |
# end | |
# end | |
# Here is an example of a simple dashboard with columns and panels. | |
# | |
columns do | |
# column do | |
# panel "Recent Posts" do | |
# ul do | |
# Post.recent(5).map do |post| | |
# li link_to(post.title, admin_post_path(post)) | |
# end | |
# end | |
# end | |
# end | |
# column do | |
# panel "Info" do | |
# para "Welcome to ActiveAdmin." | |
# end | |
# end | |
column do | |
panel "Stats" do | |
render partial: 'admin/dashboard/daily_stats' | |
end | |
panel "Stats" do | |
render partial: 'admin/dashboard/total_stats' | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment