From 1d645c191794a6b1b02344512b7e0b2f53a1bdfd Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Mon, 10 Dec 2012 10:46:05 +0100 Subject: [PATCH] SONAR-3972 Refactor the access to Sonar settings --- .../resources/org/sonar/l10n/core.properties | 2 +- .../app/controllers/alerts_controller.rb | 2 +- .../app/controllers/profiles_controller.rb | 2 +- .../rules_configuration_controller.rb | 2 +- .../WEB-INF/app/views/layouts/_layout.html.erb | 18 ++++++++++-------- .../layouts/_menu_administration.html.erb | 16 ++++++++++++++++ .../src/main/webapp/stylesheets/layout.css | 2 +- 7 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_administration.html.erb diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 05d9ec54185..89ac6e6ba43 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -283,7 +283,7 @@ layout.home=Home layout.login=Log in layout.logout=Log out layout.measures=Measures -layout.administration=Administration +layout.settings=Settings layout.print=Print layout.permalink=Permalink layout.sonar.slogan=Embrace Quality 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 f28ddf424a8..524cd8d1487 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,7 +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_HOME + SECTION=Navigation::SECTION_CONFIGURATION # # 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 ee1ce27ace3..ba08fb9de42 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,7 +22,7 @@ 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_HOME + SECTION=Navigation::SECTION_CONFIGURATION ROOT_BREADCRUMB = {:name => Api::Utils.message('quality_profiles.page'), :url => {:controller => 'profiles', :action => '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 c5dad2531db..3a21131b6e4 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_HOME + SECTION=Navigation::SECTION_CONFIGURATION 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 60a82a02e6e..c399350b06f 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 @@ -21,11 +21,6 @@
  • <%= message('reviews.page') -%>
  • - <% if is_admin? %> -
  • - <%= message('layout.administration') -%> -
  • - <% end %>