diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-07 10:26:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-07 10:26:36 +0000 |
commit | a4f167ec1a6d8cb3707716e73378e98e870d466f (patch) | |
tree | 0a7a6317e9c4488f3bf0d121c7ee844343040c93 /app/views/principal_memberships/_index.html.erb | |
parent | e29b4ba26ad18a1ab871effe0fa5e11c2a2b189e (diff) | |
download | redmine-a4f167ec1a6d8cb3707716e73378e98e870d466f.tar.gz redmine-a4f167ec1a6d8cb3707716e73378e98e870d466f.zip |
Don't render memberships forms, use #edit instead.
git-svn-id: http://svn.redmine.org/redmine/trunk@16149 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/principal_memberships/_index.html.erb')
-rw-r--r-- | app/views/principal_memberships/_index.html.erb | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/app/views/principal_memberships/_index.html.erb b/app/views/principal_memberships/_index.html.erb index 76a629f95..b451f536b 100644 --- a/app/views/principal_memberships/_index.html.erb +++ b/app/views/principal_memberships/_index.html.erb @@ -1,5 +1,3 @@ -<% roles = Role.find_all_givable %> - <p><%= link_to l(:label_add_projects), new_principal_membership_path(principal), :remote => true, :class => "icon icon-add" %></p> <% if principal.memberships.any? %> @@ -19,26 +17,13 @@ </td> <td class="roles"> <span id="member-<%= membership.id %>-roles"><%=h membership.roles.sort.collect(&:to_s).join(', ') %></span> - <%= form_for(:membership, :remote => true, - :url => principal_membership_path(principal, membership), :method => :put, - :html => {:id => "member-#{membership.id}-roles-form", - :style => 'display:none;'}) do %> - <p><% roles.each do |role| %> - <label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role), - :disabled => membership.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?}, - :id => nil %> <%=h role %></label><br /> - <% end %></p> - <%= hidden_field_tag 'membership[role_ids][]', '', :id => nil %> - <p><%= submit_tag l(:button_change) %> - <%= link_to_function l(:button_cancel), - "$('#member-#{membership.id}-roles').show(); $('#member-#{membership.id}-roles-form').hide(); return false;" - %></p> - <% end %> + <div id="member-<%= membership.id %>-form"></div> </td> <td class="buttons"> - <%= link_to_function l(:button_edit), - "$('#member-#{membership.id}-roles').hide(); $('#member-#{membership.id}-roles-form').show(); return false;", - :class => 'icon icon-edit' + <%= link_to l(:button_edit), + edit_principal_membership_path(principal, membership), + :remote => true, + :class => 'icon icon-edit' %> <%= delete_link principal_membership_path(principal, membership), :remote => true if membership.deletable? %> </td> |