Sha256: 0c8c154ed7940b1b03ea3447dfc6c373b3ed33b1abcfc23aa3e2e6879938a2d0

Contents?: true

Size: 1.65 KB

Versions: 29

Compression:

Stored size: 1.65 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 "Howdy, partner! You’ve reached your own personal LALALA dashboard, full of stats, data and extravaganza!"
      end
    end

    # Here is an example of a simple dashboard with columns and panels.
    #
    columns do

      column do

        render partial: "/admin/stats", :locals => { :matches => "test" }

      end

    end

    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

    end


    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

    end


  end # content
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lalala-4.0.0.dev.416 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.407 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.396 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.395 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.393 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.388 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.385 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.382 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.374 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.372 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.368 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.366 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.357 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.354 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.351 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.350 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.349 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.344 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.343 test/dummy/app/admin/dashboard.rb
lalala-4.0.0.dev.339 test/dummy/app/admin/dashboard.rb