Class: Decidim::UserGroupPresenter

Inherits:
UserPresenter
  • Object
show all
Defined in:
decidim-core/app/presenters/decidim/user_group_presenter.rb

Overview

Decorator for user groups

Instance Method Summary collapse

Methods inherited from UserPresenter

#direct_messages_enabled?, #display_mention, #has_tooltip?, #nickname, #profile_path, #profile_url

Methods included from TranslatableAttributes

#default_locale?

Instance Method Details

#badgeObject


12
13
14
15
16
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 12

def badge
  return "" unless verified?

  "verified-badge"
end

#can_be_contacted?Boolean

Returns:

  • (Boolean)

20
21
22
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 20

def can_be_contacted?
  true
end

#can_follow?Boolean

Returns:

  • (Boolean)

28
29
30
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 28

def can_follow?
  false
end

#deleted?Boolean

Returns:

  • (Boolean)

8
9
10
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 8

def deleted?
  false
end

#members_countObject


32
33
34
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 32

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

#officialization_textObject


24
25
26
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 24

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