From 4d6d9b3f44be777355077b4990976277de3d02f2 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Tue, 4 Dec 2012 12:34:13 +0100 Subject: [PATCH] SONAR-3972 Add sidebar again on QP/Deps/Compare pages --- .../main/webapp/WEB-INF/app/controllers/alerts_controller.rb | 1 + .../webapp/WEB-INF/app/controllers/comparison_controller.rb | 3 ++- .../webapp/WEB-INF/app/controllers/dependencies_controller.rb | 3 ++- .../main/webapp/WEB-INF/app/controllers/profiles_controller.rb | 2 ++ .../WEB-INF/app/controllers/rules_configuration_controller.rb | 2 ++ .../src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb | 2 +- 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb index 586e91dca1f..cbf41726cb6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb @@ -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 # # diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb index 4d0ebd0ac2b..238de579673 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb @@ -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 diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb index 74b131dc148..c00e28ebc75 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb @@ -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 diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index f05ebdaa0d0..124ca9d1c13 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -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 diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb index 3282b6192ce..7b1298d66ac 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb @@ -21,6 +21,8 @@ require 'cgi' class RulesConfigurationController < ApplicationController + SECTION=Navigation::SECTION_RESOURCE + STATUS_ACTIVE = "ACTIVE" STATUS_INACTIVE = "INACTIVE" ANY_SELECTION = [["Any", '']] diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb index ced69136e08..7e96c4edb51 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb @@ -64,7 +64,7 @@
  • -
  • +
  • <%= message('quality_profiles.page') -%>
  • <%= message('dependencies.page') -%>
  • -- 2.39.5