aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-07-08 15:48:33 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-07-08 15:58:39 +0200
commit790ad90e8e591bcd3a761156687cae9cc14e46ad (patch)
tree5d63a2984d0d3eb81d53994b52d839b7427f3507
parent32580230d884afcb0268b969218ee4b82ea963f9 (diff)
downloadsonarqube-790ad90e8e591bcd3a761156687cae9cc14e46ad.tar.gz
sonarqube-790ad90e8e591bcd3a761156687cae9cc14e46ad.zip
SONAR-4408 Remove side bar on quality profile pages
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb5
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb3
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 %>
- <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>
-
<% if is_admin? %>
<li class="spacer"></li>