课程添加成员输入空格键会搜索出所有任务
This commit is contained in:
parent
9a07989917
commit
1f7f1eff1a
|
@ -32,7 +32,7 @@ module MembersHelper
|
|||
|
||||
#获取项目可邀请的成员列表
|
||||
def render_project_members project
|
||||
if params[:q] && params[:q] != ""
|
||||
if params[:q] && params[:q].lstrip.rstrip != ""
|
||||
scope = Principal.active.sorted.not_member_of(project).like(params[:q])
|
||||
else
|
||||
scope = []
|
||||
|
@ -48,7 +48,7 @@ module MembersHelper
|
|||
# add by nwb
|
||||
# 课程可添加的成员列表
|
||||
def render_principals_for_new_course_members(course)
|
||||
if params[:q] && params[:q] != ""
|
||||
if params[:q] && params[:q].lstrip.rstrip != ""
|
||||
scope = Principal.active.sorted.not_member_of_course(course).like(params[:q])
|
||||
else
|
||||
scope = []
|
||||
|
@ -63,19 +63,6 @@ module MembersHelper
|
|||
s + content_tag('ul', links,:class => 'wlist',:id => "course_member_pagination_links")
|
||||
end
|
||||
|
||||
# 项目配置中添加成员列表
|
||||
def render_principals_for_new_project_members(project)
|
||||
scope = Principal.active.sorted.not_member_of(project).like(params[:q])
|
||||
principals = paginateHelper scope,10
|
||||
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals')
|
||||
|
||||
links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true) {|text, parameters, options|
|
||||
link_to text, appliedproject_project_memberships_path(project, parameters.merge(:q => params[:q], :format => 'js')), :remote => true
|
||||
}
|
||||
|
||||
s + content_tag('ul', links,:class => 'wlist',:id => "course_member_pagination_links")
|
||||
end
|
||||
|
||||
# 新申请加入项目成员列表
|
||||
def render_principals_for_applied_members_new project
|
||||
scope = project.applied_projects.map(&:user)
|
||||
|
|
Loading…
Reference in New Issue