code layout clean up app/views/projects/settings/_members.html.erb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8602 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-01-10 08:05:28 +00:00
parent 413b0cc324
commit e2e872dc72
1 changed files with 14 additions and 7 deletions

View File

@ -28,17 +28,24 @@
<% end %></p>
<%= hidden_field_tag 'member[role_ids][]', '' %>
<p><%= submit_tag l(:button_change), :class => "small" %>
<%= link_to_function l(:button_cancel), "$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;" %></p>
<%= link_to_function l(:button_cancel),
"$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;"
%></p>
<% end %>
<% end %>
</td>
<td class="buttons">
<%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
<%= link_to_remote(l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member},
:method => :post,
:confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil)
}, :title => l(:button_delete),
:class => 'icon icon-del') if member.deletable? %>
<%= link_to_function l(:button_edit),
"$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;",
:class => 'icon icon-edit' %>
<%= link_to_remote(
l(:button_delete),
{ :url => {:controller => 'members', :action => 'destroy', :id => member},
:method => :post,
:confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil) },
:title => l(:button_delete),
:class => 'icon icon-del'
) if member.deletable? %>
</td>
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
</tr>