diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-15 17:39:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-15 17:39:01 +0000 |
commit | 777c9acae8d6ea59ba54f915edff85b8ebb26546 (patch) | |
tree | db19825d30ff1080c5843aaa8ff7d9f1ba560749 /app/views/layouts | |
parent | 7b13b58a2f247bab702d00b2a061ce4844d66b68 (diff) | |
download | redmine-777c9acae8d6ea59ba54f915edff85b8ebb26546.tar.gz redmine-777c9acae8d6ea59ba54f915edff85b8ebb26546.zip |
"My projects" are now listed under the drop-down "Projects" top menu item (20 projects max.).
The left menu section for "My projects" is removed.
Patch by Damien McKenna (slightly edited).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@534 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/base.rhtml | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index db9356f7f..7d549248d 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -39,8 +39,19 @@ <ul> <li><%= link_to l(:label_home), { :controller => 'welcome' }, :class => "icon icon-home" %></li> <li><%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'}, :class => "icon icon-mypage" %></li> - <li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects" %></li> - + + <% if loggedin? and @logged_in_user.memberships.any? %> + <li class="submenu"><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects", :onmouseover => "buttonMouseover(event, 'menuAllProjects');" %></li> + <div id="menuAllProjects" class="menu" onmouseover="menuMouseover(event)"> + <%= link_to l(:label_project_all), {:controller => 'projects' }, :class => "menuItem" %> + <% @logged_in_user.memberships.find(:all, :limit => 20).each do |membership| %> + <%= link_to membership.project.name, {:controller => 'projects',:action => 'show', :id => membership.project }, :class => "menuItem" %> + <% end %> + </div> + <% else %> + <li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects" %></li> + <% end %> + <% unless @project.nil? || @project.id.nil? %> <li class="submenu"><%= link_to @project.name, { :controller => 'projects', :action => 'show', :id => @project }, :class => "icon icon-projects", :onmouseover => "buttonMouseover(event, 'menuProject');" %></li> <% end %> @@ -111,15 +122,6 @@ <li><%= link_to_if_authorized l(:label_settings), :controller => 'projects', :action => 'settings', :id => @project %></li> </ul> <% end %> - - <% if loggedin? and @logged_in_user.memberships.length > 0 %> - <h2><%=l(:label_my_projects) %></h2> - <ul class="menublock"> - <% for membership in @logged_in_user.memberships %> - <li><%= link_to membership.project.name, :controller => 'projects', :action => 'show', :id => membership.project %></li> - <% end %> - </ul> - <% end %> </div> <div id="content"> |