summaryrefslogtreecommitdiffstats
path: root/app/helpers/members_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/members_helper.rb')
-rw-r--r--app/helpers/members_helper.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb
index 36f823569..9036c6db0 100644
--- a/app/helpers/members_helper.rb
+++ b/app/helpers/members_helper.rb
@@ -19,12 +19,15 @@
module MembersHelper
def render_principals_for_new_members(project)
- scope = Principal.visible.sorted.not_member_of(project).like(params[:q])
+ scope = Principal.active.visible.sorted.not_member_of(project).like(params[:q])
principal_count = scope.count
principal_pages = Redmine::Pagination::Paginator.new principal_count, 100, params['page']
principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).to_a
- s = content_tag('div', principals_check_box_tags('membership[user_ids][]', principals), :id => 'principals')
+ s = content_tag('div',
+ content_tag('div', principals_check_box_tags('membership[user_ids][]', principals), :id => 'principals'),
+ :class => 'objects-selection'
+ )
links = pagination_links_full(principal_pages, principal_count, :per_page_links => false) {|text, parameters, options|
link_to text, autocomplete_project_memberships_path(project, parameters.merge(:q => params[:q], :format => 'js')), :remote => true