From 3e4f726855de4448c0fa8e6d7f2a2984d81a785c Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 18 Aug 2015 14:43:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=95=99=E8=A8=80=E3=80=81?= =?UTF-8?q?=E6=8C=87=E6=B4=BE=E7=BB=99=E6=88=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 3 +++ app/views/users/user_messages.html.erb | 34 +++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 770d7d049..dbcbdefa6 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -126,6 +126,9 @@ class UsersController < ApplicationController when 'issue' @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc") @user_course_messages = nil + when 'journal' + @user_forge_messages = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc") + @user_course_messages = nil 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 2e7b110bf..c23ad3716 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -14,6 +14,7 @@
  • <%= 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'} %>
  • +
  • <%= link_to "问题更新",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'journal'} %>
  • @@ -76,9 +77,36 @@ <% unless @user_forge_messages.nil? %> <% @user_forge_messages.each do |ufm| %> - <% if ufm.forge_message_type == "Issue" %> - 22222 - <% end %> + <% if ufm.forge_message_type == "Issue" %> + + <% end %> + <% if ufm.forge_message_type == "Journal" %> + + <% end %> <% end %> <% end %> <% else %>