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/courses/_history.html.erb b/app/views/courses/_history.html.erb index 7b388adc4..e7c5a7c5e 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -5,7 +5,7 @@
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
-
+
@@ -15,7 +15,7 @@ <%= format_time(journal.created_on) %>
-

+

<%= journal.notes.html_safe %>

diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index d7bec4a4f..fe73d3d75 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -68,13 +68,13 @@
<%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%>
-
+
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %> <%= format_time(comment.created_on) %>
-

<%= comment.comments.html_safe %>

+

<%= comment.comments.html_safe %>

<%= link_to_if_authorized_course image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, 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