summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-14 12:42:08 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-14 12:42:08 +0200
commitfd12e5c604f63516bc09c53f7fde52bc3a5cd494 (patch)
treeb909c873db37d04c406438179a96c5c659e0f45f
parentea1e92a0b660ebf2bcc99015301a367fe947d84b (diff)
downloadgitlab-ce-fd12e5c604f63516bc09c53f7fde52bc3a5cd494.tar.gz
Dont render more than 20 group members on Project#members page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/views/projects/team_members/_group_members.html.haml8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/projects/team_members/_group_members.html.haml b/app/views/projects/team_members/_group_members.html.haml
index 68f08006854..eceec6627b9 100644
--- a/app/views/projects/team_members/_group_members.html.haml
+++ b/app/views/projects/team_members/_group_members.html.haml
@@ -1,10 +1,14 @@
+- group_users_count = @group.users_groups.count
.ui-box
.title
%strong #{@group.name}
- group members (#{@group.users_groups.count})
+ group members (#{group_users_count})
.pull-right
= link_to members_group_path(@group), class: 'btn btn-small' do
%i.icon-edit
%ul.well-list
- - @group.users_groups.order('group_access DESC').each do |member|
+ - @group.users_groups.order('group_access DESC').limit(20).each do |member|
= render 'users_groups/users_group', member: member, show_controls: false
+ - if group_users_count > 20
+ %li
+ and #{group_users_count - 20} more. For full list visit #{link_to 'group members page', members_group_path(@group)}