From f01d164295ea186cf827a4e551baed20b9b0ed61 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Wed, 21 Jan 2015 12:01:02 +0800 Subject: [PATCH 1/5] Signed-off-by: alan <547533434@qq.com> --- app/helpers/courses_helper.rb | 2 +- app/models/mailer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 95b049dc2..22eb9bfae 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -112,7 +112,7 @@ module CoursesHelper # end #获取课程所有成员 - def course_member course + def course_all_member course course.members end # 学生人数计算 diff --git a/app/models/mailer.rb b/app/models/mailer.rb index a2e742ee3..2cd069175 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -62,7 +62,7 @@ class Mailer < ActionMailer::Base course = journals_for_message.jour @author = journals_for_message.user #课程的教师 - @members = course_member journals_for_message.jour + @members = course_all_member journals_for_message.jour #收件人邮箱 @recipients ||= [] @members.each do |teacher| From 3279928bef0cb9256d4d651f97841dce515f941a Mon Sep 17 00:00:00 2001 From: whimlex Date: Wed, 21 Jan 2015 18:12:04 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=8C=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=9B?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=B5=84=E6=96=99=E9=A1=B5=E9=9D=A2=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/mailer.html.erb | 4 +-- app/views/mailer/_issue.html.erb | 14 +++++------ app/views/mailer/_issue.text.erb | 14 +++++------ app/views/mailer/issue_add.html.erb | 2 +- app/views/mailer/issue_add.text.erb | 2 +- app/views/mailer/issue_edit.html.erb | 22 ++++++++++------- app/views/mailer/issue_edit.text.erb | 4 +-- app/views/my/account.html.erb | 26 ++++++++++---------- app/views/users/_mail_notifications.html.erb | 2 +- config/locales/en.yml | 16 +++++++++++- config/locales/zh.yml | 15 +++++++++++ 11 files changed, 77 insertions(+), 44 deletions(-) diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index b80206728..a05eacbd1 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -11,7 +11,7 @@ div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,ol{ ma div,img,tr,td,table{ border:0;} table,tr,td{border:0;cellspacing:0; cellpadding:0;} ol,ul,li{ list-style-type:none} -.cl{ clear:both; overflow:hidden; } +.cl{ clear:both; overflow:hidden; margin-top: 30px;} a{ text-decoration:none; } a:hover{ text-decoration:underline; } .mail_box,ul,li{ list-style-type:none} @@ -35,7 +35,7 @@ a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}
-

亲爱的Trustie用户,您好!

+

<%= l(:mail_issue_greetings)%>

<%= yield %>
diff --git a/app/views/mailer/_issue.html.erb b/app/views/mailer/_issue.html.erb index 5979877a3..c97c82426 100644 --- a/app/views/mailer/_issue.html.erb +++ b/app/views/mailer/_issue.html.erb @@ -2,19 +2,19 @@

<%= link_to(h("#{@issue.author}(#{@issue.author.show_name})"), @issue_author_url) %> - 在 - <%= link_to(h("#{@issue.project.name}"),@project_url) %>中有了一个与您相关的最新活动,请您关注!

+ <%= l(:mail_issue_title_userin)%> + <%= link_to(h("#{@issue.project.name}"),@project_url) %><%= l(:mail_issue_title_active)%>

    -
  • 标题:<%= link_to(issue.subject, issue_url) %>
  • -
  • 来源:<%= issue.project.name %>项目<%= issue.tracker.name%>
  • -
  • 内容: +
  • <%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url) %>
  • +
  • <%= l(:mail_issue_sent_from)%><%= issue.project.name %><%= l(:mail_issue_from_project)%>
  • +
  • <%= l(:mail_issue_content)%> <%= issue.description %>
  • <% unless @issue.attachments.nil? %> - 附件: + <%= l(:mail_issue_attachments)%> <% @issue.attachments.each do |attach| %>

    <%= link_to_attachment(attach, :download => true, :token => @token.value, :only_path => false) %>

    @@ -25,7 +25,7 @@
- +