]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4408 Remove side bar on quality profile pages
authorJulien Lancelot <julien.lancelot@gmail.com>
Mon, 8 Jul 2013 13:48:33 +0000 (15:48 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Mon, 8 Jul 2013 13:58:39 +0000 (15:58 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/application_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 efe4831f168cd7ecbfa1afafca95456efc68e586..55f1f08497b952092d2f257afd3b249ce09081ca 100644 (file)
@@ -19,7 +19,7 @@
 #
 class AlertsController < ApplicationController
 
-  SECTION=Navigation::SECTION_CONFIGURATION
+  before_filter :hide_sidebar
 
   #
   #
index bdf1e5196ffea0e806322bd8e11f7818301a3eef..cc099e2d303fcb6665943df54e96a5fec3892594 100644 (file)
@@ -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
index 1e41b617a758b3f4e7afb160cc279b83820a5bb6..3b3ae453aadcd6edd046e901b9979a9317f3e0aa 100644 (file)
 #
 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
index 12aa5b8d79cf8931c59d85337d9a958eba3f708a..1daadeaba3ddd5bf022e08c3a73d5da7f93f43b1 100644 (file)
@@ -21,7 +21,7 @@ require 'cgi'
 
 class RulesConfigurationController < ApplicationController
 
-  SECTION=Navigation::SECTION_CONFIGURATION
+  before_filter :hide_sidebar
 
   STATUS_ACTIVE = "ACTIVE"
   STATUS_INACTIVE = "INACTIVE"
index 4fac0043ac16e1fbcc92a0d81f1bb4b8077310d3..34f129215a72e62d18124023312f06ba74516d41 100644 (file)
 
           <% 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>