|
@ -10,6 +10,7 @@ class UserMailer < ActionMailer::Base |
|
|
|
|
|
|
|
|
def email_confirmation(confirmation) |
|
|
def email_confirmation(confirmation) |
|
|
@confirmation = EmailConfirmation.find(confirmation) if confirmation.present? |
|
|
@confirmation = EmailConfirmation.find(confirmation) if confirmation.present? |
|
|
|
|
|
I18n.locale = @confirmation.user.locale if @confirmation.user.locale.present? |
|
|
@subject = _'email.subject.confirm_email','Please confirm your email address' |
|
|
@subject = _'email.subject.confirm_email','Please confirm your email address' |
|
|
mail to: @confirmation.user.named_email, subject: @subject |
|
|
mail to: @confirmation.user.named_email, subject: @subject |
|
|
end |
|
|
end |
|
@ -18,6 +19,7 @@ class UserMailer < ActionMailer::Base |
|
|
@registration = ConferenceRegistration.find(registration) if registration.present? |
|
|
@registration = ConferenceRegistration.find(registration) if registration.present? |
|
|
@conference = @registration.conference |
|
|
@conference = @registration.conference |
|
|
@user = @registration.user |
|
|
@user = @registration.user |
|
|
|
|
|
I18n.locale = @user.locale if @user.locale.present? |
|
|
@subject = @conference.registration_status.to_sym == :pre ? |
|
|
@subject = @conference.registration_status.to_sym == :pre ? |
|
|
_( |
|
|
_( |
|
|
'email.subject.pre_registration_confirmed', |
|
|
'email.subject.pre_registration_confirmed', |
|
@ -47,6 +49,7 @@ class UserMailer < ActionMailer::Base |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@requester = User.find(requester) if requester.present? |
|
|
@requester = User.find(requester) if requester.present? |
|
|
addresses = [] |
|
|
addresses = [] |
|
|
|
|
|
I18n.locale = @workshop.active_facilitators.first.locale if @workshop.active_facilitators.first.locale.present? |
|
|
@workshop.active_facilitators.each do |f| |
|
|
@workshop.active_facilitators.each do |f| |
|
|
addresses << f.named_email |
|
|
addresses << f.named_email |
|
|
end |
|
|
end |
|
@ -62,6 +65,7 @@ class UserMailer < ActionMailer::Base |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@conference = Conference.find(@workshop.conference_id) |
|
|
@conference = Conference.find(@workshop.conference_id) |
|
|
@user = User.find(user) if user.present? |
|
|
@user = User.find(user) if user.present? |
|
|
|
|
|
I18n.locale = @user.locale if @user.locale.present? |
|
|
@subject = (_'email.subject.workshop_request_approved', |
|
|
@subject = (_'email.subject.workshop_request_approved', |
|
|
"You have been added as a facilitator of #{@workshop.title}", |
|
|
"You have been added as a facilitator of #{@workshop.title}", |
|
|
:vars => {:workshop_title => @workshop.title}) |
|
|
:vars => {:workshop_title => @workshop.title}) |
|
@ -72,6 +76,7 @@ class UserMailer < ActionMailer::Base |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@conference = @workshop.conference |
|
|
@conference = @workshop.conference |
|
|
@user = User.find(user) if user.present? |
|
|
@user = User.find(user) if user.present? |
|
|
|
|
|
I18n.locale = @user.locale if @user.present? && @user.locale.present? |
|
|
@subject = (_'email.subject.workshop_request_denied', |
|
|
@subject = (_'email.subject.workshop_request_denied', |
|
|
"Your request to facilitate #{@workshop.title} has been denied", |
|
|
"Your request to facilitate #{@workshop.title} has been denied", |
|
|
:vars => {:workshop_title => @workshop.title}) |
|
|
:vars => {:workshop_title => @workshop.title}) |
|
@ -84,6 +89,7 @@ class UserMailer < ActionMailer::Base |
|
|
@locale = locale |
|
|
@locale = locale |
|
|
@locale_name = language_name(locale) |
|
|
@locale_name = language_name(locale) |
|
|
@user = User.find(user) if user.present? |
|
|
@user = User.find(user) if user.present? |
|
|
|
|
|
I18n.locale = @user.locale if @user.present? && @user.locale.present? |
|
|
@translator = User.find(translator) if translator.present? |
|
|
@translator = User.find(translator) if translator.present? |
|
|
@subject = (_'email.subject.workshop_translated', |
|
|
@subject = (_'email.subject.workshop_translated', |
|
|
"The #{@locale_name} translation for #{@workshop.title} has been modified", |
|
|
"The #{@locale_name} translation for #{@workshop.title} has been modified", |
|
@ -98,6 +104,7 @@ class UserMailer < ActionMailer::Base |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@data = data |
|
|
@data = data |
|
|
@user = User.find(user) if user.present? |
|
|
@user = User.find(user) if user.present? |
|
|
|
|
|
I18n.locale = @user.locale if @user.present? && @user.locale.present? |
|
|
@translator = User.find(translator) if translator.present? |
|
|
@translator = User.find(translator) if translator.present? |
|
|
@subject = (_'email.subject.workshop_original_content_changed', |
|
|
@subject = (_'email.subject.workshop_original_content_changed', |
|
|
"Original content for #{@workshop.title} has been modified", |
|
|
"Original content for #{@workshop.title} has been modified", |
|
@ -119,6 +126,7 @@ class UserMailer < ActionMailer::Base |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@workshop = Workshop.find(workshop) if workshop.present? |
|
|
@comment = Comment.find(comment) if comment.present? |
|
|
@comment = Comment.find(comment) if comment.present? |
|
|
@user = User.find(user) if user.present? |
|
|
@user = User.find(user) if user.present? |
|
|
|
|
|
I18n.locale = @user.locale if @user.present? && @user.locale.present? |
|
|
|
|
|
|
|
|
if @comment.reply? |
|
|
if @comment.reply? |
|
|
@subject = (_'email.subject.workshop_comment.reply', vars: { user_name: @comment.user.name }) |
|
|
@subject = (_'email.subject.workshop_comment.reply', vars: { user_name: @comment.user.name }) |
|
|