Sha256: 4ba30c2a8f73062cbabf488928eeb0d570bd336584cbd87d8602b3721b292dd5

Contents?: true

Size: 565 Bytes

Versions: 15

Compression:

Stored size: 565 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  # Displays the document
  # This overrides the title method to provide an edit link.
  class DocumentAdminTableComponent < Blacklight::DocumentComponent
    def initialize(component: 'tr', **kwargs)
      super
    end

    def classes
      super + ['doc-row']
    end

    def timestamp
      return unless presenter.document[presenter.configuration.index.timestamp_field]

      l Date.parse(presenter.document[presenter.configuration.index.timestamp_field])
    rescue StandardError
      nil
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
blacklight-spotlight-4.6.1 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.6.0 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.5.0 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.4.0 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.3.6 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.3.5 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.3.4 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.3.3 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.3.2 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.3.1 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.3.0 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.2.0 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.1.2 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.1.1 app/components/spotlight/document_admin_table_component.rb
blacklight-spotlight-4.1.0 app/components/spotlight/document_admin_table_component.rb