layout.ie6_warn=Your web browser is outdated. This website may not display correctly.
layout.dashboards=Dashboards
layout.reviews=Reviews
+layout.configuration=Configuration
layout.user_panel.my_profile=My profile
layout.user_panel.recent_history.title=Recent history
layout.user_panel.me=Me
+<%
+ displayed_resource = @resource || @project
+%>
+
<% if @breadcrumbs %>
<div id="crumbs">
<ul id="crumbs-ops">
- <% if @resource %>
+ <% if displayed_resource %>
+ <% if has_role?(:admin, displayed_resource) %>
+ <%= render 'layouts/menu_resource_settings' -%>
+ <% end %>
<li>
- <%= link_to_favourite(@resource) -%>
+ <%= link_to_favourite(displayed_resource) -%>
</li>
<% end %>
<% if @permalink %>
</ul>
</div>
-<% elsif @resource || @project
- displayed_resource = @resource || @project
-%>
+<% elsif displayed_resource %>
<div id="crumbs">
<ul id="crumbs-ops">
- <% if @resource %>
+ <% if displayed_resource %>
+ <% if has_role?(:admin, displayed_resource) %>
+ <%= render 'layouts/menu_resource_settings' -%>
+ <% end %>
<li>
- <%= link_to_favourite(@resource) -%>
+ <%= link_to_favourite(displayed_resource) -%>
</li>
<% end %>
<% if !@review %>
</li>
<% end %>
<li class="<%= 'active' if request.request_uri.include?('/dashboards/index') -%>">
- <a href="<%= ApplicationController.root_context -%>/dashboards/index?resource=<%= @resource.id -%>"><%= message('dashboard.manage_dashboards') -%></a></li>
+ <a href="<%= ApplicationController.root_context -%>/dashboards/index?resource=<%= @project.id -%>"><%= message('dashboard.manage_dashboards') -%></a></li>
<li class="spacer"></li>
<li class="sidebar-title"><%= message('sidebar.tools') -%></li>
</li>
<% end %>
- <% if has_role?(:admin, @project) %>
- <li class="spacer"></li>
- <li class="sidebar-title"><%= message('sidebar.project_settings') -%></li>
- <% if (@project.project?) %>
- <li class="<%= 'active' if request.request_uri.include?('/project/profile') -%>">
- <a href="<%= ApplicationController.root_context -%>/project/profile/<%= @project.id -%>"><%= message('project_quality_profiles.page') -%></a></li>
- <% end %>
- <li class="<%= 'active' if request.request_uri.include?('/manual_measures') -%>">
- <a href="<%= ApplicationController.root_context -%>/manual_measures/index/<%= @project.id -%>"><%= message('manual_measures.page') -%></a></li>
- <% if (@project.project?) %>
- <li class="<%= 'active' if request.request_uri.include?('/action_plans') -%>">
- <a href="<%= ApplicationController.root_context -%>/action_plans/index/<%= @project.id -%>"><%= message('action_plans.page') -%></a></li>
- <% end %>
- <% if (@project.project? || @project.module?) %>
- <li class="<%= 'active' if request.request_uri.include?('/project/settings') -%>">
- <a href="<%= ApplicationController.root_context -%>/project/settings/<%= @project.id -%>"><%= message('project_settings.page') -%></a>
- </li>
- <% end %>
- <% if (@project.project?) %>
- <li class="<%= 'active' if request.request_uri.include?('/project/links') -%>">
- <a href="<%= ApplicationController.root_context -%>/project/links/<%= @project.id -%>"><%= message('project_links.page') -%></a></li>
- <% end %>
- <%
- # NOTE: we keep "@project.view? || @project.subview?" in the test for backward compatibility with the Views plugin
- if (controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'hasRolePolicy') || @project.view? || @project.subview?)
- %>
- <li class="<%= 'active' if request.request_uri.include?('/project_roles') -%>">
- <a href="<%= ApplicationController.root_context -%>/project_roles/index?resource=<%= @project.id -%>"><%= message('roles.page') -%></a></li>
- <% end %>
- <%
- # NOTE: we keep "@project.view? || @project.subview?" in the test for backward compatibility with the Views plugin
- if (controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'modifiable_history') || @project.view? || @project.subview?)
- %>
- <li class="<%= 'active' if request.request_uri.include?('/project/history') -%>">
- <a href="<%= ApplicationController.root_context -%>/project/history/<%= @project.id -%>"><%= message('project_history.page') -%></a></li>
- <% end %>
- <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'updatable_key') %>
- <li class="<%= 'active' if request.request_uri.include?('/project/key') -%>">
- <a href="<%= ApplicationController.root_context -%>/project/key/<%= @project.id -%>"><%= message('update_key.page') -%></a></li>
- <% end %>
- <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'deletable') %>
- <li class="<%= 'active' if request.request_uri.include?('/project/deletion') -%>">
- <a href="<%= ApplicationController.root_context -%>/project/deletion/<%= @project.id -%>"><%= message('resource_deletion.page', :params => message('qualifier.' + @project.qualifier)) -%></a>
- </li>
- <% end %>
- <% end %>
-
<% elsif selected_section==Navigation::SECTION_CONFIGURATION && is_admin? %>
<li class="sidebar-title"><%= message('sidebar.project_settings') -%></li>
--- /dev/null
+<li>
+ <a href="#" onclick="$j('#project-settings-menu').toggle(); return false;" class="link-more dropdown"><%= message('layout.configuration') -%></a>
+
+ <div id="project-settings-menu" class="dropdown-menu" style="display: none" onmouseout="$j(this).hide();" onmouseover="$j(this).show();">
+ <ul>
+ <% if (@project.project?) %>
+ <li><a href="<%= ApplicationController.root_context -%>/project/profile/<%= @project.id -%>"><%= message('project_quality_profiles.page') -%></a></li>
+ <% end %>
+ <li><a href="<%= ApplicationController.root_context -%>/manual_measures/index/<%= @project.id -%>"><%= message('manual_measures.page') -%></a></li>
+ <% if (@project.project?) %>
+ <li><a href="<%= ApplicationController.root_context -%>/action_plans/index/<%= @project.id -%>"><%= message('action_plans.page') -%></a></li>
+ <% end %>
+ <% if (@project.project? || @project.module?) %>
+ <li><a href="<%= ApplicationController.root_context -%>/project/settings/<%= @project.id -%>"><%= message('project_settings.page') -%></a></li>
+ <% end %>
+ <% if (@project.project?) %>
+ <li><a href="<%= ApplicationController.root_context -%>/project/links/<%= @project.id -%>"><%= message('project_links.page') -%></a></li>
+ <% end %>
+ <%
+ # NOTE: we keep "@project.view? || @project.subview?" in the test for backward compatibility with the Views plugin
+ if (controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'hasRolePolicy') || @project.view? || @project.subview?)
+ %>
+ <li><a href="<%= ApplicationController.root_context -%>/project_roles/index?resource=<%= @project.id -%>"><%= message('roles.page') -%></a></li>
+ <% end %>
+ <%
+ # NOTE: we keep "@project.view? || @project.subview?" in the test for backward compatibility with the Views plugin
+ if (controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'modifiable_history') || @project.view? || @project.subview?)
+ %>
+ <li><a href="<%= ApplicationController.root_context -%>/project/history/<%= @project.id -%>"><%= message('project_history.page') -%></a></li>
+ <% end %>
+ <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'updatable_key') %>
+ <li><a href="<%= ApplicationController.root_context -%>/project/key/<%= @project.id -%>"><%= message('update_key.page') -%></a></li>
+ <% end %>
+ <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'deletable') %>
+ <li><a href="<%= ApplicationController.root_context -%>/project/deletion/<%= @project.id -%>"><%= message('resource_deletion.page', :params => message('qualifier.' + @project.qualifier)) -%></a></li>
+ <% end %>
+
+ </ul>
+ </div>
+
+</li>
\ No newline at end of file
if (supports_html5_storage()) {
var sonarRecentHistory = new Sonar.RecentHistory();
}
- var shouldUpdateRecentHistory = true;
</script>
<li>
color: #000;
}
+#project-settings-menu {
+ float: right;
+ right: 70px;
+}
+
#user-panel {
position: absolute;
float: right;
.dropdown {
cursor: pointer;
display: inline-block;
+ text-decoration: none !important;
}
.dropdown-menu {
padding: 0 8px;
cursor: pointer !important;
color: red !important;
+ float: none !important;
}
.dropdown-menu li:hover {