]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3972 Add sidebar again on QP/Deps/Compare pages
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Tue, 4 Dec 2012 11:34:13 +0000 (12:34 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Tue, 4 Dec 2012 14:35:02 +0000 (15:35 +0100)
sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb

index 586e91dca1fa0ac457dd5e69907b9be0eeec3d86..cbf41726cb68d6f9864b9362542525f2b619345e 100644 (file)
@@ -22,6 +22,7 @@ class AlertsController < ApplicationController
   verify :method => :post, :only => ['create', 'update', 'delete'], :redirect_to => { :action => 'index' }
   before_filter :admin_required, :except => [ 'index' ]
 
+  SECTION=Navigation::SECTION_RESOURCE
 
   #
   #
index 4d0ebd0ac2b50432846c781725b90558f30ad3a1..238de579673609d821250d6baad7549cc8e4d542 100644 (file)
@@ -19,6 +19,8 @@
 #
 
 class ComparisonController < ApplicationController
+
+  SECTION=Navigation::SECTION_RESOURCE
   
   def index
     snapshots = []
@@ -61,7 +63,6 @@ class ComparisonController < ApplicationController
     unless @snapshots.empty?
       @permalink = url_for :controller => 'comparison', :action => 'index', :sids => @snapshots.map {|s| s.id.to_s}.join(','), :metrics => @metrics.map {|m| m.key}.join(',')
     end
-    add_breadcrumbs message('sidebar.tools'), {:name => message('comparison.page'), :url => {:controller => 'comparison', :action => 'index'}}
   end
   
   def versions
index 74b131dc148d5d3ef1e31c72f8760282e31bbc57..c00e28ebc753ec1e4de9bca9497e38476b7102dc 100644 (file)
@@ -19,6 +19,8 @@
 #
 class DependenciesController < ApplicationController
 
+  SECTION=Navigation::SECTION_RESOURCE
+
   SEARCH_MINIMUM_SIZE=3
   QUALIFIERS=['TRK', 'BRC', 'LIB']
 
@@ -93,7 +95,6 @@ class DependenciesController < ApplicationController
 
     end
     
-    add_breadcrumbs message('sidebar.tools'), {:name => message('dependencies.page'), :url => {:controller => 'dependencies', :action => 'index'}}
   end
 
   private
index f05ebdaa0d049efbb6366f9893dfda28bdec99d3..124ca9d1c136966b5193f7d6e602b6c1275b6768 100644 (file)
@@ -22,6 +22,8 @@ class ProfilesController < ApplicationController
   # the backup action is allow to non-admin users : see http://jira.codehaus.org/browse/SONAR-2039
   before_filter :admin_required, :only => ['create', 'delete', 'set_as_default', 'copy', 'restore', 'change_parent', 'set_projects', 'rename_form', 'rename']
 
+  SECTION=Navigation::SECTION_RESOURCE
+    
   ROOT_BREADCRUMB = {:name => Api::Utils.message('quality_profiles.page'), :url => {:controller => 'profiles', :action => 'index'}}
 
   # GET /profiles/index
index 3282b6192ce58bc02809d87d59599a3ba1cb13af..7b1298d66ac1868c9af2c851f269c615d31f1203 100644 (file)
@@ -21,6 +21,8 @@ require 'cgi'
 
 class RulesConfigurationController < ApplicationController
 
+  SECTION=Navigation::SECTION_RESOURCE
+  
   STATUS_ACTIVE = "ACTIVE"
   STATUS_INACTIVE = "INACTIVE"
   ANY_SELECTION = [["Any", '']]
index ced69136e0882decef0ca15bae6c639224658d0b..7e96c4edb51cfd732230c6f4fc9b5fb0ff3952a9 100644 (file)
@@ -64,7 +64,7 @@
             <li class="spacer"></li>
             <li class="sidebar-title"><%= message('sidebar.tools') -%></li>
             
-            <li class="<%= 'active' if request.request_uri.include?('/profiles') -%>">
+            <li class="<%= 'active' if request.request_uri.include?('/profiles') || request.request_uri.include?('/alerts') || request.request_uri.include?('/rules_configuration') -%>">
               <a href="<%= ApplicationController.root_context -%>/profiles"><%= message('quality_profiles.page') -%></a></li>
             <li class="<%= 'active' if request.request_uri.include?('/dependencies/index') -%>">
               <a href="<%= ApplicationController.root_context -%>/dependencies/index"><%= message('dependencies.page') -%></a></li>