Sha256: 940f116e5ba700fec8defb8abb27bae9eea0974bde07598d82617a626f68c8b1

Contents?: true

Size: 921 Bytes

Versions: 23

Compression:

Stored size: 921 Bytes

Contents

class Marty::ImportTypeView < Marty::Grid
  has_marty_permissions \
    create: :admin,
    read: :any,
    update: :admin,
    delete: :admin

  def configure(c)
    super

    c.title   = I18n.t('import_type', default: 'ImportType')
    c.model   = 'Marty::ImportType'
    c.attributes =
      [
        :name,
        :role__name,
        :db_model_name,
        :cleaner_function,
        :validation_function,
        :preprocess_function,
      ]
    c.store_config.merge!(sorters: [{ property: :name, direction: 'ASC' }])
  end

  attribute :name do |c|
    c.flex = 1
  end

  attribute :role__name do |c|
    c.width = 150
  end

  attribute :db_model_name do |c|
    c.flex = 1
  end

  attribute :cleaner_function do |c|
    c.flex = 1
  end

  attribute :validation_function do |c|
    c.flex = 1
  end

  attribute :preprocess_function do |c|
    c.flex = 1
  end
end

ImportTypeView = Marty::ImportTypeView

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
marty-2.9.3 app/components/marty/import_type_view.rb
marty-2.9.2 app/components/marty/import_type_view.rb
marty-2.9.1 app/components/marty/import_type_view.rb
marty-2.8.0 app/components/marty/import_type_view.rb
marty-2.7.3 app/components/marty/import_type_view.rb
marty-2.7.2 app/components/marty/import_type_view.rb
marty-2.7.1 app/components/marty/import_type_view.rb
marty-2.7.0 app/components/marty/import_type_view.rb
marty-2.6.8 app/components/marty/import_type_view.rb
marty-2.6.7 app/components/marty/import_type_view.rb
marty-2.6.6 app/components/marty/import_type_view.rb
marty-2.6.5 app/components/marty/import_type_view.rb
marty-2.6.4 app/components/marty/import_type_view.rb
marty-2.6.3 app/components/marty/import_type_view.rb
marty-2.6.2 app/components/marty/import_type_view.rb
marty-2.6.1 app/components/marty/import_type_view.rb
marty-2.6.0 app/components/marty/import_type_view.rb
marty-2.5.9 app/components/marty/import_type_view.rb
marty-2.5.8 app/components/marty/import_type_view.rb
marty-2.5.7 app/components/marty/import_type_view.rb