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
73c4da17
Commit
73c4da17
authored
Sep 06, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed removing groups
parent
11c0c650
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
app/controllers/projects/group_links_controller.rb
app/controllers/projects/group_links_controller.rb
+6
-1
app/views/shared/members/_group.html.haml
app/views/shared/members/_group.html.haml
+2
-1
spec/features/projects/members/group_links_spec.rb
spec/features/projects/members/group_links_spec.rb
+9
-0
No files found.
app/controllers/projects/group_links_controller.rb
View file @
73c4da17
...
...
@@ -29,7 +29,12 @@ class Projects::GroupLinksController < Projects::ApplicationController
def
destroy
project
.
project_group_links
.
find
(
params
[
:id
]).
destroy
redirect_to
namespace_project_group_links_path
(
project
.
namespace
,
project
)
respond_to
do
|
format
|
format
.
html
do
redirect_to
namespace_project_group_links_path
(
project
.
namespace
,
project
)
end
format
.
js
{
head
:ok
}
end
end
protected
...
...
app/views/shared/members/_group.html.haml
View file @
73c4da17
-
group
=
local_assigns
[
:group
]
-
group_link
=
local_assigns
[
:group_link
]
%li
.member
{
class:
dom_class
(
group
),
id:
dom_id
(
group
)
}
%li
.member
.group_member
{
id:
"group_member_#{group_link.id}"
}
%span
{
class:
"list-item-name"
}
=
image_tag
group_icon
(
group
),
class:
"avatar s40"
,
alt:
''
%strong
...
...
@@ -21,6 +21,7 @@
=
link_to
namespace_project_group_link_path
(
@project
.
namespace
,
@project
,
group_link
),
remote:
true
,
method: :delete
,
data:
{
confirm:
"Are you sure you want to remove
#{
group
.
name
}
?"
},
class:
'btn btn-remove prepend-left-10'
do
%span
.visible-xs-block
Delete
...
...
spec/features/projects/members/group_links_spec.rb
View file @
73c4da17
...
...
@@ -34,4 +34,13 @@ feature 'Projects > Members > Anonymous user sees members', feature: true, js: t
expect
(
page
).
to
have_content
(
'Expires in'
)
end
end
it
'deletes group link'
do
page
.
within
(
first
(
'.group_member'
))
do
find
(
'.btn-remove'
).
click
end
wait_for_ajax
expect
(
page
).
not_to
have_selector
(
'.group_member'
)
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