Class: Decidim::Initiatives::CreateInitiativeEvent

Inherits:
Events::BaseEvent show all
Includes:
Events::EmailEvent, Events::NotificationEvent
Defined in:
decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb

Instance Method Summary collapse

Methods inherited from Events::BaseEvent

#initialize, #resource_locator, #resource_path, #resource_text, #resource_title, #resource_url, #safe_resource_text, type

Methods included from TranslatableAttributes

#default_locale?

Constructor Details

This class inherits a constructor from Decidim::Events::BaseEvent

Instance Method Details

#email_introObject


18
19
20
21
22
23
24
25
# File 'decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb', line 18

def email_intro
  I18n.t(
    "decidim.initiatives.events.create_initiative_event.email_intro",
    resource_title: resource_title,
    author_nickname: author.nickname,
    author_name: author.name
  )
end

#email_outroObject


27
28
29
30
31
32
33
34
# File 'decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb', line 27

def email_outro
  I18n.t(
    "decidim.initiatives.events.create_initiative_event.email_outro",
    resource_title: resource_title,
    author_nickname: author.nickname,
    author_name: author.name
  )
end

#email_subjectObject


9
10
11
12
13
14
15
16
# File 'decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb', line 9

def email_subject
  I18n.t(
    "decidim.initiatives.events.create_initiative_event.email_subject",
    resource_title: resource_title,
    author_nickname: author.nickname,
    author_name: author.name
  )
end

#notification_titleObject


36
37
38
39
40
41
42
43
44
45
# File 'decidim-initiatives/app/events/decidim/initiatives/create_initiative_event.rb', line 36

def notification_title
  I18n.t(
    "decidim.initiatives.events.create_initiative_event.notification_title",
    resource_title: resource_title,
    resource_path: resource_path,
    author_nickname: author.nickname,
    author_name: author.name,
    author_path: author.profile_path
  ).html_safe
end