From 790ad90e8e591bcd3a761156687cae9cc14e46ad Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 8 Jul 2013 15:48:33 +0200 Subject: [PATCH] SONAR-4408 Remove side bar on quality profile pages --- .../main/webapp/WEB-INF/app/controllers/alerts_controller.rb | 2 +- .../webapp/WEB-INF/app/controllers/application_controller.rb | 5 +++++ .../webapp/WEB-INF/app/controllers/profiles_controller.rb | 4 ++-- .../app/controllers/rules_configuration_controller.rb | 2 +- .../main/webapp/WEB-INF/app/views/layouts/_layout.html.erb | 3 --- 5 files changed, 9 insertions(+), 7 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 efe4831f168..55f1f08497b 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 @@ -19,7 +19,7 @@ # class AlertsController < ApplicationController - SECTION=Navigation::SECTION_CONFIGURATION + before_filter :hide_sidebar # # diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb index bdf1e5196ff..cc099e2d303 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb @@ -235,6 +235,10 @@ class ApplicationController < ActionController::Base @breadcrumbs.concat(breadcrumbs) end + def hide_sidebar + @hide_sidebar = true + end + # # SETTINGS # @@ -260,4 +264,5 @@ class ApplicationController < ActionController::Base def subcategory_name(category, subcategory) message("property.category.#{category}.#{subcategory}", :default => subcategory) end + end 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 1e41b617a75..3b3ae453aad 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 @@ -19,10 +19,10 @@ # class ProfilesController < ApplicationController - SECTION=Navigation::SECTION_CONFIGURATION - ROOT_BREADCRUMB = {:name => Api::Utils.message('quality_profiles.page'), :url => {:controller => 'profiles', :action => 'index'}} + before_filter :hide_sidebar + # GET /profiles/index def index add_breadcrumbs ROOT_BREADCRUMB 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 12aa5b8d79c..1daadeaba3d 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,7 +21,7 @@ require 'cgi' class RulesConfigurationController < ApplicationController - SECTION=Navigation::SECTION_CONFIGURATION + before_filter :hide_sidebar STATUS_ACTIVE = "ACTIVE" STATUS_INACTIVE = "INACTIVE" 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 4fac0043ac1..34f129215a7 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 @@ -104,9 +104,6 @@ <% elsif selected_section==Navigation::SECTION_CONFIGURATION %> -
  • - <%= message('quality_profiles.page') -%>
  • - <% if is_admin? %>
  • -- 2.39.5