VRFS-2320 use from_user_mailer template for session comment

This commit is contained in:
Brian Smith 2014-10-07 21:16:56 -04:00
parent eddd8a526c
commit b30d71de6a
3 changed files with 13 additions and 8 deletions

View File

@ -412,7 +412,7 @@
end
end
def scheduled_session_comment(target_user, source_user, msg, comment, session)
def scheduled_session_comment(target_user, sender, msg, comment, session)
return if !target_user.subscribe_email
email = target_user.email
@ -422,7 +422,8 @@
@session_name = session.name
@session_date = session.pretty_scheduled_start(true)
@comment = comment
@source_user = source_user
@sender = sender
@suppress_user_has_account_footer = true
@session_url = "#{APP_CONFIG.external_root_url}/sessions/#{session.id}/details"
sendgrid_category "Notification"
sendgrid_unique_args :type => unique_args[:type]
@ -432,7 +433,7 @@
mail(:to => email, :subject => subject) do |format|
format.text
format.html
format.html { render :layout => "from_user_mailer" }
end
end

View File

@ -1,7 +1,11 @@
<% provide(:title, 'Scheduled Session Comment') %>
<% provide(:title, "Scheduled Session Comment from #{@sender.name}") %>
<% provide(:photo_url, @sender.resolved_photo_url) %>
<p><%= @comment %></p>
<% content_for :note do %>
<p><%= @comment %></p>
<p>- <%= @source_user.name %> </p>
<p><%= @session_name %></p>
<p><%= @session_date %></p>
<p><a style="color: #588C98;" href="<%= @session_url %>">View Session Details</a></p>
<p><a style="color: #588C98;" href="<%= @session_url %>">View Session Details</a></p>
<% end %>

View File

@ -5,6 +5,6 @@
<%= @comment %>
- <%= @source_user.name %>
- <%= @sender.name %>
See session details at <%= @session_url %>.