Sha256: 108a13670b178701429991980c0ad7454fc12cbe6f74e8c62b7ce2ec43fd2ac7

Contents?: true

Size: 653 Bytes

Versions: 64

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Assemblies
    module AdminLog
      module ValueTypes
        # This class presents the given value as a user role. Check
        # the `DefaultPresenter` for more info on how value
        # presenters work.
        class RolePresenter < Decidim::Log::ValueTypes::DefaultPresenter
          # Public: Presents the value as a user role.
          #
          # Returns an HTML-safe String.
          def present
            return if value.blank?

            h.t(value, scope: "decidim.admin.models.assembly_user_role.roles", default: value)
          end
        end
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
decidim-assemblies-0.29.1 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.28.4 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.27.9 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.29.0 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.28.3 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.27.8 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.29.0.rc4 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.29.0.rc3 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.29.0.rc2 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.29.0.rc1 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.28.2 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.27.7 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.28.1 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.27.6 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.26.10 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.26.9 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.28.0 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.27.5 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.28.0.rc5 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
decidim-assemblies-0.28.0.rc4 app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb