From 014f830b1dd16254a7d8f10a95f56761b455605c Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 15 Jun 2015 14:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0issue=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E5=8F=91=E9=80=81=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 5 +++++ app/views/journals/diff.html.erb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index e6b091dd4..20cf91aa4 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -107,6 +107,11 @@ class Mailer < ActionMailer::Base and (i.updated_on between '#{date_from}' and '#{date_to}') order by i.updated_on desc" @issues = Issue.find_by_sql(sql) + # issue回复 + @issues_journals = Journal.find_by_sql("select j.* from journals j, members m, projects p, issues i + where m.user_id = '#{user.id}' and p.id = m.project_id and i.project_id = p.id and j.journalized_id = i.id + and j.journalized_type='Issue' and (j.created_on between '#{date_from}' and '#{date_to}') order by updated_on desc") + # @bids 查询课程作业,包括老师发布的作业,以及user提交作业 # @attachments查询课程课件更新 @attachments ||= [] diff --git a/app/views/journals/diff.html.erb b/app/views/journals/diff.html.erb index d3dfa7d34..5bc823c76 100644 --- a/app/views/journals/diff.html.erb +++ b/app/views/journals/diff.html.erb @@ -2,7 +2,7 @@

<%= authoring @journal.created_on, @journal.user, :label => :label_updated_time_by %>

-<%= simple_format_without_paragraph @diff.to_html %> + <%= simple_format_without_paragraph @diff.to_html %>

<%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %>