From 86c4a977147c0d5844ee9a99a27bac4a8f1972d2 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Mon, 3 Dec 2012 16:20:27 +0100 Subject: [PATCH] SONAR-3972 Refactor menus - Remove the "Tools" menu and put them on the left side bar - Remove the user panel when not logged - Extract "Reviews" and put it on the top bar (will become "Issues") --- .../resources/org/sonar/l10n/core.properties | 9 +++------ .../app/controllers/comparison_controller.rb | 2 +- .../controllers/dependencies_controller.rb | 2 +- .../app/controllers/reviews_controller.rb | 2 -- .../app/views/layouts/_layout.html.erb | 20 ++++++++++++++----- .../WEB-INF/app/views/layouts/_tools.html.erb | 11 ---------- 6 files changed, 20 insertions(+), 26 deletions(-) delete mode 100644 sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_tools.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 3b774ffe406..2a3a3479df7 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 @@ -286,7 +286,7 @@ layout.home=Home layout.login=Log in layout.logout=Log out layout.measures=Measures -layout.configuration=Configuration +layout.administration=Administration layout.print=Print layout.permalink=Permalink layout.sonar.slogan=Embrace Quality @@ -297,19 +297,16 @@ layout.plugins=Plugins layout.evaluation=Embedded database should be used for evaluation purpose only layout.ie6_warn=Your web browser is outdated. This website may not display correctly. layout.dashboards=Dashboards -layout.tools=Tools +layout.reviews=Reviews layout.user_panel.my_profile=My profile layout.user_panel.recent_history.title=Recent history layout.user_panel.me=Me layout.user_panel.anonymous_user=Anonymous -sidebar.tools=Tools -sidebar.tools.comparison=Comparison -sidebar.tools.dependency=Dependency -sidebar.tools.reviews=Reviews sidebar.project_settings=Configuration sidebar.security=Security sidebar.system=System +sidebar.tools=Tools #------------------------------------------------------------------------------ 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 b7b13db7131..4d0ebd0ac2b 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 @@ -61,7 +61,7 @@ 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('sidebar.tools.comparison'), :url => {:controller => 'comparison', :action => 'index'}} + 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 8b7eba87315..74b131dc148 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 @@ -93,7 +93,7 @@ class DependenciesController < ApplicationController end - add_breadcrumbs message('sidebar.tools'), {:name => message('sidebar.tools.dependency'), :url => {:controller => 'dependencies', :action => 'index'}} + 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/reviews_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb index 1aa5479594e..a4b1c4cabf1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb @@ -30,8 +30,6 @@ class ReviewsController < ApplicationController def index init_params() search_reviews() - - add_breadcrumbs message('sidebar.tools'), {:name => message('sidebar.tools.reviews'), :url => {:controller => 'reviews', :action => 'index'}} end # Used for the "OLD" permalink "http://localhost:9000/reviews/view/1" 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 71e2ab2fc76..7829ef5476e 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 @@ -18,9 +18,8 @@ <%= message('layout.measures') -%>
  • - <%= message('quality_profiles.page') -%> + <%= message('reviews.page') -%>
  • - <%= render 'layouts/tools' -%> @@ -59,6 +59,16 @@
  • <%= message(page.getId() + '.page', :default => page.getTitle()) -%>
  • <% end %> + +
  • + + +
  • + <%= message('quality_profiles.page') -%>
  • +
  • + <%= message('dependencies.page') -%>
  • +
  • + <%= message('comparison.page') -%>
  • <% elsif selected_section==Navigation::SECTION_RESOURCE %> <% ActiveDashboard.user_dashboards(current_user, false).each do |active_dashboard| %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_tools.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_tools.html.erb deleted file mode 100644 index d0f369f2cc5..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_tools.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -
  • - <%= message('layout.tools') -%> - - -
  • \ No newline at end of file -- 2.39.5