]> source.dussan.org Git - redmine.git/commitdiff
Redirect to the current page when reordering roles (#18769).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 7 Jan 2015 22:52:23 +0000 (22:52 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 7 Jan 2015 22:52:23 +0000 (22:52 +0000)
Patch by Jérôme BATAILLE.

git-svn-id: http://svn.redmine.org/redmine/trunk@13852 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/roles_controller.rb
app/views/roles/index.html.erb

index a74d8bb915c104ca7b9875803a9d092dfb034fbe..79dec9d51aad55c5d2305f565833baddab99a77a 100644 (file)
@@ -71,7 +71,7 @@ class RolesController < ApplicationController
   def update
     if @role.update_attributes(params[:role])
       flash[:notice] = l(:notice_successful_update)
-      redirect_to roles_path
+      redirect_to roles_path(:page => params[:page])
     else
       render :action => 'edit'
     end
index 9eaab23b691b597e34ec4759d41e13b018dd1ef7..19a6c42c4dfcde673c981d814c9ceb0ed04a31fb 100644 (file)
@@ -17,7 +17,7 @@
   <td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), edit_role_path(role))) %></td>
   <td class="reorder">
   <% unless role.builtin? %>
-    <%= reorder_links('role', {:action => 'update', :id => role}, :put) %>
+    <%= reorder_links('role', {:action => 'update', :id => role, :page => params[:page]}, :put) %>
   <% end %>
   </td>
   <td class="buttons">