Sha256: 2d42db6d93cdd287cb080f0f5c791bbdd7d64067b3121ab7f3713408b5b8245c

Contents?: true

Size: 504 Bytes

Versions: 13

Compression:

Stored size: 504 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class VersionAuthorCell < AuthorCell
    def has_tooltip?
      return super unless from_context.is_a?(PaperTrail::Version)
      return if author.is_a?(String)

      super
    end

    def display_name
      return super unless from_context.is_a?(PaperTrail::Version)
      return author if author.is_a?(String) && author.present?

      super
    end

    def author
      @author ||= Decidim.traceability.version_editor(from_context)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/cells/decidim/version_author_cell.rb
decidim-core-0.28.4 app/cells/decidim/version_author_cell.rb
decidim-core-0.29.0 app/cells/decidim/version_author_cell.rb
decidim-core-0.28.3 app/cells/decidim/version_author_cell.rb
decidim-core-0.29.0.rc4 app/cells/decidim/version_author_cell.rb
decidim-core-0.29.0.rc3 app/cells/decidim/version_author_cell.rb
decidim-core-0.29.0.rc2 app/cells/decidim/version_author_cell.rb
decidim-core-0.29.0.rc1 app/cells/decidim/version_author_cell.rb
decidim-core-0.28.2 app/cells/decidim/version_author_cell.rb
decidim-core-0.28.1 app/cells/decidim/version_author_cell.rb
decidim-core-0.28.0 app/cells/decidim/version_author_cell.rb
decidim-core-0.28.0.rc5 app/cells/decidim/version_author_cell.rb
decidim-core-0.28.0.rc4 app/cells/decidim/version_author_cell.rb