issue控制层消息
This commit is contained in:
parent
dd1dd143f6
commit
71f6927145
|
@ -107,11 +107,11 @@ class UsersController < ApplicationController
|
|||
# if User.current.id == @user.id
|
||||
# querys.update_all(:viewed => true)
|
||||
# end
|
||||
if @user.course_messages
|
||||
|
||||
case params[:type]
|
||||
when nil
|
||||
@user_course_messages = @user.course_messages.reverse
|
||||
@user_project_messges = @user.forge_messages.reverse
|
||||
@user_forge_messages = @user.forge_messages.reverse
|
||||
when 'homework'
|
||||
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc")
|
||||
when 'message'
|
||||
|
@ -121,14 +121,12 @@ class UsersController < ApplicationController
|
|||
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc")
|
||||
when 'poll'
|
||||
@user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
|
||||
when ""
|
||||
when 'issue'
|
||||
@user_course_messages = ForgeMessage.where("course_message_type =? and user_id =?", "Issue", @user).order("created_at desc")
|
||||
@user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc")
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html{render :layout=>'base_users_new'}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def user_projects_index
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<!--项目消息-->
|
||||
<% elsif !@user_forge_messages.blank? %>
|
||||
<% @user_forge_messages.each do |ufm| %>
|
||||
<% if ufm.forge_message_type == "Issue" %>
|
||||
|
||||
|
|
Loading…
Reference in New Issue