From: Fabrice Bellingard Date: Mon, 3 Dec 2012 15:20:27 +0000 (+0100) Subject: SONAR-3972 Refactor menus X-Git-Tag: 3.4~187 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=86c4a977147c0d5844ee9a99a27bac4a8f1972d2;p=sonarqube.git 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") --- 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