From b8884a98dd15997beef796730a1424c8af395a18 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 13 Aug 2013 14:52:32 +0200 Subject: [PATCH] SONAR-4000 When deleting a resource in the bulk deletion page, the selected tab always come back to "Projects" --- .../WEB-INF/app/controllers/bulk_deletion_controller.rb | 4 ++-- .../webapp/WEB-INF/app/views/bulk_deletion/index.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/bulk_deletion_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/bulk_deletion_controller.rb index b667d4ccc0a..5f1bb4f95cd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/bulk_deletion_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/bulk_deletion_controller.rb @@ -101,7 +101,7 @@ class BulkDeletionController < ApplicationController # display the same page again and again # => implicit render "pending_deletions.html.erb" else - redirect_to :action => 'index' + redirect_to :action => 'index', :resource_type => params[:resource_type] end end @@ -109,7 +109,7 @@ class BulkDeletionController < ApplicationController # It is important to reinit the ResourceDeletionManager so that the deletion screens can be available again ResourceDeletionManager.instance.reinit - redirect_to :action => 'index' + redirect_to :action => 'index', :resource_type => params[:resource_type] end private diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/bulk_deletion/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/bulk_deletion/index.html.erb index 5f4965695e7..29d2118ae52 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/bulk_deletion/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/bulk_deletion/index.html.erb @@ -30,7 +30,7 @@ <%= message('no_results') -%> <% else %> - <% form_remote_tag( :url => {:action => 'delete_resources'}, :loading => "window.location='#{url_for :action => 'pending_deletions'}';") do %> + <% form_remote_tag( :url => {:action => 'delete_resources'}, :loading => "window.location='#{url_for :action => 'pending_deletions', :resource_type => @selected_tab}';") do %> -- 2.39.5