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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5bed576a
Commit
5bed576a
authored
Jun 17, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show group members on project team page
parent
b4fe5a76
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
22 deletions
+22
-22
app/controllers/team_members_controller.rb
app/controllers/team_members_controller.rb
+1
-0
app/views/team_members/_team_member.html.haml
app/views/team_members/_team_member.html.haml
+12
-22
app/views/team_members/index.html.haml
app/views/team_members/index.html.haml
+9
-0
No files found.
app/controllers/team_members_controller.rb
View file @
5bed576a
...
...
@@ -8,6 +8,7 @@ class TeamMembersController < ProjectResourceController
@team
=
@team
.
send
(
params
[
:type
])
if
%w(masters developers reporters guests)
.
include?
(
params
[
:type
])
@team
=
@team
.
sort_by
(
&
:project_access
).
reverse
.
group_by
(
&
:project_access
)
@group
=
@project
.
group
@assigned_teams
=
@project
.
user_team_project_relationships
end
...
...
app/views/team_members/_team_member.html.haml
View file @
5bed576a
-
user
=
member
.
user
-
allow_admin
=
current_user_can_admin_project
%li
{
id:
dom_id
(
user
),
class:
"team_member_row user_#{user.id}"
}
.row
.span4
=
link_to
user
,
title:
user
.
name
,
class:
"dark"
do
=
image_tag
gravatar_icon
(
user
.
email
,
32
),
class:
"avatar s32"
%strong
=
truncate
(
user
.
name
,
lenght:
40
)
%br
%small
.cgray
=
user
.
username
.span4.pull-right
.pull-right
-
if
allow_admin
.
left
.pull-
left
=
form_for
(
member
,
as: :team_member
,
url:
project_team_member_path
(
@project
,
member
.
user
))
do
|
f
|
=
f
.
select
:project_access
,
options_for_select
(
UsersProject
.
access_roles
,
member
.
project_access
),
{},
class:
"medium project-access-select span2 trigger-submit"
.pull-right
-
if
current_user
==
user
%span
.label.label-success
This is you!
-
if
@project
.
namespace_owner
==
user
%span
.label.label-info
Owner
-
elsif
user
.
blocked?
%span
.label.label-error
Blocked
-
elsif
allow_admin
=
link_to
project_team_member_path
(
@project
,
user
),
confirm:
remove_from_project_team_message
(
@project
,
user
),
method: :delete
,
class:
"btn-tiny btn btn-remove"
,
title:
'Remove user from team'
do
%i
.icon-minus.icon-white
=
image_tag
gravatar_icon
(
user
.
email
,
32
),
class:
"avatar s32"
%p
%strong
=
user
.
name
%span
.cgray
=
user
.
username
app/views/team_members/index.html.haml
View file @
5bed576a
...
...
@@ -17,6 +17,7 @@
%hr
.clearfix
.row
.span3
...
...
@@ -49,6 +50,14 @@
=
render
"team_members/assigned_teams"
,
assigned_teams:
@assigned_teams
.span9
-
if
@group
.ui-box
%h5
.title
=
link_to
people_group_path
(
@group
)
do
Members of
#{
@group
.
name
}
group
%ul
.well-list
-
@group
.
users_groups
.
each
do
|
member
|
=
render
'users_groups/users_group'
,
member:
member
,
show_controls:
false
%div
.team-table
=
render
"team_members/team"
,
team:
@team
...
...
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