socialforge/app/views/users/_user_message_applide_actio...

33 lines
2.0 KiB
Plaintext

<% ma = ma.nil? ? @applied_message : ma %>
<% if allow_to_show(ma) %>
<%= 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", :style => "font-size: 14px;" %> |
<%= 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",:style => "font-size: 14px;" %>
<% elsif ma.status == 2 %>
<span style="font-size:14px;">已处理</span>
<% elsif ma.status == 4 %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<span style="font-size:14px" title="<%= operator %>已拒绝">
<%= operator %>已拒绝
</span>
<% elsif ma.status == 5 %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.applied_user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<span style="font-size:14px" title="<%= operator %>已拒绝">
<%= operator %>已拒绝
</span>
<% elsif ma.status == 6 %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 6", ma.applied_id, ma.user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<span style="font-size:14px" title="<%= operator %>已同意">
<%= operator %>已同意
</span>
<% elsif ma.status == 7 %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 6", ma.applied_id, ma.applied_user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<span style="font-size:14px" title="<%= operator %>已同意">
<%= operator %>已同意
</span>
<% end %>