Sha256: 35fbcc102602d3bc65ec5d8ace4436e31172ebe096a470f3be8acad97d6f7c7e

Contents?: true

Size: 1.07 KB

Versions: 28

Compression:

Stored size: 1.07 KB

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,
        :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 do |c|
    c.width = 150

    store = ::Marty::RoleType.get_all.sort

    c.editor_config = {
      multi_select: false,
      store:        store,
      type:         :string,
      xtype:        :combo,
    }
  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

28 entries across 28 versions & 1 rubygems

Version Path
marty-14.3.0 app/components/marty/import_type_view.rb
marty-14.0.0 app/components/marty/import_type_view.rb
marty-13.0.2 app/components/marty/import_type_view.rb
marty-11.0.0 app/components/marty/import_type_view.rb
marty-10.0.3 app/components/marty/import_type_view.rb
marty-10.0.2 app/components/marty/import_type_view.rb
marty-10.0.0 app/components/marty/import_type_view.rb
marty-9.5.1 app/components/marty/import_type_view.rb
marty-9.5.0 app/components/marty/import_type_view.rb
marty-9.3.3 app/components/marty/import_type_view.rb
marty-9.3.2 app/components/marty/import_type_view.rb
marty-9.3.0 app/components/marty/import_type_view.rb
marty-8.5.0 app/components/marty/import_type_view.rb
marty-8.4.1 app/components/marty/import_type_view.rb
marty-8.3.1 app/components/marty/import_type_view.rb
marty-8.2.0 app/components/marty/import_type_view.rb
marty-8.0.0 app/components/marty/import_type_view.rb
marty-6.1.0 app/components/marty/import_type_view.rb
marty-5.2.0 app/components/marty/import_type_view.rb
marty-5.1.4 app/components/marty/import_type_view.rb