summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-05-04 23:45:02 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-05-04 23:45:02 +0300
commit5bce197b617f2542430db7aecec321cf1619de72 (patch)
tree4c6e92d1253214cf17fe1a711b4ba6265af5c249 /app/views
parent17dca783417ceeac62a462359a18290f18b2b4ab (diff)
downloadgitlab-ce-5bce197b617f2542430db7aecec321cf1619de72.tar.gz
Serialize groups as json for Dashboard::GroupsController
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views')
-rw-r--r--app/views/dashboard/groups/_groups.html.haml5
-rw-r--r--app/views/dashboard/groups/index.html.haml2
2 files changed, 4 insertions, 3 deletions
diff --git a/app/views/dashboard/groups/_groups.html.haml b/app/views/dashboard/groups/_groups.html.haml
index 6c3bf1a2b3b..d33ee450b29 100644
--- a/app/views/dashboard/groups/_groups.html.haml
+++ b/app/views/dashboard/groups/_groups.html.haml
@@ -1,6 +1,7 @@
.js-groups-list-holder
%ul.content-list
- - @group_members.each do |group_member|
+ - @groups.each do |group|
+ - group_member = group.group_members.find_by(user_id: current_user)
= render 'shared/groups/group', group: group_member.group, group_member: group_member
- = paginate @group_members, theme: 'gitlab'
+ = paginate @groups, theme: 'gitlab'
diff --git a/app/views/dashboard/groups/index.html.haml b/app/views/dashboard/groups/index.html.haml
index 73ab2c95ff9..0d35d11fb63 100644
--- a/app/views/dashboard/groups/index.html.haml
+++ b/app/views/dashboard/groups/index.html.haml
@@ -2,7 +2,7 @@
- header_title "Groups", dashboard_groups_path
= render 'dashboard/groups_head'
-- if @group_members.empty?
+- if @groups.empty?
= render 'empty_state'
- else
= render 'groups'