diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 56fe1e6a9..6df73225f 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -102,7 +102,7 @@ class Mailer < ActionMailer::Base project_ids = projects.map{|project| project.id}.join(",") course_ids = courses.map {|course| course.id}.join(",") - # 查询user的缺陷,包括发布的,跟踪的以及被指派的缺陷 + # 查询user的缺陷,项目中成员都能收到 sql = "select * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}' and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc" @issues = Issue.find_by_sql(sql) @@ -110,9 +110,7 @@ class Mailer < ActionMailer::Base # @bids 查询课程作业,包括老师发布的作业,以及user提交作业 # @attachments查询课程课件更新 @attachments ||= [] - @bids ||= [] # 老师发布的作业 - unless courses.first.nil? count = courses.count count = count - 1 diff --git a/app/views/mailer/news_added.html.erb b/app/views/mailer/news_added.html.erb index ca8f3c1b0..f214b8293 100644 --- a/app/views/mailer/news_added.html.erb +++ b/app/views/mailer/news_added.html.erb @@ -1,17 +1,15 @@ -

- - - <%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> - - <%= l(:mail_issue_title_userin)%> + + <%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + <%= l(:mail_issue_title_userin)%> <% if @news.project %> - <%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> <% elsif @news.course %> - <%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> - <% end %> - <%= l(:mail_issue_title_active)%>

+ <%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% end %> + <%= l(:mail_issue_title_active)%> +