Add a mailer for event confirmations

This commit is contained in:
Petko Bordjukov 2015-10-19 12:37:56 +03:00
parent 0296af92db
commit d7af47c0c6
4 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,14 @@
# coding: utf-8
class EventMailer < ActionMailer::Base
def confirmation_request(event)
@event = event
I18n.locale = @event.proposer.language
mail to: @event.proposer.email,
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)
end
end

View File

@ -0,0 +1,15 @@
Здравейте,
Радваме се да Ви съобщим, че предложението Ви за участие в <%= @event.conference.title %> с <%= @event.event_type.name.mb_chars.downcase %> на тема „<%= @event.title %>“ беше одобрено. <% if @event.slot.present? -%>
Ще се проведе на <%= I18n.l @event.slot.starts_at, format: :long %> часа.
<% else %>
Все още не са избрани час и дата за провеждането му.
<% end %>
Моля, потвърдете участието си възможно най-скоро като кликнете на следния линк:
<%= confirm_event_url @event, host: Event.last.conference.host_name, protocol: 'https' %>
Отговорете на този email, ако възникнат някакви въпроси.
Поздрави,
Екипът на <%= @event.conference.title %>

View File

@ -0,0 +1,15 @@
Hello,
We are happy to notify you that your request for participation in <%= @event.conference.title %> with the <%= @event.event_type.name.downcase %> titled "<%= @event.title %>" was approved. <% if @event.slot.present? -%>
It has been scheduled for <%= I18n.l @event.slot.starts_at, format: :long %>.
<% else %>
It has not been scheduled yet.
<% end %>
Please confirm your participation as soon as you can by following the following link:
<%= confirm_event_url @event, host: Event.last.conference.host_name, protocol: 'https' %>
Please respond to this email in case you have any questions.
Regards,
The <%= @event.conference.title %> Team

View File

@ -159,7 +159,7 @@ bg:
improbable_phone: "не е валиден телефонен номер" improbable_phone: "не е валиден телефонен номер"
event_mailer: event_mailer:
acceptance_notification: acceptance_notification:
subject: "Предложението ви за %{conference} за %{submission_type} „%{title}“ е одобрено" subject: "Предложението Ви за провеждане на %{submission_type} „%{title}“ на %{conference} е одобрено"
event_states: event_states:
approved: approved:
one: "Одобрено" one: "Одобрено"