修改邮件提醒:项目缺陷动态不能收到

dev_repository_hjq
huang 10 years ago
parent 7197c33be4
commit 6cddb59a4a

@ -45,7 +45,6 @@ class Mailer < ActionMailer::Base
MailerProxy.new(self)
end
# author: alan
# 发送邀请未注册用户加入项目邮件
# 功能: 在加入项目的同时自动注册用户
def send_invite_in_project(email, project, invitor)
@ -101,16 +100,16 @@ class Mailer < ActionMailer::Base
course_ids = courses.map {|course| course.id}.join(",")
# 查询user的缺陷包括发布的跟踪的以及被指派的缺陷
sql = "select DISTINCT i.* from issues i, watchers w
where (i.assigned_to_id = #{user.id} or i.author_id = #{user.id}
or (w.watchable_type = 'Issue' and w.watchable_id = i.id and w.user_id = #{user.id}))
and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc"
# sql = "select DISTINCT i.* from issues i, watchers w
# where (i.assigned_to_id = #{user.id} or i.author_id = #{user.id}
# or (w.watchable_type = 'Issue' and w.watchable_id = i.id and w.user_id = #{user.id}))
# and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc"
sql = "select DISTINCT i.* from issues i where (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc"
@issues = Issue.find_by_sql(sql)
# @bids 查询课程作业包括老师发布的作业以及user提交作业
# @attachments查询课程课件更新
@attachments ||= []
@bids ||= [] # 老师发布的作业
unless courses.first.nil?
@ -188,8 +187,8 @@ class Mailer < ActionMailer::Base
:subject => "[ #{l(:label_message_plural)} : #{memo.subject} #{l(:label_memo_create_succ)}]",
:filter => true
end
# Builds a Mail::Message object used to email recipients of the added journals for message.
# Builds a Mail::Message object used to email recipients of the added journals for message.
# 留言分为直接留言,和对留言人留言的回复
# 字段说明在JournalsForMessage.rb
# 直接留言后 reply_id,m_parent_id 为空相对应的at_user取值为nil
@ -511,7 +510,7 @@ class Mailer < ActionMailer::Base
end
# Builds a Mail::Message object used to email recipients of a news' project when a news comment is added.
#
# 新增新闻评论时邮件通知
# Example:
# news_comment_added(comment) => Mail::Message object
# Mailer.news_comment_added(comment) => sends an email to the news' project recipients
@ -912,6 +911,7 @@ class Mailer < ActionMailer::Base
:file => attachment.decoded,
:filename => attachment.filename,
:author => user,
:content_type => attachment.mime_type)
end
end

@ -1,10 +1,3 @@
<div class="content">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= @subject %>
@ -15,12 +8,10 @@
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h2>
<% unless @course_news.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= l(:label_course_news) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_news.count %>)</span>
</h4>
<% @course_news.each do |course_new|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
@ -211,7 +202,6 @@
<%= l(:label_issue_tracking) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @issues.count %>)</span>
</h4>
<% @issues.each do |issue|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>

Loading…
Cancel
Save