Class: Decidim::UserGroupPresenter
Overview
Decorator for user groups
Instance Method Summary
collapse
#avatar, #avatar_url, #default_avatar_url, #direct_messages_enabled?, #display_mention, #has_tooltip?, #nickname, #profile_path, #profile_url
#default_locale?
Instance Method Details
#badge ⇒ Object
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
|
18
19
20
|
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 18
def can_be_contacted?
true unless blocked?
end
|
#can_follow? ⇒ Boolean
26
27
28
|
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 26
def can_follow?
false
end
|
#deleted? ⇒ Boolean
8
9
10
|
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 8
def deleted?
false
end
|
#members_count ⇒ Object
34
35
36
|
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 34
def members_count
Decidim::UserGroups::AcceptedUsers.for(__getobj__).count
end
|
#officialization_text ⇒ Object
22
23
24
|
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 22
def officialization_text
I18n.t("decidim.profiles.default_officialization_text_for_user_groups")
end
|
#officialized? ⇒ Boolean
30
31
32
|
# File 'decidim-core/app/presenters/decidim/user_group_presenter.rb', line 30
def officialized?
false
end
|