Commit 10de4e3b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Show nested groups tab on group page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9410f215
......@@ -42,6 +42,8 @@ class GroupsController < Groups::ApplicationController
@notification_setting = current_user.notification_settings_for(group)
end
@nested_groups = group.children
setup_projects
respond_to do |format|
......
......@@ -32,6 +32,10 @@
%li
= link_to "#shared", 'data-toggle' => 'tab' do
Shared Projects
- if @nested_groups.present?
%li
= link_to "#groups", 'data-toggle' => 'tab' do
Nested Groups
.nav-controls
= form_tag request.path, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f|
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false
......@@ -47,3 +51,9 @@
- if @shared_projects.present?
.tab-pane#shared
= render "shared_projects", projects: @shared_projects
- if @nested_groups.present?
.tab-pane#groups
%ul.content-list
- @nested_groups.each do |group|
= render 'shared/groups/group', group: group
---
title: Show nested groups tab on group page
merge_request: 8308
author:
......@@ -107,4 +107,17 @@ feature 'Group', feature: true do
expect(page).to have_css('.group-home-desc a[rel]')
end
end
describe 'group page with nested groups', js: true do
let!(:group) { create(:group) }
let!(:nested_group) { create(:group, parent: group) }
let!(:path) { group_path(group) }
it 'has nested groups tab with nested groups inside' do
visit path
click_link 'Nested Groups'
expect(page).to have_content(nested_group.full_name)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment