Sha256: 97c2099ac2b5ffd5243a69074ab873757a3391690ff813273ef71e0e35def73f

Contents?: true

Size: 1.78 KB

Versions: 6

Compression:

Stored size: 1.78 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

    columns do

      column do

        panel 'Объекты недвижимости', class:'clearfix' do
          # para "Объекты недвижимости", class: 'title'
          C80Estate::Property.all.each do |prop|
            render partial: 'prop_in_list', locals: {prop: prop}
          end
        end

        panel 'Типы площадей', class:'clearfix' do
          # para 'Типы площадей', class: 'title'
          C80Estate::Atype.all.each do |atype|
            render partial: 'atype_in_list', locals: {atype: atype}
          end
        end

      end

      column do
        panel 'Рейтинг занятости', class:'clearfix' do
          render_table_prop_busy_coef
        end
        panel 'Рейтинг занятости в м.кв.', class:'clearfix' do
          render_table_prop_busy_coef_sq
        end
      end

    end

    # 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 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
    # end
  end # content
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
c80_estate-0.1.0.9 app/admin/c80_estate/dashboard.rb
c80_estate-0.1.0.8 app/admin/c80_estate/dashboard.rb
c80_estate-0.1.0.7 app/admin/c80_estate/dashboard.rb
c80_estate-0.1.0.6 app/admin/c80_estate/dashboard.rb
c80_estate-0.1.0.5 app/admin/c80_estate/dashboard.rb
c80_estate-0.1.0.4 app/admin/c80_estate/dashboard.rb