Class: Decidim::ConferenceSpeakerPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Decidim::ConferenceSpeakerPresenter
show all
- Includes:
- ResourceHelper
- Defined in:
- decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb
Overview
Decorator for conference speakers
Instance Method Summary
collapse
#linked_classes_filter_values_for, #linked_classes_for, #resource_locator, #resource_title
Instance Method Details
#avatar ⇒ Object
36
37
38
|
# File 'decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb', line 36
def avatar
attached_uploader(:avatar)
end
|
#avatar_url(variant = nil) ⇒ Object
40
41
42
43
44
|
# File 'decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb', line 40
def avatar_url(variant = nil)
return avatar.default_url unless avatar.attached?
avatar.path(variant:)
end
|
#badge ⇒ Object
24
25
26
|
# File 'decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb', line 24
def badge
user ? user.badge : false
end
|
28
29
30
|
# File 'decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb', line 28
def can_be_contacted?
user ? true : false
end
|
#deleted? ⇒ Boolean
20
21
22
|
# File 'decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb', line 20
def deleted?
user ? user.deleted? : false
end
|
32
33
34
|
# File 'decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb', line 32
def has_tooltip?
false
end
|
#name ⇒ Object
12
13
14
|
# File 'decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb', line 12
def name
user ? user.name : full_name
end
|
#nickname ⇒ Object
16
17
18
|
# File 'decidim-conferences/app/presenters/decidim/conference_speaker_presenter.rb', line 16
def nickname
user.nickname if user
end
|