班级左侧导航的“分班”

This commit is contained in:
cxt 2016-09-30 17:12:40 +08:00
parent bcd76d2b9f
commit b5782bae39
3 changed files with 6 additions and 4 deletions

View File

@ -379,6 +379,7 @@ class CoursesController < ApplicationController
@no_group_count = @members_count - @course.members.where("course_group_id != 0").count
@mem_pages = Paginator.new @members_count, @limit, @page
@members = paginateHelper @all_members, @limit
@left_nav_type = 9
else
render_403
return

View File

@ -45,7 +45,8 @@
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
</li>
<% end %>
<% if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? %>
<% group_count = @course.course_groups.count %>
<% if show_nav?(group_count) && ((User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?) %>
<li>
<%=link_to "分班", course_member_path(@course, :role => 2) %>
</li>

View File

@ -110,10 +110,10 @@
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
</li>
<% end %>
<% group_count = 1 %>
<% unless show_nav?(group_count) %>
<% group_count = @course.course_groups.count %>
<% if !show_nav?(group_count) && ((User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?) %>
<li id="sy_09" class="sy_icons_group">
<a href="<%=course_member_path(@course, :role => 2) %>">分班<span></span></a>
<a href="<%=course_member_path(@course, :role => 2) %>">分班<span><%=group_count %></span></a>
<!--<a href="javascript:void(0);" class="sy_class_add"></a>-->
</li>
<% end %>