diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-11 17:58:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-11 17:58:08 +0000 |
commit | d4ebbe5ba8c822bf320122add151fcc5a9c07cd7 (patch) | |
tree | 9fb8d756263fddddf01d350a6c6358d3721a70ee /app/helpers | |
parent | fcf9cf7bb17e5760f9cd4c93e481dcf41bac8b86 (diff) | |
download | redmine-d4ebbe5ba8c822bf320122add151fcc5a9c07cd7.tar.gz redmine-d4ebbe5ba8c822bf320122add151fcc5a9c07cd7.zip |
Adds some helpers tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13735 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/groups_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/members_helper.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 4275f29a0..7e6ff8e2e 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -26,10 +26,10 @@ module GroupsHelper tabs end - def render_principals_for_new_group_users(group) + def render_principals_for_new_group_users(group, limit=100) scope = User.active.sorted.not_in_group(group).like(params[:q]) principal_count = scope.count - principal_pages = Redmine::Pagination::Paginator.new principal_count, 100, params['page'] + principal_pages = Redmine::Pagination::Paginator.new principal_count, limit, params['page'] principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).to_a s = content_tag('div', diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 9036c6db0..7a38513e1 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -18,10 +18,10 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module MembersHelper - def render_principals_for_new_members(project) + def render_principals_for_new_members(project, limit=100) 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'] + principal_pages = Redmine::Pagination::Paginator.new principal_count, limit, params['page'] principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).to_a s = content_tag('div', |