|
|
|
@ -50,10 +50,15 @@ class Mailer < ActionMailer::Base
|
|
|
|
|
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
|
|
|
|
|
@issue_author_url = url_for(user_activities_url(@author))
|
|
|
|
|
recipients ||= []
|
|
|
|
|
mems = memo.self_and_siblings
|
|
|
|
|
mems.each do |mem|
|
|
|
|
|
recipients << mem.author.mail unless recipients.include? mem.author.mail
|
|
|
|
|
if !memo.parent_id.nil?
|
|
|
|
|
mems = memo.self_and_siblings
|
|
|
|
|
mems.each do |mem|
|
|
|
|
|
recipients << mem.author.mail unless recipients.include? mem.author.mail
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
recipients << memo.author.mail
|
|
|
|
|
end
|
|
|
|
|
recipients << @author.mail unless recipients.include? @author.mail
|
|
|
|
|
# cc = wiki_content.page.wiki.watcher_recipients - recipients
|
|
|
|
|
|
|
|
|
|
@memo_url = url_for(forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)))
|
|
|
|
@ -98,10 +103,7 @@ class Mailer < ActionMailer::Base
|
|
|
|
|
#收件人邮箱
|
|
|
|
|
@recipients ||= []
|
|
|
|
|
@members.each do |teacher|
|
|
|
|
|
|
|
|
|
|
@recipients << teacher.user.mail
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
mail :to => @recipients,
|
|
|
|
|
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} "
|
|
|
|
|