]> source.dussan.org Git - sonarqube.git/commitdiff
Always display tabs in the bulk edition console, even if they're empty
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 12 Jul 2012 16:41:59 +0000 (18:41 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 12 Jul 2012 16:41:59 +0000 (18:41 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/bulk_deletion_controller.rb

index ad3869792e7889bcd76eae9b36bdf7f15da5e1fb..1d8c239389c35d3c22acda81b78ce090cdf77b92 100644 (file)
@@ -33,13 +33,7 @@ class BulkDeletionController < ApplicationController
       @deletion_manager = deletion_manager
       render :template => 'bulk_deletion/pending_deletions'
     else      
-      # the "Projects" tab is always displayed
-      @tabs = ['TRK']
-      Java::OrgSonarServerUi::JRubyFacade.getInstance().getQualifiersWithProperty('deletable').each do |qualifier|
-        if qualifier!='TRK' && Project.count(:all, :conditions => {:qualifier => qualifier}) > 0
-          @tabs << qualifier
-        end
-      end
+      @tabs = Java::OrgSonarServerUi::JRubyFacade.getInstance().getQualifiersWithProperty('deletable')
       
       @selected_tab = params[:resource_type]
       @selected_tab = 'TRK' unless @tabs.include?(@selected_tab)