diff --git a/app/views/projects/settings/_new_members.html.erb b/app/views/projects/settings/_new_members.html.erb
index e4fb0f73f..1bb0757c0 100644
--- a/app/views/projects/settings/_new_members.html.erb
+++ b/app/views/projects/settings/_new_members.html.erb
@@ -33,6 +33,7 @@
<%= i += 1 %> |
<%= link_to_user_header member.principal, true %> |
+
<% if User.current.language == "zh" %>
<% zh_roles = [] %>
<% member.roles.each do |role| %>
@@ -45,13 +46,23 @@
end
%>
<% end %>
- <%= h zh_roles.sort.reverse.collect(&:to_s).join(', ') %>
+
<% else %>
- <%= h member.roles.sort.collect(&:to_s).join(', ') %>
- <% end %> |
+
+ <% end %>
+ <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
+ :method => :put,
+ :html => {:id => "members-#{member.id}-roles-form", :class => 'undis'}}
+ ) do |f| %>
+ <%= select( :membership, :roles, [["管理人员",3],["开发人员",4],["报告人员",5]],
+ { :include_blank => false, :selected => member.roles[0].id ? member.roles[0].id : 0 },
+ { :onchange=>"remote_function('#members-#{member.id}-roles-form');", :id =>"membership[role_ids][]", :name => "membership[role_ids][]", :style => "border:1px solid #e5e5e5;"}) %>
+
+ <% end %>
+
<% unless member.user_id == @project.user_id %>
- 编辑
+ 编辑
<%= delete_link membership_path(member),
:remote => true,
:class => "sy_btn_grey mr5",
@@ -279,4 +290,7 @@
function add_members_submit(){
$("#new_membership").submit();
}
+ function remote_function(id) {
+ $(id).submit();
+ }
\ No newline at end of file
|