课程列表新的权限设置
This commit is contained in:
parent
ce7b2ceba0
commit
7e7534041e
|
@ -9,17 +9,17 @@
|
|||
<table width="580" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><span><%= link_to_project(membership.project) %></span>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<!--added by huang for: filter by roles-->
|
||||
<span style="float: right">
|
||||
<% if User.current == @user %>
|
||||
<% unless membership.roles.first.to_s == 'Manager' %>
|
||||
<% (membership.roles).each do |role| %>
|
||||
<% unless (role == Role.find(9) || role == Role.find(3)) %>
|
||||
<%= join_in_course(membership.project, User.current)%>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% end %>
|
||||
<!--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) %> (<span class=""><%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %></span>)
|
||||
|
||||
|
|
Loading…
Reference in New Issue