aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-08-13 14:52:32 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-08-13 14:52:43 +0200
commitb8884a98dd15997beef796730a1424c8af395a18 (patch)
tree16ced9c15e7e27703b4a3cd38724a70a0f07a7e2
parente91cb941dc81c7a6d38e25ce1dae728c1da381da (diff)
downloadsonarqube-b8884a98dd15997beef796730a1424c8af395a18.tar.gz
sonarqube-b8884a98dd15997beef796730a1424c8af395a18.zip
SONAR-4000 When deleting a resource in the bulk deletion page, the selected tab always come back to "Projects"
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/bulk_deletion_controller.rb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/bulk_deletion/index.html.erb2
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 %>
<table class="data" id="resources-to-delete">
<tfoot>