Sha256: c83a8ad571a62ab1f106f83e6af0b65e44db381121a917869c4fb1da95b634d2

Contents?: true

Size: 1.08 KB

Versions: 15

Compression:

Stored size: 1.08 KB

Contents

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

  # scope_to :current_admin_user, association_method: :sites_list

  menu label: 'Статистика', priority: 6
  menu :label => "Объекты", :parent => 'Статистика', if: proc{ current_admin_user.can_view_statistics? }

  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

15 entries across 15 versions & 1 rubygems

Version Path
c80_estate-0.1.0.24 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.23 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.22 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.21 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.20 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.19 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.18 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.17 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.16 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.15 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.14 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.13 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.12 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.11 app/admin/c80_estate/pstats.rb
c80_estate-0.1.0.10 app/admin/c80_estate/pstats.rb