修改方式就用户图像显示
This commit is contained in:
parent
643b06484b
commit
8d625eff5e
|
@ -77,9 +77,11 @@ class MembersController < ApplicationController
|
|||
project.user_grades << user_grades unless user_grades.first.user_id.nil?
|
||||
@applied_message.update_attribute(:status, 2)
|
||||
# 添加成功后,申请人收到消息
|
||||
AppliedMessage.create(:user_id => @applied_message.applied_user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 6, :viewed => true, :applied_user_id => @applied_message.user_id, :role => applied_project.role)
|
||||
AppliedMessage.create(:user_id => @applied_message.applied_user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,
|
||||
:status => 6, :viewed => true, :applied_user_id => @applied_message.user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||
# 添加成功后,批准人收到消息
|
||||
AppliedMessage.create(:user_id => @applied_message.user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 7, :viewed => true, :applied_user_id => @applied_message.applied_user_id, :role => applied_project.role)
|
||||
AppliedMessage.create(:user_id => @applied_message.user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,
|
||||
:status => 7, :viewed => true, :applied_user_id => @applied_message.applied_user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||
rescue Exception => e
|
||||
puts e
|
||||
end
|
||||
|
@ -96,9 +98,11 @@ class MembersController < ApplicationController
|
|||
@applied_message.update_attribute(:status, 3)
|
||||
applied_project = @applied_message.applied
|
||||
# 发送消息给被拒者,user_id对应的收到信息的用户
|
||||
AppliedMessage.create(:user_id => @applied_message.applied_user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 4, :viewed => true, :applied_user_id => @applied_message.user_id, :role => applied_project.role)
|
||||
AppliedMessage.create(:user_id => @applied_message.applied_user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 4,
|
||||
:viewed => true, :applied_user_id => @applied_message.user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||
# 发送消息给拒绝者
|
||||
AppliedMessage.create(:user_id => @applied_message.user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 5, :viewed => true, :applied_user_id => @applied_message.applied_user_id, :role => applied_project.role)
|
||||
AppliedMessage.create(:user_id => @applied_message.user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 5,
|
||||
:viewed => true, :applied_user_id => @applied_message.applied_user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||
# applied_project.delete
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% if allow_to_show(ma) %>
|
||||
:<%= link_to "同意", allow_to_join_project_project_memberships_path(:project_id => ma.applied.project, :applied_message_id => ma.id), :remote => true, :method => :post, :class => "link-blue"%> |
|
||||
<%= link_to "拒绝", refused_allow_to_join_project_project_memberships_path(:project_id => ma.applied.project, :applied_message_id => ma.id), :remote => true, :method => :get, :class => "link-blue" %>
|
||||
:<%= link_to "同意", allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id), :remote => true, :method => :post, :class => "link-blue"%> |
|
||||
<%= link_to "拒绝", refused_allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id), :remote => true, :method => :get, :class => "link-blue" %>
|
||||
<% elsif ma.status == 4 %>
|
||||
<span class="fontGrey3">被拒绝</span>
|
||||
<% elsif ma.status == 5 %>
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
<% elsif ma && ma.applied_type == "AppliedProject" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.applied.user), :width => "30", :height => "30"), user_path(ma.applied.user), :target => '_blank' %></a>
|
||||
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(applied_project_users(ma)), :width => "30", :height => "30"), user_path(applied_project_users(ma)), :target => '_blank' %></a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= render :partial => "users/user_message_applide_users", :locals =>{:ma => ma} %>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl" style="width:283px;"><a href="javascript:void(0);" class="newsGrey">
|
||||
以“<%= applied_project_message_type(ma.role) %>”身份加入
|
||||
<%= link_to ma.applied.project, project_path(ma.applied.project), :class => "link-blue", :target => '_blank' %>
|
||||
<%= link_to ma.applied.project, project_path(ma.project_id), :class => "link-blue", :target => '_blank' %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="fl" style="width:71px; height:49px;">
|
||||
|
|
Loading…
Reference in New Issue