Redmine/app/views/layouts/_projects_menu.rhtml

13 lines
752 B
Plaintext

<div id="menuAllProjects" class="menu" onmouseover="menuMouseover(event)">
<%= link_to l(:label_project_all), {:controller => 'projects' }, :class => "menuItem" %>
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent, :limit => 20).group_by(&:root) %>
<% user_projects_by_root.keys.sort.each do |root| %>
<%= link_to root.name, {:controller => 'projects', :action => 'show', :id => root}, :class => "menuItem" %>
<% user_projects_by_root[root].sort.each do |project| %>
<% next if project == root %>
<%= link_to(('&#187; ' + project.name), {:controller => 'projects', :action => 'show', :id => project}, :class => "menuItem") %>
<% end %>
<% end %>
</div>