Sha256: 0c08cbee52d6e84ac740a0242cc02fdbe7444c1e1ee8de1310a5fc3fe9851b45

Contents?: true

Size: 667 Bytes

Versions: 13

Compression:

Stored size: 667 Bytes

Contents

# frozen_string_literal: true

module Koi
  class OrdinalTableComponent < Tables::TableComponent
    include Katalyst::Tables::Orderable

    def initialize(collection:,
                   id: "index-table",
                   url: [:order, :admin, collection],
                   scope: "order[#{collection.model_name.plural}]",
                   **options)
      super(collection:, id:, class: "index-table", caption: true, **options)

      @url   = url
      @scope = scope
    end

    def before_render
      with_orderable(url: @url, scope: @scope) unless orderable?
    end

    def call
      concat(render_parent)
      concat(orderable)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
katalyst-koi-4.6.0 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.9 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.8 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.7 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.6 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.5 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.4 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.3 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.2 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.1 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.0 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.0.beta.2 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.5.0.beta.1 app/components/koi/ordinal_table_component.rb