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
Léo-Paul Géneau
gitlab-ce
Commits
e33cda96
Commit
e33cda96
authored
Sep 01, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed group members not deleting
Combine both group members & project members in project members list
parent
23993147
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
+14
-9
app/assets/javascripts/project_members.js.es6
app/assets/javascripts/project_members.js.es6
+4
-3
app/controllers/projects/project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+5
-4
app/views/projects/project_members/_team.html.haml
app/views/projects/project_members/_team.html.haml
+4
-2
app/views/projects/project_members/index.html.haml
app/views/projects/project_members/index.html.haml
+1
-0
No files found.
app/assets/javascripts/project_members.js.es6
View file @
e33cda96
...
...
@@ -8,12 +8,12 @@
}
removeListeners() {
$('.project_member').off('ajax:success');
$('.project_member
, .group_member
').off('ajax:success');
$('.js-member-update-control').off('change');
}
addListeners() {
$('.project_member').on('ajax:success', this.removeRow);
$('.project_member
, .group_member
').on('ajax:success', this.removeRow);
$('.js-member-update-control').on('change', function () {
$(this).closest('form')
.trigger("submit.rails");
...
...
@@ -24,7 +24,8 @@
const $target = $(e.target);
if ($target.hasClass('btn-remove')) {
$target.fadeOut();
console.log('a');
$target.closest('.member').fadeOut();
}
}
...
...
app/controllers/projects/project_members_controller.rb
View file @
e33cda96
...
...
@@ -6,15 +6,16 @@ class Projects::ProjectMembersController < Projects::ApplicationController
def
index
@groups
=
@project
.
project_group_links
.
all
@project_members
=
@project
.
project_members
@project_members
=
@project
.
team
.
members
.
all
@project_members_size
=
@project_members
.
size
@group_members
=
@project
.
group
.
group_members
@project_members
=
@project_members
.
non_invite
unless
can?
(
current_user
,
:admin_project
,
@project
)
if
params
[
:search
].
present?
users
=
@project
.
users
.
search
(
params
[
:search
]).
to_a
@project_members
=
@project_members
.
where
(
user_id:
users
)
@project_members
=
@project_members
.
search
(
params
[
:search
])
end
@project_members
=
@project_members
.
order
(
'access_level DESC'
)
@project_members
=
@project_members
.
page
(
params
[
:page
]
)
@requesters
=
@project
.
requesters
if
can?
(
current_user
,
:admin_project
,
@project
)
...
...
app/views/projects/project_members/_team.html.haml
View file @
e33cda96
...
...
@@ -2,6 +2,8 @@
.panel-heading
Users with access to
%strong
#{
@project
.
name
}
%span
.badge
=
members
.
size
%span
.badge
=
@project_members_
size
%ul
.content-list
=
render
partial:
'shared/members/member'
,
collection:
members
,
as: :member
-
members
.
each
do
|
user
|
-
member
=
@project
.
team
.
find_member
(
user
.
id
)
=
render
'shared/members/member'
,
member:
member
app/views/projects/project_members/index.html.haml
View file @
e33cda96
...
...
@@ -25,3 +25,4 @@
=
render
'groups'
,
groups:
@groups
=
render
'team'
,
members:
@project_members
=
paginate
@project_members
,
theme:
"gitlab"
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