Defect #18769 » RM_18769_move_role_stay_on_same_page.diff
app/views/roles/index.html.erb (copie de travail) | ||
---|---|---|
17 | 17 |
<td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), edit_role_path(role))) %></td> |
18 | 18 |
<td class="reorder"> |
19 | 19 |
<% unless role.builtin? %> |
20 |
<%= reorder_links('role', {:action => 'update', :id => role}, :put) %> |
|
20 |
<%= reorder_links('role', {:action => 'update', :id => role, :page => params[:page]}, :put) %>
|
|
21 | 21 |
<% end %> |
22 | 22 |
</td> |
23 | 23 |
<td class="buttons"> |
app/controllers/roles_controller.rb (copie de travail) | ||
---|---|---|
71 | 71 |
def update |
72 | 72 |
if request.put? and @role.update_attributes(params[:role]) |
73 | 73 |
flash[:notice] = l(:notice_successful_update) |
74 |
redirect_to roles_path |
|
74 |
redirect_to roles_path(:page => params[:page])
|
|
75 | 75 |
else |
76 | 76 |
render :action => 'edit' |
77 | 77 |
end |