diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 91743289a..c21446e86 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -92,6 +92,22 @@ module UsersHelper end end + # 单位申请消息:通过用户的状态判断 + # status(0:申请消息;1,2,3:系统消息) + def applied_school_users applied_message + user = User.find(applied_message.applied_user_id) + end + + # 单位申请消息通过状态判断tip描述 + def applied_school_tip applied_message + case applied_message.status + when 1,2,3 + "您添加新的单位:" + when 0 + "申请了单位:" + end + end + def get_resource_origin attach type = attach.container_type content = attach.container diff --git a/app/views/users/_user_message_applied.html.erb b/app/views/users/_user_message_applied.html.erb index 494489a95..eef6128f3 100644 --- a/app/views/users/_user_message_applied.html.erb +++ b/app/views/users/_user_message_applied.html.erb @@ -1,51 +1,24 @@ <% if ma.class == AppliedMessage %> <% if ma.applied_type == "ApplyAddSchools" %> - <% if ma.status == 1 || ma.status == 2 || ma.status == 3 || ma.status == 0 %> - <% end %> <% elsif ma && ma.applied_type == "AppliedProject" %>