Sha256: e0604436e884f347f31c370dc2554f12fda4a621ba38e4bd95ccd47fd7a3c2e5

Contents?: true

Size: 676 Bytes

Versions: 17

Compression:

Stored size: 676 Bytes

Contents

# frozen_string_literal: true

module Koi
  class OrdinalTableComponent < Katalyst::Turbo::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

17 entries across 17 versions & 1 rubygems

Version Path
katalyst-koi-4.4.1 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.4.0 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.3.5 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.3.4 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.3.3 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.3.2 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.3.1 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.3.0 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.3.0.beta.3 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.3.0.beta.2 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.2.1 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.2.0 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.2.0.beta.2 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.2.0.beta.1 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.1.2 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.1.1 app/components/koi/ordinal_table_component.rb
katalyst-koi-4.1.0 app/components/koi/ordinal_table_component.rb