Sha256: 0474afc1fb299ff550f2eaaf396c86b32f49121144f0ccda49d0a2c7ec635873

Contents?: true

Size: 551 Bytes

Versions: 20

Compression:

Stored size: 551 Bytes

Contents

# frozen_string_literal: true

module Decidim
  #
  # Decorator for user groups
  #
  class UserGroupPresenter < UserPresenter
    def deleted?
      false
    end

    def badge
      return "" unless verified?

      "verified-badge"
    end

    def can_be_contacted?
      true
    end

    def officialization_text
      I18n.t("decidim.profiles.default_officialization_text_for_user_groups")
    end

    def can_follow?
      false
    end

    def members_count
      Decidim::UserGroups::AcceptedUsers.for(__getobj__).count
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
decidim-core-0.26.5 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.27.2 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.27.1 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.26.4 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.27.0 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.26.3 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.27.0.rc2 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.27.0.rc1 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.26.2 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.26.1 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.26.0 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.26.0.rc2 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.26.0.rc1 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.25.2 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.25.1 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.25.0 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.25.0.rc4 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.25.0.rc3 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.25.0.rc2 app/presenters/decidim/user_group_presenter.rb
decidim-core-0.25.0.rc1 app/presenters/decidim/user_group_presenter.rb