diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 39c38b269..a6acb1635 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -66,8 +66,8 @@ class Mailer < ActionMailer::Base subject = "[ #{user.show_name} : #{l(:label_day_mail)}]" @subject = " #{user.show_name} : #{date_to} #{l(:label_day_mail)}" - date_from = "#{date_from} 23:59:59" - date_to = "#{date_to} 23:59:59" + date_from = "#{date_from} 17:59:59" + date_to = "#{date_to} 17:59:59" # 生成token用于直接点击登录 @user = user @@ -122,11 +122,11 @@ class Mailer < ActionMailer::Base end end # 查询user在课程中发布的通知,项目中发的新闻 - @course_news = News.find_by_sql("select DISTINCT n.* from news n + @course_news = (course_ids && !course_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n where n.course_id in (#{course_ids}) - and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") - @project_news = News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids}) - and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") + and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : [] + @project_news = (project_ids && !project_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids}) + and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : [] # 查询user在课程及个人中留言 @course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb index 39c760690..1e81aaf65 100644 --- a/app/views/attachments/_form_course.html.erb +++ b/app/views/attachments/_form_course.html.erb @@ -38,7 +38,7 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> -<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> +<%= button_tag "#{l(:button_browse)}", :type=>"button", :onclick=>"_file.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> <%= file_field_tag 'attachments[dummy][file]', :id => '_file', :class => 'file_selector', diff --git a/app/views/welcome/_search_project.html.erb b/app/views/welcome/_search_project.html.erb index b1da1f003..4f534ed2f 100644 --- a/app/views/welcome/_search_project.html.erb +++ b/app/views/welcome/_search_project.html.erb @@ -90,7 +90,7 @@ form #search_by