Sha256: 26df26818b22c29a4e3e54589f7058b4fb6cddd620f124cf3670eeaffecd5255

Contents?: true

Size: 1.36 KB

Versions: 5

Compression:

Stored size: 1.36 KB

Contents

ActiveAdmin.register_page "Dashboard" do

  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 I18n.t("active_admin.dashboard_welcome.welcome")
        small I18n.t("active_admin.dashboard_welcome.call_to_action")
      end
    end

    # Here is an example of a simple dashboard with columns and panels.
    #
    columns do
      column :span => 2 do
        panel "Recent Posts List" do
          ul do
            Article.all.map do |article|
              li link_to(article.title, edit_lalala_article_path(article))
            end
          end
        end
      end

      column :span => 2 do
        panel "Latest Posts Updated" do
          table_for Article.where('id > 0').order('updated_at DESC').limit(5) do
            column :title do |article|
                link_to(article.title, edit_lalala_article_path(article))
            end
            column :updated_at do |article|
                span article.updated_at, { :class => "timeago", :title => article.updated_at }
            end
          end
        end
      end

      column do
        panel "Info" do
          para "Welcome to LALALA."
        end
      end

    end
  end # content
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lalala-4.0.0.dev.244 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.243 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.242 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.240 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.239 test/dummy/app/admin/dashboard.rb