# the backup action is allow to non-admin users : see http://jira.codehaus.org/browse/SONAR-2039
before_filter :admin_required, :only => ['create', 'delete', 'set_as_default', 'copy', 'restore', 'change_parent', 'set_projects', 'rename_form', 'rename']
- SECTION=Navigation::SECTION_HOME
+ SECTION=Navigation::SECTION_CONFIGURATION
ROOT_BREADCRUMB = {:name => Api::Utils.message('quality_profiles.page'), :url => {:controller => 'profiles', :action => 'index'}}
<li>
<a href="<%= ApplicationController.root_context -%>/reviews/index"><%= message('reviews.page') -%></a>
</li>
- <% if is_admin? %>
- <li>
- <a href="<%= ApplicationController.root_context -%>/settings/index"><%= message('layout.administration') -%></a>
- </li>
- <% end %>
</ul>
</div>
<div id="nav">
<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>
+ <%= render 'layouts/menu_administration' -%>
<% if logged_in? %>
<%= render 'layouts/menu_user' -%>
<% else %>
<li class="spacer"></li>
<li class="sidebar-title"><%= message('sidebar.tools') -%></li>
- <li class="<%= 'active' if request.request_uri.include?('/profiles') || request.request_uri.include?('/alerts') || request.request_uri.include?('/rules_configuration') -%>">
- <a href="<%= ApplicationController.root_context -%>/profiles"><%= message('quality_profiles.page') -%></a></li>
<li class="<%= 'active' if request.request_uri.include?('/dependencies/index') -%>">
<a href="<%= ApplicationController.root_context -%>/dependencies/index"><%= message('dependencies.page') -%></a></li>
<li class="<%= 'active' if request.request_uri.include?('/comparison/index') -%>">
</li>
<% end %>
- <% elsif selected_section==Navigation::SECTION_CONFIGURATION && is_admin? %>
+ <% elsif selected_section==Navigation::SECTION_CONFIGURATION %>
+
+ <li class="<%= 'active' if request.request_uri.include?('/profiles') || request.request_uri.include?('/alerts') || request.request_uri.include?('/rules_configuration') -%>">
+ <a href="<%= ApplicationController.root_context -%>/profiles"><%= message('quality_profiles.page') -%></a></li>
+ <% if is_admin? %>
+
+ <li class="spacer"></li>
<li class="sidebar-title"><%= message('sidebar.project_settings') -%></li>
<li class="<%= 'active' if request.request_uri.include?('/settings') -%>">
<a href="<%= ApplicationController.root_context -%>/settings/index"><%= message('settings.page') -%></a></li>
<li class="<%= 'active' if controller.controller_path=='system' -%>">
<a href="<%= ApplicationController.root_context -%>/system"><%= message('system_info.page') -%></a></li>
<% end %>
+
+ <% end #of admin part %>
<% end %>
--- /dev/null
+<li>
+ <a href="#" onclick="showDropdownMenu('admin-panel'); return false;" class="link-more"><%= message('layout.settings') -%></a>
+
+ <div id="admin-panel" class="dropdown-menu" style="display: none">
+ <ul>
+ <li><a href="<%= ApplicationController.root_context -%>/profiles"><%= message('quality_profiles.page') -%></a></li>
+
+ <% if is_admin? %>
+ <li><a href="<%= ApplicationController.root_context -%>/settings/index"><%= message('sidebar.project_settings') -%></a></li>
+ <li><a href="<%= ApplicationController.root_context -%>/users"><%= message('sidebar.security') -%></a></li>
+ <li><a href="<%= ApplicationController.root_context -%>/backup"><%= message('sidebar.system') -%></a></li>
+ <% end %>
+ </ul>
+ </div>
+
+</li>
\ No newline at end of file