diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3de491421..10b55d1cd 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -145,7 +145,7 @@ class UsersController < ApplicationController when 'forge_news' @message_alls = ForgeMessage.where("forge_message_type in (?,?) and user_id =?", "News", "Comment", @user).order("created_at desc") when 'apply' - @message_alls = ForgeMessage.where("forge_message_type in ('ProjectInvite', 'AppliedProject') and user_id =?", @user).order("created_at desc") + @message_alls = ForgeMessage.where("forge_message_type in ('ProjectInvite', 'AppliedProject', 'JoinProject', 'RemoveFromProject') and user_id =?", @user).order("created_at desc") #贴吧消息 when 'forum' diff --git a/app/views/users/_selector_for_messages.html.erb b/app/views/users/_selector_for_messages.html.erb index e7884fc60..10c7e3e34 100644 --- a/app/views/users/_selector_for_messages.html.erb +++ b/app/views/users/_selector_for_messages.html.erb @@ -19,7 +19,7 @@
  • <%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "homepageTypePTask postTypeGrey" %>
  • <%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "homepagePostTypeForum postTypeGrey" %>
  • <%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "homepageTypePNews postTypeGrey" %>
  • -
  • <%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "homepageTypeUApply postTypeGrey" %>
  • +
  • <%= link_to "加入项目", user_message_path(User.current, :type => 'apply'), :class => "homepageTypeUApply postTypeGrey" %>
  • @@ -27,7 +27,7 @@
  • <% end %> - <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %> + <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? && !ma.course_message.nil? %> @@ -52,12 +57,17 @@ ">将您移出了项目:
  • - <%= link_to ma.project, project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", + <%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :onmouseover => "message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
  • <%= time_tag(ma.created_at).html_safe %>
  • @@ -71,7 +81,7 @@
  • <%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %> - '>邀请你加入项目 + '>邀请你加入项目:
  • <% if ma.user.member_of?(ma.project) %>