From 52bbb92c9fa590fb94da0ed9f84e05c2465f9fdc Mon Sep 17 00:00:00 2001
From: huang
Date: Thu, 4 Jun 2015 14:42:56 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5=E9=82=AE?=
=?UTF-8?q?=E4=BB=B6=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=EF=BC=88=E6=96=B0=E7=BC=96=E8=BE=91=E5=99=A8=E4=B8=8B=E4=B8=8D?=
=?UTF-8?q?=E8=83=BD=E4=BD=BF=E7=94=A8=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/mailer.rb | 4 +---
app/views/mailer/news_added.html.erb | 20 +++++++++-----------
2 files changed, 10 insertions(+), 14 deletions(-)
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)%>
+
- <%= l(:mail_issue_subject)%>
@@ -25,7 +23,7 @@
- <%= l(:mail_issue_content)%>
- <%= @news.description %>
+ <%= @news.description.html_safe %>