Merge branch 'dev_hjq' into szzh

This commit is contained in:
huang 2015-06-09 13:00:11 +08:00
commit 46952212e4
3 changed files with 4 additions and 4 deletions

View File

@ -127,12 +127,12 @@ class Mailer < ActionMailer::Base
# @homeworks = HomeworkAttach.where("user_id=#{user.id} and (created_at between '#{date_from}' and '#{date_to}')").order("created_at desc")
# 查询user在课程中发布的讨论帖子
course_mesages = Message.find_by_sql("select me.* from messages me, boards b, members m where
course_mesages = Message.find_by_sql("select distinct me.* from messages me, boards b, members m where
b.id = me.board_id and b.course_id = m.course_id
and b.course_id is not Null and m.user_id = '#{user.id}'
and (me.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
# 查询user在项目中发布的讨论帖子
project_messages = Message.find_by_sql("select me.* from messages me, boards b, members m where
project_messages = Message.find_by_sql("select distinct me.* from messages me, boards b, members m where
b.id = me.board_id and b.project_id = m.project_id
and b.project_id != '-1' and m.user_id = '#{user.id}' and (me.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
# messages = Message.find_by_sql("select DISTINCT * from messages where author_id = #{user.id} and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")

View File

@ -108,7 +108,7 @@
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= l(:view_borad_course) %>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_messages.count %>)</span>
</h4>
<% @course_messages.each do |course_message|%>
<li style="clear: both; list-style: none;">

View File

@ -88,7 +88,7 @@
<% unless @course_messages.first.nil? %>
<%= l(:view_borad_course) %>
(<%= @course_journal_messages.count %>)
(<%= @course_messages.count %>)
<% @course_messages.each do |course_message|%>