加入/退出课程权限修改

This commit is contained in:
huangjingquan 2013-11-02 13:00:32 +08:00
parent 003b4704cc
commit 84327892a9
1 changed files with 6 additions and 2 deletions

View File

@ -13,8 +13,12 @@
</span>
<span style="float: right">
<% unless membership.roles.first.to_s == 'Manager' %>
<%= join_in_course(membership.project, User.current)%>&nbsp;&nbsp;&nbsp;&nbsp;
<% if User.current == @user %>
<% unless membership.roles.first.to_s == 'Manager' %>
<%= join_in_course(membership.project, User.current)%>&nbsp;&nbsp;&nbsp;&nbsp;
<% 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' %>)&nbsp;&nbsp;
<%= l(:label_homework) %> (<span class=""><%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %></span>)