在个人主页项目里面添加新建按钮

This commit is contained in:
huangjingquan 2013-10-13 15:26:41 +08:00
parent 673850bd03
commit bcb66f2b32
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -1,6 +1,9 @@
<!--add by huang-->
<div class="content_frame">
<% unless @memberships.empty? %>
<% if @user == User.current %>
<p><%= 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) %></p>
<% end %>
<ul class="user_project_sort">
<% for membership in @memberships %>
<li>