From: Fabrice Bellingard Date: Tue, 4 Dec 2012 13:40:07 +0000 (+0100) Subject: SONAR-3972 Change user panel into "classic" dropdown menu X-Git-Tag: 3.4~176 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=89c3690992de04b05414fad58885722793d8030b;p=sonarqube.git SONAR-3972 Change user panel into "classic" dropdown menu --- 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 7e96c4edb51..0095751ed35 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 @@ -29,11 +29,13 @@ -
  • - <%= message('layout.administration') -%> -
  • + <% if is_admin? %> +
  • + <%= message('layout.administration') -%> +
  • + <% end %> <% if logged_in? %> - <%= render 'layouts/user_panel' -%> + <%= render 'layouts/menu_user' -%> <% else %>
  • <%= message('layout.login') -%>
  • <% end %> @@ -77,6 +79,8 @@ "><%= active_dashboard.dashboard.name(true) -%> <% end %> +
  • + <%= message('clouds.page') -%>
  • @@ -84,11 +88,9 @@
  • "><%= message('violations_drilldown.page') -%> <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'comparable') %> -
  • +
  • <%= message('comparison.page') -%>
  • <% end %> -
  • - <%= message('clouds.page') -%>
  • <% controller.java_facade.getPages(Navigation::SECTION_RESOURCE, @project.scope, @project.qualifier, @project.language, @project.last_snapshot.metric_keys.to_java(:string)).each do |page| page_url = (page.isController() ? "#{page.getId()}?id=#{@project.id}" : "/plugins/resource/#{@project.id}?page=#{page.getId()}") %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb index f2b145f85d7..a87e486b779 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb @@ -34,7 +34,6 @@ <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'deletable') %>
  • <%= message('resource_deletion.page', :params => message('qualifier.' + @project.qualifier)) -%>
  • <% end %> - diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_user.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_user.html.erb new file mode 100644 index 00000000000..90a8fd33544 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_user.html.erb @@ -0,0 +1,11 @@ +
  • + <%= current_user.name(true) -%> + + + +
  • \ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_user_panel.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_user_panel.html.erb deleted file mode 100644 index 8973f49fd8e..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_user_panel.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -
  • - <%= current_user.name(true) -%> - -
  • diff --git a/sonar-server/src/main/webapp/stylesheets/layout.css b/sonar-server/src/main/webapp/stylesheets/layout.css index 4cd1411b51f..3a40e0977b1 100644 --- a/sonar-server/src/main/webapp/stylesheets/layout.css +++ b/sonar-server/src/main/webapp/stylesheets/layout.css @@ -169,28 +169,6 @@ body, a { right: 20px; } -#user-panel { - position: absolute; - float: right; - min-width: 200px; - top: 30px; - right: 180px; - background-color: #fff; - border: 1px solid #ccc; - box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5); - z-index: 999999; - line-height: 18px; - color: #111; -} - -#user-panel > div { - padding: 10px; -} - -#user-panel a { - color: #000; -} - #recent-history { border-bottom: 1px solid #ccc; padding-bottom: 10px;