Sha256: 95348a6403c8ef87fc0ec07e87ce1ee9d60836da749ba93808f6212520796398

Contents?: true

Size: 410 Bytes

Versions: 31

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class VersionAuthorCell < Decidim::ViewModel
    include Decidim::ApplicationHelper
    include Decidim::SanitizeHelper

    def author
      model
    end

    def author_name
      return nil unless author
      return author if author.is_a?(String)
      return t("decidim.version_author.show.deleted") if author.deleted?

      author.name
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-core-0.27.9 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.8 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.7 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.6 app/cells/decidim/version_author_cell.rb
decidim-core-0.26.10 app/cells/decidim/version_author_cell.rb
decidim-core-0.26.9 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.5 app/cells/decidim/version_author_cell.rb
decidim-core-0.26.8 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.4 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.3 app/cells/decidim/version_author_cell.rb
decidim-core-0.26.7 app/cells/decidim/version_author_cell.rb
decidim-core-0.26.5 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.2 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.1 app/cells/decidim/version_author_cell.rb
decidim-core-0.26.4 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.0 app/cells/decidim/version_author_cell.rb
decidim-core-0.26.3 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.0.rc2 app/cells/decidim/version_author_cell.rb
decidim-core-0.27.0.rc1 app/cells/decidim/version_author_cell.rb
decidim-core-0.26.2 app/cells/decidim/version_author_cell.rb