From f65f2dc926a852d186f9f5b06a66c29e737642bc Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 24 Jun 2015 09:31:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5=E3=80=81?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E3=80=81=E5=8F=91=E5=B8=83=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E3=80=81=E5=9B=9E=E5=A4=8D=E5=90=88=E4=BA=8C=E4=B8=BA=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mailer/send_for_user_activities.html.erb | 97 +++++++------------ config/locales/courses/zh.yml | 2 +- 2 files changed, 35 insertions(+), 64 deletions(-) diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 724d59e6f..6ff436fc8 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -7,7 +7,7 @@

<%= l(:label_course_overview)%>

- <% unless @course_news.first.nil? %> + <% unless @course_news.first.nil? || @course_news_comments.first.nil? %> - <% end %> - - - <% unless @course_news_comments.first.nil? %> - + <% end %> @@ -198,7 +190,7 @@ @project_news_comments.first %>

<%= l(:label_project_overview_new)%>

- <% unless @issues.first.nil? %> + <% unless @issues.first.nil? || @issues_journals.first.nil? %>
    <%= l(:label_issue_tracking) %> @@ -220,44 +212,32 @@ <%= format_time(issue.created_on) %> <% end %> - +
    + <% @issues_journals.each do |issues_journal| %> +
  • + + [ + <%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value), + :class=> "wmail_column", + :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + <%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name", + :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_project_issue) %> + <% if issues_journal.notes.blank? || issues_journal.notes.nil? %> + <%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), + :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <% else %> + <%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), + :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <% end %> + <%= format_time(issues_journal.created_on) %> +
  • + <% end %>
<% end %> - - - <% unless @issues_journals.first.nil? %> -
    - - <%= l(:label_issue_tracking) %> - - <% @issues_journals.each do |issues_journal| %> -
  • - - [ - <%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value), - :class=> "wmail_column", - :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> - ] - <%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name", - :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> - <%= l(:label_project_issue) %> - <% if issues_journal.notes.blank? || issues_journal.notes.nil? %> - <%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), - :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> - <% else %> - <%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), - :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> - <% end %> - <%= format_time(issues_journal.created_on) %> -
  • - <% end %> - -
    -
- <% end %> - <% unless @project_messages.first.nil? %>
    @@ -322,7 +302,7 @@ <% end %> - <% unless @project_news.first.nil? %> + <% unless @project_news.first.nil? || @project_news_comments.first.nil? %>
      <%= l(:label_project_news) %> @@ -347,23 +327,14 @@ <% end %>
      -
    - <% end %> - - - <% unless @project_news_comments.first.nil? %> -
      - - <%= l(:label_project_news) %> - <% @project_news_comments.each do |project_news_comment|%>
    • [ <% unless project_news_comment.commented.nil? %> - <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value), - :class=> "wmail_column", - :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value), + :class=> "wmail_column", + :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <% end %> ] <%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value), :class => "wmail_name", @@ -377,7 +348,7 @@
    • <% end %>
      -
    +
<% end %> diff --git a/config/locales/courses/zh.yml b/config/locales/courses/zh.yml index 772d6bb52..498388cfc 100644 --- a/config/locales/courses/zh.yml +++ b/config/locales/courses/zh.yml @@ -20,7 +20,7 @@ zh: label_course_mail_news_reply: 课程通知回复 label_main_teacher: 主讲教师 label_course_term: 开课学期 - label_isuue_mail_status: 更新了issue状态 + label_isuue_mail_status: 更新了issue状态! label_join_course: 加入 label_exit_course: 退出