From dd1dd143f61c6015e00a9af5e83323e63673d9eb Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 17 Aug 2015 16:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E6=B6=88=E6=81=AF=E6=98=BE=E7=A4=BA?= 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 | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d0b3f91be..a6f756490 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -123,7 +123,7 @@ class UsersController < ApplicationController @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc") when "" when 'issue' - @user_course_messages = CourseMessage.where("course_message_type =? and user_id =?", "Issue", @user).order("created_at desc") + @user_course_messages = ForgeMessage.where("course_message_type =? and user_id =?", "Issue", @user).order("created_at desc") end respond_to do |format| format.html{render :layout=>'base_users_new'} diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index c14a741a3..70e2d7e1a 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -13,6 +13,7 @@
  • <%= link_to "课程通知",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'news'} %>
  • <%= link_to "问卷调查",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'poll'} %>
  • +
  • <%= link_to "指派给我",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'issue'} %>
  • @@ -70,6 +71,12 @@ <% end %>
    <% end %> + + <% @user_forge_messages.each do |ufm| %> + <% if ufm.forge_message_type == "Issue" %> + + <% end %> + <% end %> <% else %>
    暂无消息!
    <% end %>