Sha256: 69536d1dd0676c8cb5e7157d63bb98430efe4172400e936387b6fc1bb4b9b0de

Contents?: true

Size: 1007 Bytes

Versions: 5

Compression:

Stored size: 1007 Bytes

Contents

ActiveAdmin.register C80Estate::Pstat, as: 'Pstat' do

  # scope_to :current_admin_user, association_method: :sites_list

  menu :label => "Объекты", :parent => 'Статистика'

  config.sort_order = 'id_asc'

  filter :property_id,
         :as => :select,
         :collection => -> { C80Estate::Property.all.map { |p| ["#{p.title}", p.id] } },
         :input_html => {:class => 'selectpicker', 'data-size' => "10", 'data-width' => '100%'}

  filter :atype_id,
         :as => :select,
         :collection => -> { C80Estate::Atype.all.map { |p| ["#{p.title}", p.id] } },
         :input_html => {:class => 'selectpicker', 'data-size' => "10", 'data-width' => '100%'}

  filter :created_at

  index do
    selectable_column
    column :property do |ptype|
      ptype.property_title
    end
    column :atype do |ptype|
      ptype.atype_title
    end
    column :free_areas
    column :busy_areas
    column :coef_busy
    column :coef_busy_sq
    column :created_at
    actions
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
c80_estate-0.1.0.7 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.6 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.5 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.4 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.3 app/admin/c80_estate/pstats.rb