From 2160d508f30d74721c228d9e2942e9f4f96fe5f2 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 16 Oct 2015 10:31:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=9B=B4=E6=94=B9=E5=8A=A0=E5=85=A5=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=BB=A5=E5=8F=8A=E7=A7=BB=E5=87=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=9A=84=E6=8F=90=E7=A4=BA=EF=BC=9B=202.?= =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E5=8F=91=E5=B8=83=E4=BD=9C=E4=B8=9A=E6=B6=88?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E5=BD=93=E4=BD=9C=E4=B8=9A=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=EF=BC=9B=203.=E6=B6=88=E6=81=AF=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E2=80=9C=E5=85=A8=E9=83=A8=E2=80=9D=E6=94=B9=E6=88=90?= =?UTF-8?q?=E2=80=9C=E6=89=80=E6=9C=89=E6=B6=88=E6=81=AF=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- .../users/_selector_for_messages.html.erb | 4 ++-- app/views/users/_user_message_course.html.erb | 2 +- app/views/users/_user_message_forge.html.erb | 20 ++++++++++++++----- 4 files changed, 19 insertions(+), 9 deletions(-) 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) %>