Sha256: 3b8fbe6640ef6dde60ac5ee385d276b2746f301d75900883f736386a2871b468

Contents?: true

Size: 1.26 KB

Versions: 7

Compression:

Stored size: 1.26 KB

Contents

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

  menu :label => "Имена свойств", :parent => "Настройки"

  permit_params :title,
                :uom_id,
                :is_excluded_from_filtering,
                :is_normal_price

  config.sort_order = 'title_asc'

  before_filter :skip_sidebar!, :only => :index
  # filter :title
  # filter :atypes
  # filter :is_excluded_from_filtering
  # filter :is_normal_price

  # controller do
  #   cache_sweeper :suit_sweeper, :only => [:update,:create,:destroy]
  # end

  index do
    # selectable_column
    id_column

    column :title
    column :uom
    column :is_excluded_from_filtering
    column :is_normal_price

    actions
  end

  form(:html => {:multipart => true}) do |f|

    f.inputs "Свойства" do
      f.input :title
      f.input :uom, :input_html => { :class => 'selectpicker', 'data-size' => "5", 'data-width' => '400px'}
      f.input :is_excluded_from_filtering,
              :hint => "Если да, то это свойство не будет фигурировать в списке фильтрации".html_safe

      f.input :is_normal_price,
              :hint => "Является ли свойство ценой".html_safe

    end
    f.actions
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
c80_estate-0.1.0.7 app/admin/c80_estate/prop_names.rb
c80_estate-0.1.0.6 app/admin/c80_estate/prop_names.rb
c80_estate-0.1.0.5 app/admin/c80_estate/prop_names.rb
c80_estate-0.1.0.4 app/admin/c80_estate/prop_names.rb
c80_estate-0.1.0.3 app/admin/c80_estate/prop_names.rb
c80_estate-0.1.0.2 app/admin/c80_estate/prop_names.rb
c80_estate-0.1.0.1 app/admin/c80_estate/prop_names.rb