Sha256: 393d63c107937e5237b22f6c0ccd4f40b4a634674f24a2b6a5e6c0a758f1ed2b

Contents?: true

Size: 1.66 KB

Versions: 46

Compression:

Stored size: 1.66 KB

Contents

ActiveAdmin.register_page "Dashboard" do
  menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") }

  #
  #  Content
  #
  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

46 entries across 46 versions & 1 rubygems

Version Path
lalala-4.1.0.dev.425 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.420 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.419 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.418 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.417 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.415 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.414 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.413 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.412 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.411 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.410 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.409 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.408 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.398 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.397 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.394 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.392 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.391 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.390 test/dummy/app/admin/dashboard.rb
lalala-4.1.0.dev.389 test/dummy/app/admin/dashboard.rb