1、修改邮件显示样式及国际化

2、发布作业代码更新
This commit is contained in:
huang 2015-07-04 12:12:44 +08:00
parent 08123c2d62
commit 02805fd145
4 changed files with 7 additions and 7 deletions

View File

@ -120,8 +120,8 @@ class Mailer < ActionMailer::Base
count = courses.count
count = count - 1
for i in 0..count do
bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order(" '#{courses[i].id}', homework_commons.created_at desc")
attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order(" '#{courses[i].id}',attachments.created_on DESC' ")
bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order("homework_commons.created_at desc")
attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order("attachments.created_on DESC' ")
@bids += bids if bids.count > 0
@attachments += attachments if attachments.count > 0
end

View File

@ -5,7 +5,7 @@
<% if @attachments.first || @course_news.first || @course_news_comments.first || @bids.first ||
@course_journal_messages.first|| @course_messages.first || @attachments.first %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h3>
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_course_overview)%></h3>
<!-- 课程通知 -->
<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
@ -189,7 +189,7 @@
<% if @issues.first || @project_messages.first || @issues_journals.first || @wiki_contents.first || @project_news.first || @project_news_comments.first || @project_journal_messages.first ||
@project_news_comments.first %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h3 class="wmail_h2" style="color:#15BCCF; "><%= l(:label_project_overview_new)%></h3>
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_project_overview_new)%></h3>
<% unless @issues.first.nil? || @issues_journals.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
@ -508,7 +508,7 @@
</div><!--贴吧动态 end-->
<% end %>
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
<span style="color:#666;"><%= l(:label_mail_policy) %></span>
<span style="color:#474646;"><%= l(:label_mail_policy) %></span>
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>

View File

@ -337,7 +337,7 @@ zh:
#
# 贴吧动态栏
#
lable_bar_active: 问题和反馈动态
lable_bar_active: 贴吧动态
label_my_question: 我要提问
label_my_feedback: 我要反馈

View File

@ -737,7 +737,7 @@ zh:
label_date_to:
label_language_based: 根据用户的语言
label_mail_policy: 邮件策略
label_mail_policy: 您可以修改邮件通知策略
label_send_test_email: 发送测试邮件
label_feeds_access_key: RSS存取键
label_missing_feeds_access_key: 缺少RSS存取键