From f4fc3d9dbe6df4a6e3bcc86b841a5ce73852e3a3 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Sat, 10 Aug 2013 20:34:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9C=AC=E8=BA=AB=E8=83=BD?= =?UTF-8?q?=E5=A4=9F=E7=9C=8B=E5=88=B0=E4=B8=8E=E6=88=91=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=EF=BC=8C=E5=85=B6=E4=BB=96=E7=94=A8=E6=88=B7=E5=88=99=E7=9C=8B?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E8=AF=A5=E9=A1=B9!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- app/views/layouts/base_users.html.erb | 5 +++++ lib/redmine.rb | 9 ++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4679de8d..d6bf74da 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -218,7 +218,7 @@ class UsersController < ApplicationController def info @message = [] if @user == User.current - @message = JournalsForMessage.reference_message(@user.id) + @message = JournalsForMessage.reference_message(@user.id) end unless User.current.admin? diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 7b14eda8..928f8f9b 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -92,6 +92,7 @@
+ <%= l(:label_user_fans) %>
@@ -110,7 +111,11 @@
+ <% if @user == User.current %> + <%= render_menu :user_menu_self %> + <%else%> <%= render_menu :user_menu %> + <%end%>
<%= yield %> <%= call_hook :view_layouts_base_content %> diff --git a/lib/redmine.rb b/lib/redmine.rb index e672e660..d41b6b96 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -266,8 +266,15 @@ end #end #added by young Redmine::MenuManager.map :user_menu do |menu| + menu.push :activity, {:controller => 'users', :action => 'show' } + menu.push :project, {:controller => 'users', :action => 'user_projects'} + menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} + menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'} + +end +Redmine::MenuManager.map :user_menu_self do |menu| menu.push :activity, {:controller => 'users', :action => 'show' } - menu.push :user_information, {:controller => 'users', :action => 'info'} + menu.push :user_information, {:controller => 'users', :action => 'info'} menu.push :project, {:controller => 'users', :action => 'user_projects'} menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}