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
e1dffa32
Commit
e1dffa32
authored
Mar 12, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render project members from shared group
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
e12e937b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
app/controllers/projects/project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+1
-0
app/views/projects/project_members/_shared_group_members.html.haml
.../projects/project_members/_shared_group_members.html.haml
+21
-0
app/views/projects/project_members/index.html.haml
app/views/projects/project_members/index.html.haml
+3
-0
No files found.
app/controllers/projects/project_members_controller.rb
View file @
e1dffa32
...
@@ -27,6 +27,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController
...
@@ -27,6 +27,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController
end
end
@project_member
=
@project
.
project_members
.
new
@project_member
=
@project
.
project_members
.
new
@project_group_links
=
@project
.
project_group_links
end
end
def
create
def
create
...
...
app/views/projects/project_members/_shared_group_members.html.haml
0 → 100644
View file @
e1dffa32
-
@project_group_links
.
each
do
|
group_links
|
-
shared_group
=
group_links
.
group
-
shared_group_users_count
=
group_links
.
group
.
group_members
.
count
.panel.panel-default
.panel-heading
Shared with
%strong
#{
shared_group
.
name
}
group, members with
%strong
#{
group_links
.
human_access
}
role (
#{
shared_group_users_count
}
)
-
if
current_user
.
can?
(
:admin_group
,
shared_group
)
.panel-head-actions
=
link_to
group_group_members_path
(
shared_group
),
class:
'btn btn-sm'
do
%i
.fa.fa-pencil-square-o
Edit group members
%ul
.content-list
-
shared_group
.
group_members
.
order
(
'access_level DESC'
).
limit
(
20
).
each
do
|
member
|
=
render
'groups/group_members/group_member'
,
member:
member
,
show_controls:
false
,
show_roles:
false
-
if
shared_group_users_count
>
20
%li
and
#{
shared_group_users_count
-
20
}
more. For full list visit
#{
link_to
'group members page'
,
group_group_members_path
(
shared_group
)
}
app/views/projects/project_members/index.html.haml
View file @
e1dffa32
...
@@ -18,3 +18,6 @@
...
@@ -18,3 +18,6 @@
-
if
@group
-
if
@group
=
render
"group_members"
,
members:
@group_members
=
render
"group_members"
,
members:
@group_members
-
if
@project_group_links
.
any?
&&
@project
.
allowed_to_share_with_group?
=
render
"shared_group_members"
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