Subprojects are now grouped by projects in the 'Projects' top navigation drop-down menu.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@703 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2007-09-05 17:24:22 +00:00
1 parent 17a3f9e44c
commit a19a0d7b92
3 files changed
+18 -12

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
<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>