From 7499f4659d4fe38f178ed76e38089978393ca8f4 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Wed, 19 Oct 2016 15:35:37 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE=EF=BC=8C?=
=?UTF-8?q?=E6=88=90=E5=91=98=E7=95=8C=E9=9D=A2=EF=BC=8C=E7=82=B9=E5=87=BB?=
=?UTF-8?q?=E6=93=8D=E4=BD=9C-=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=EF=BC=8C=E8=A7=92=E8=89=B2=E5=87=BA=E7=8E=B0=E4=B8=8B=E6=8B=89?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../projects/settings/_new_members.html.erb | 22 +++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
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
|