课程列表新的权限设置

This commit is contained in:
huangjingquan 2013-11-04 09:57:36 +08:00
parent ce7b2ceba0
commit 7e7534041e
1 changed files with 6 additions and 6 deletions

View File

@ -9,17 +9,17 @@
<table width="580" border="0"> <table width="580" border="0">
<tr> <tr>
<td colspan="2" valign="top"><span><%= link_to_project(membership.project) %></span> <td colspan="2" valign="top"><span><%= link_to_project(membership.project) %></span>
<span> <!--added by huang for: filter by roles-->
</span>
<span style="float: right"> <span style="float: right">
<% if User.current == @user %> <% 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)%>&nbsp;&nbsp;&nbsp;&nbsp; <%= join_in_course(membership.project, User.current)%>&nbsp;&nbsp;&nbsp;&nbsp;
<% end %> <% end %>
<% else %>
<% end %> <% 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' %>)&nbsp;&nbsp; <%= 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>) <%= l(:label_homework) %> (<span class=""><%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %></span>)
&nbsp;&nbsp; &nbsp;&nbsp;