diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3e50f3131..d1073c8c3 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -130,6 +130,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 93e0fe967..af2ebd902 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 %>