From 84327892a9703e704b3fb210587759b7e315e391 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Sat, 2 Nov 2013 13:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5/=E9=80=80=E5=87=BA=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_form.html.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/users/_course_form.html.erb b/app/views/users/_course_form.html.erb index 1da44c9bc..072ca67b3 100644 --- a/app/views/users/_course_form.html.erb +++ b/app/views/users/_course_form.html.erb @@ -13,8 +13,12 @@ - <% unless membership.roles.first.to_s == 'Manager' %> - <%= join_in_course(membership.project, User.current)%>     + <% if User.current == @user %> + <% unless membership.roles.first.to_s == 'Manager' %> + <%= join_in_course(membership.project, User.current)%>     + <% end %> + <% else %> + <% end %> <%= l(:label_x_base_courses_member, :count => membership.project.members.count) %>(<%= link_to "#{membership.project.members.count}", project_member_path(membership.project), :course =>'1' %>)   <%= l(:label_homework) %> (<%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %>)