From bcb66f2b32a0e8789e9d88c0cd45168766f23978 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Sun, 13 Oct 2013 15:26:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=87=8C=E9=9D=A2=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 5 +++-- app/views/users/user_projects.html.erb | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e9bab0347..cdfda4d9c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -19,11 +19,12 @@ class UsersController < ApplicationController #Added by young menu_item :activity menu_item :user_information, :only => :info + menu_item :user_course, :only => :user_courses + menu_item :user_homework, :only => :user_homeworks menu_item :user_project, :only => :user_projects menu_item :requirement_focus, :only => :watch_bids menu_item :user_newfeedback, :only => :user_newfeedback - menu_item :user_course, :only => :user_courses - menu_item :user_homework, :only => :user_courses + #Ended by young diff --git a/app/views/users/user_projects.html.erb b/app/views/users/user_projects.html.erb index 0f71d20b4..bbab2e343 100644 --- a/app/views/users/user_projects.html.erb +++ b/app/views/users/user_projects.html.erb @@ -1,6 +1,9 @@
<% unless @memberships.empty? %> +<% if @user == User.current %> +

<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>

+<% end %>