From 31c5cf2163cbc9af2c32c2986a440125f430ed00 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 25 Sep 2015 16:30:00 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B0=86=E4=BD=9C=E5=93=81=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E3=80=81=E5=9B=9E=E5=A4=8D=E4=BD=9C=E5=93=81=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E7=AD=89=E5=8A=A0=E5=85=A5=E8=87=B3=E4=BD=9C=E4=B8=9A=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- app/views/users/user_messages.html.erb | 39 +++++++++++++------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 35860c728..9a6f72e2e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -130,7 +130,7 @@ class UsersController < ApplicationController when 'apply' @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc") when 'homework' - @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc") + @message_alls = CourseMessage.where("course_message_type in ('HomeworkCommon','StudentWorksScore','JournalsForMessage') and user_id =?", @user).order("created_at desc") when 'course_message' @message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc") # when 'forge_message' diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index af533fe97..d207150b8 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -397,25 +397,26 @@ <% end %> <% if ma.course_message_type == "JournalsForMessage" %> <% if ma.course_message.jour_type == 'Course' %> - - + <% if params[:type] != 'homework' %> + + <% end %> <% else %>