Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
10de4e3b
Commit
10de4e3b
authored
Dec 26, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show nested groups tab on group page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
9410f215
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
0 deletions
+29
-0
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+2
-0
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+10
-0
changelogs/unreleased/dz-nested-group-misc.yml
changelogs/unreleased/dz-nested-group-misc.yml
+4
-0
spec/features/groups_spec.rb
spec/features/groups_spec.rb
+13
-0
No files found.
app/controllers/groups_controller.rb
View file @
10de4e3b
...
...
@@ -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
|
...
...
app/views/groups/show.html.haml
View file @
10de4e3b
...
...
@@ -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
changelogs/unreleased/dz-nested-group-misc.yml
0 → 100644
View file @
10de4e3b
---
title
:
Show nested groups tab on group page
merge_request
:
8308
author
:
spec/features/groups_spec.rb
View file @
10de4e3b
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment