2015-10-19 12:37:56 +03:00
|
|
|
class EventMailer < ActionMailer::Base
|
2019-10-13 14:38:03 +03:00
|
|
|
helper ApplicationHelper
|
|
|
|
|
2015-10-19 12:37:56 +03:00
|
|
|
def confirmation_request(event)
|
2019-10-13 14:38:03 +03:00
|
|
|
@event = event.decorate
|
2015-10-19 12:37:56 +03:00
|
|
|
I18n.locale = @event.proposer.language
|
2019-10-13 14:38:03 +03:00
|
|
|
|
2019-10-12 20:56:16 +03:00
|
|
|
attachments['feedback-link-qr-code.svg'] = {
|
|
|
|
mime_type: 'image/svg+xml',
|
2019-10-13 14:38:03 +03:00
|
|
|
content: @event.feedback_qr_code_as_svg
|
2019-10-12 20:56:16 +03:00
|
|
|
}
|
2019-10-13 14:38:03 +03:00
|
|
|
|
2015-10-19 12:37:56 +03:00
|
|
|
mail to: @event.proposer.email,
|
2019-04-28 21:10:54 +03:00
|
|
|
from: "program@openfest.org",
|
|
|
|
subject: I18n.t("event_mailer.acceptance_notification.subject",
|
|
|
|
conference: @event.conference.title,
|
|
|
|
submission_type: @event.event_type.name.mb_chars.downcase.to_s,
|
|
|
|
title: @event.title)
|
2015-10-19 12:37:56 +03:00
|
|
|
end
|
2015-11-05 13:09:13 +02:00
|
|
|
|
|
|
|
def rejection_notification(event)
|
|
|
|
@event = event
|
|
|
|
I18n.locale = @event.proposer.language
|
|
|
|
|
|
|
|
mail to: @event.proposer.email,
|
2019-04-28 21:10:54 +03:00
|
|
|
from: "program@openfest.org",
|
|
|
|
subject: I18n.t("event_mailer.rejection_notification.subject",
|
|
|
|
conference: @event.conference.title,
|
|
|
|
submission_type: @event.event_type.name.mb_chars.downcase.to_s,
|
|
|
|
title: @event.title)
|
2015-11-05 13:09:13 +02:00
|
|
|
end
|
2015-10-19 12:37:56 +03:00
|
|
|
end
|