diff options
author | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2012-11-26 11:46:55 +0100 |
---|---|---|
committer | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2012-11-26 12:23:01 +0100 |
commit | 68a6a7cbaf282d766915345b2800fee11fc626a3 (patch) | |
tree | 77977feb800fa87e06ba9f8f4319224f1f633dd0 | |
parent | a10b584e060f42b1c3e325e07853f643681d5b32 (diff) | |
download | sonarqube-68a6a7cbaf282d766915345b2800fee11fc626a3.tar.gz sonarqube-68a6a7cbaf282d766915345b2800fee11fc626a3.zip |
SONAR-3972 Improve top bar & side bar menu entries
3 files changed, 10 insertions, 6 deletions
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 7f341d4b451..5c07b4c2d2a 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 @@ -303,6 +303,7 @@ layout.user_panel.me=Me layout.user_panel.anonymous_user=Anonymous layout.user_panel.non_authenticated_user=Unauthenticated user +sidebar.tools=Tools sidebar.project_settings=Configuration sidebar.security=Security sidebar.system=System 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 b7b68198498..85997110201 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 @@ -14,6 +14,9 @@ <li> <a href="<%= ApplicationController.root_context -%>/"><%= message('layout.dashboards') -%></a> </li> + <li> + <a href="<%= ApplicationController.root_context -%>/profiles"><%= message('layout.tools.quality_profiles') -%></a> + </li> <%= render 'layouts/tools' -%> </ul> </div> @@ -26,6 +29,9 @@ <li> <a href="javascript:window.print()"><img src="<%= ApplicationController.root_context -%>/images/print.gif" alt="<%= message('layout.print') -%>" title="<%= message('layout.print') -%>"/></a> </li> + <li> + <a href="<%= ApplicationController.root_context -%>/settings/index"><img src="<%= ApplicationController.root_context -%>/images/actions.png" alt="<%= message('layout.configuration') -%>" title="<%= message('layout.configuration') -%>"/></a> + </li> <% unless logged_in? %> <li><a href="<%= ApplicationController.root_context -%>/sessions/new?return_to=<%= u (request.request_uri) -%>"><%= message('layout.login') -%></a></li> <% end %> @@ -64,11 +70,12 @@ <a href="<%= ApplicationController.root_context -%>/dashboard/index/<%= @project.id -%>?did=<%= active_dashboard.dashboard_id -%><%= "&"+period_param if period_param -%>"><%= active_dashboard.dashboard.name(true) -%></a> </li> <% end %> + + <li class="h2"><%= message('sidebar.tools') -%></li> <li class="<%= 'selected' if request.request_uri.include?('/components/index') -%>"> <a href="<%= ApplicationController.root_context -%>/components/index/<%= @project.id -%>"><%= message('components.page') -%></a></li> <li class="<%= 'selected' if request.request_uri.include?('/drilldown/violations') -%>"> <a href="<%= ApplicationController.root_context -%>/drilldown/violations/<%= @project.id -%><%= "?"+period_param if period_param -%>"><%= message('violations_drilldown.page') -%></a> - </li> <li class="<%= 'selected' if request.request_uri.include?('/cloud/index') -%>"> <a href="<%= ApplicationController.root_context -%>/cloud/index/<%= @project.id -%>"><%= message('clouds.page') -%></a></li> <% controller.java_facade.getPages(Navigation::SECTION_RESOURCE, @project.scope, @project.qualifier, @project.language, @project.last_snapshot.metric_keys.to_java(:string)).each do |page| @@ -78,6 +85,7 @@ <a href="<%= ApplicationController.root_context -%><%= page_url -%>"><%= message(page.getId() + '.page', :default => page.getTitle()) %></a> </li> <% end %> + <% if has_role?(:admin, @project) %> <li class="h2"><%= message('sidebar.project_settings') -%></li> <% if (@project.project?) %> 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 index 86dc82f8f44..ecd47f15adf 100644 --- 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 @@ -3,12 +3,7 @@ <div id="tools-menu" class="dropdown-menu" style="display: none" onmouseout="$j(this).hide();" onmouseover="$j(this).show();"> <ul> - <li><a href="<%= ApplicationController.root_context -%>/profiles"><%= message('layout.tools.quality_profiles') -%></a></li> <li><a href="<%= ApplicationController.root_context -%>/dependencies/index"><%= message('dependencies.page') -%></a></li> - - <% if current_user && is_admin? %> - <li><a href="<%= ApplicationController.root_context -%>/settings/index"><%= message('layout.configuration') -%></a></li> - <% end %> </ul> </div> |