课程成员配置-添加成员:没有搜索条件则显示空
This commit is contained in:
parent
6abdc4c7e1
commit
0743ac2c78
|
@ -44,7 +44,11 @@ module MembersHelper
|
|||
# add by nwb
|
||||
# 课程可添加的成员列表
|
||||
def render_principals_for_new_course_members(course)
|
||||
scope = Principal.active.sorted.not_member_of_course(course).like(params[:q])
|
||||
if params[:q] && params[:q] != ""
|
||||
scope = Principal.active.sorted.not_member_of_course(course).like(params[:q])
|
||||
else
|
||||
scope = []
|
||||
end
|
||||
principals = paginateHelper scope,10
|
||||
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals')
|
||||
|
||||
|
|
Loading…
Reference in New Issue