Sha256: 5b04a6e869bdc0a8692870cdc9fc9e36f2158487b23d4080903888b36e3062f1

Contents?: true

Size: 732 Bytes

Versions: 10

Compression:

Stored size: 732 Bytes

Contents

# frozen_string_literal: true

class Avo::Index::TableRowComponent < Avo::BaseComponent
  include Avo::ResourcesHelper
  include Avo::Concerns::ChecksShowAuthorization

  attr_writer :header_fields

  prop :resource, reader: :public
  prop :reflection
  prop :parent_record
  prop :parent_resource
  prop :actions
  prop :fields
  prop :header_fields

  def resource_controls_component
    Avo::Index::ResourceControlsComponent.new(
      resource: @resource,
      reflection: @reflection,
      parent_record: @parent_record,
      parent_resource: @parent_resource,
      view_type: :table,
      actions: @actions
    )
  end

  def click_row_to_view_record
    Avo.configuration.click_row_to_view_record && can_view?
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
avo-3.15.1 app/components/avo/index/table_row_component.rb
avo-3.15.0 app/components/avo/index/table_row_component.rb
avo-3.14.5 app/components/avo/index/table_row_component.rb
avo-3.14.4 app/components/avo/index/table_row_component.rb
avo-3.14.3 app/components/avo/index/table_row_component.rb
avo-3.14.2 app/components/avo/index/table_row_component.rb
avo-3.14.1 app/components/avo/index/table_row_component.rb
avo-3.14.0 app/components/avo/index/table_row_component.rb
avo-3.13.7 app/components/avo/index/table_row_component.rb
avo-3.13.6 app/components/avo/index/table_row_component.rb