<input type="text" size="15" name="search" id="searchInput" onFocus="autocompleteResources()" value="<%= message('search_verb') -%>"/>
<img src="<%= ApplicationController.root_context -%>/images/loading-small.gif" id="searchingResources" style="display:none">
</li>
- <li>
- <a href="<%= ApplicationController.root_context -%>/settings/index"><img src="<%= ApplicationController.root_context -%>/images/actions.png" alt="<%= message('layout.administration') -%>" title="<%= message('layout.administration') -%>"/></a>
- </li>
+ <% if is_admin? %>
+ <li>
+ <a href="<%= ApplicationController.root_context -%>/settings/index"><%= message('layout.administration') -%></a>
+ </li>
+ <% end %>
<% if logged_in? %>
- <%= render 'layouts/user_panel' -%>
+ <%= render 'layouts/menu_user' -%>
<% else %>
<li><a href="<%= ApplicationController.root_context -%>/sessions/new?return_to=<%= u (request.request_uri) -%>"><%= message('layout.login') -%></a></li>
<% end %>
<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="<%= 'active' if request.request_uri.include?('/cloud/index') -%>">
+ <a href="<%= ApplicationController.root_context -%>/cloud/index/<%= @project.id -%>"><%= message('clouds.page') -%></a></li>
<li class="spacer"></li>
<li class="sidebar-title"><%= message('sidebar.tools') -%></li>
<li class="<%= 'active' if request.request_uri.include?('/components/index') -%>">
<li class="<%= 'active' 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>
<% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'comparable') %>
- <li class="<%= 'active' if request.request_uri.include?('/comparison/index') -%>">
+ <li class="<%= 'active' if request.request_uri.include?('/comparison/index') -%>">
<a href="<%= ApplicationController.root_context -%>/comparison/index?resource=<%= @project.key -%>"><%= message('comparison.page') -%></a></li>
<% end %>
- <li class="<%= 'active' 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|
page_url = (page.isController() ? "#{page.getId()}?id=#{@project.id}" : "/plugins/resource/#{@project.id}?page=#{page.getId()}")
%>
--- /dev/null
+<li>
+ <a href="#" onclick="$j('#user-panel').toggle(); return false;" class="link-more"><%= current_user.name(true) -%></a>
+
+ <div id="user-panel" class="dropdown-menu" style="display: none" onmouseout="$j(this).hide();" onmouseover="$j(this).show();">
+ <ul>
+ <li><a href="<%= ApplicationController.root_context -%>/account/index"><%= message('layout.user_panel.my_profile') -%></a></li>
+ <li><a href="<%= ApplicationController.root_context -%>/sessions/logout" onclick="if (sonarRecentHistory) { sonarRecentHistory.clear(); }"><%= message('layout.logout') -%></a></li>
+ </ul>
+ </div>
+
+</li>
\ No newline at end of file
+++ /dev/null
-<li>
- <a href="#" onclick="$j('#user-panel').toggle(); return false;" class="link-more"><%= current_user.name(true) -%></a>
-
- <div id="user-panel" style="display: none" onmouseout="$j(this).hide();" onmouseover="$j(this).show();">
- <div id="user-details">
- <b><%= current_user.name(true) -%></b>
- <% if current_user.email && !current_user.email.blank? %>
- <br/>
- <span class="note"><%= current_user.email -%></span>
- <% end %>
- <br/>
- <a href="<%= ApplicationController.root_context -%>/account/index" class="link-action"><%= message('layout.user_panel.my_profile') -%></a>
- –
- <a href="<%= ApplicationController.root_context -%>/sessions/logout" class="link-action" onclick="if (sonarRecentHistory) { sonarRecentHistory.clear(); }"><%= message('layout.logout') -%></a>
- </div>
-
-</li>