summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-15 17:39:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-15 17:39:01 +0000
commit777c9acae8d6ea59ba54f915edff85b8ebb26546 (patch)
treedb19825d30ff1080c5843aaa8ff7d9f1ba560749
parent7b13b58a2f247bab702d00b2a061ce4844d66b68 (diff)
downloadredmine-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
-rw-r--r--app/views/layouts/base.rhtml24
-rw-r--r--lang/bg.yml1
-rw-r--r--lang/de.yml1
-rw-r--r--lang/en.yml1
-rw-r--r--lang/es.yml1
-rw-r--r--lang/fr.yml1
-rw-r--r--lang/it.yml1
-rw-r--r--lang/ja.yml1
-rw-r--r--lang/pt-br.yml1
-rw-r--r--lang/pt.yml1
-rw-r--r--lang/zh.yml1
11 files changed, 23 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">
diff --git a/lang/bg.yml b/lang/bg.yml
index 9c750b2e7..6aa2e8009 100644
--- a/lang/bg.yml
+++ b/lang/bg.yml
@@ -179,6 +179,7 @@ label_user_new: Нов потребител
label_project: Проект
label_project_new: Нов проект
label_project_plural: Проекти
+label_project_all: All Projects
label_project_latest: Последни проекти
label_issue: Задача
label_issue_new: Нова задача
diff --git a/lang/de.yml b/lang/de.yml
index 9d8b30292..a7bc414ab 100644
--- a/lang/de.yml
+++ b/lang/de.yml
@@ -179,6 +179,7 @@ label_user_new: Neuer Benutzer
label_project: Projekt
label_project_new: Neues Projekt
label_project_plural: Projekte
+label_project_all: All Projects
label_project_latest: Neueste Projekte
label_issue: Ticket
label_issue_new: Neues Ticket
diff --git a/lang/en.yml b/lang/en.yml
index 574abcd58..b158c88dc 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -179,6 +179,7 @@ label_user_new: New user
label_project: Project
label_project_new: New project
label_project_plural: Projects
+label_project_all: All Projects
label_project_latest: Latest projects
label_issue: Issue
label_issue_new: New issue
diff --git a/lang/es.yml b/lang/es.yml
index 22373b3c6..d91c8dab2 100644
--- a/lang/es.yml
+++ b/lang/es.yml
@@ -179,6 +179,7 @@ label_user_new: Nuevo usuario
label_project: Proyecto
label_project_new: Nuevo proyecto
label_project_plural: Proyectos
+label_project_all: All Projects
label_project_latest: Los proyectos más últimos
label_issue: Petición
label_issue_new: Nueva petición
diff --git a/lang/fr.yml b/lang/fr.yml
index 20925ac3e..e4b670604 100644
--- a/lang/fr.yml
+++ b/lang/fr.yml
@@ -179,6 +179,7 @@ label_user_new: Nouvel utilisateur
label_project: Projet
label_project_new: Nouveau projet
label_project_plural: Projets
+label_project_all: Tous les projets
label_project_latest: Derniers projets
label_issue: Demande
label_issue_new: Nouvelle demande
diff --git a/lang/it.yml b/lang/it.yml
index 6188fbc8a..7cfacfab5 100644
--- a/lang/it.yml
+++ b/lang/it.yml
@@ -179,6 +179,7 @@ label_user_new: Nuovo utente
label_project: Progetto
label_project_new: Nuovo progetto
label_project_plural: Progetti
+label_project_all: All Projects
label_project_latest: Ultimi progetti registrati
label_issue: Contesto
label_issue_new: Nuovo contesto
diff --git a/lang/ja.yml b/lang/ja.yml
index ee1d49b43..f72d93d56 100644
--- a/lang/ja.yml
+++ b/lang/ja.yml
@@ -180,6 +180,7 @@ label_user_new: 新しいユーザ
label_project: プロジェクト
label_project_new: 新しいプロジェクト
label_project_plural: プロジェクト
+label_project_all: All Projects
label_project_latest: 最近のプロジェクト
label_issue: 問題
label_issue_new: 新しい問題
diff --git a/lang/pt-br.yml b/lang/pt-br.yml
index e02e278b4..0b6b64f23 100644
--- a/lang/pt-br.yml
+++ b/lang/pt-br.yml
@@ -179,6 +179,7 @@ label_user_new: Novo usuario
label_project: Projeto
label_project_new: Novo projeto
label_project_plural: Projetos
+label_project_all: All Projects
label_project_latest: Ultimos projetos
label_issue: Tarefa
label_issue_new: Nova tarefa
diff --git a/lang/pt.yml b/lang/pt.yml
index b9f833f6a..2a2c3f049 100644
--- a/lang/pt.yml
+++ b/lang/pt.yml
@@ -179,6 +179,7 @@ label_user_new: Novo usuário
label_project: Projeto
label_project_new: Novo projeto
label_project_plural: Projetos
+label_project_all: All Projects
label_project_latest: Últimos projetos
label_issue: Tarefa
label_issue_new: Nova tarefa
diff --git a/lang/zh.yml b/lang/zh.yml
index aa768e815..016204bc2 100644
--- a/lang/zh.yml
+++ b/lang/zh.yml
@@ -182,6 +182,7 @@ label_user_new: 新建用户
label_project: 项目
label_project_new: 新建项目
label_project_plural: 项目列表
+label_project_all: All Projects
label_project_latest: 最近的项目列表
label_issue: 任务
label_issue_new: 新建任务