Sha256: 995a4222afa4543653ba5f625c609b8f21ca6974756c7ddcfa566098b26168da

Contents?: true

Size: 655 Bytes

Versions: 9

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    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.conference_user_role.roles", default: value)
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
decidim-conferences-0.18.1 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb
decidim-conferences-0.17.2 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb
decidim-conferences-0.18.0 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb
decidim-conferences-0.17.1 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb
decidim-conferences-0.16.1 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb
decidim-conferences-0.17.0 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb
decidim-conferences-0.16.0 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb
decidim-conferences-0.15.2 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb
decidim-conferences-0.15.1 app/presenters/decidim/conferences/admin_log/value_types/role_presenter.rb