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
Tatuya Kamada
gitlab-ce
Commits
ed9cff9a
Commit
ed9cff9a
authored
Jun 17, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle project members page to fit both group and personal projects
parent
7d57b96e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
63 deletions
+44
-63
app/assets/stylesheets/gitlab_bootstrap/lists.scss
app/assets/stylesheets/gitlab_bootstrap/lists.scss
+6
-0
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+3
-2
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+1
-1
app/controllers/team_members_controller.rb
app/controllers/team_members_controller.rb
+1
-4
app/views/team_members/_group_members.html.haml
app/views/team_members/_group_members.html.haml
+7
-0
app/views/team_members/_team.html.haml
app/views/team_members/_team.html.haml
+5
-7
app/views/team_members/index.html.haml
app/views/team_members/index.html.haml
+21
-49
No files found.
app/assets/stylesheets/gitlab_bootstrap/lists.scss
View file @
ed9cff9a
...
...
@@ -16,6 +16,12 @@
color
:
#888
;
}
&
.unstyled
{
&
:hover
{
background
:
none
;
}
}
&
.smoke
{
background-color
:
#f5f5f5
;
}
&
:hover
{
...
...
app/controllers/dashboard_controller.rb
View file @
ed9cff9a
...
...
@@ -34,11 +34,12 @@ class DashboardController < ApplicationController
@projects
end
@projects
=
@projects
.
tagged_with
(
params
[
:label
])
if
params
[
:label
].
present?
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
30
)
@labels
=
Project
.
where
(
id:
@projects
.
map
(
&
:id
)).
tags_on
(
:labels
)
@projects
=
@projects
.
tagged_with
(
params
[
:label
])
if
params
[
:label
].
present?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
30
)
end
# Get authored or assigned open merge requests
...
...
app/controllers/groups_controller.rb
View file @
ed9cff9a
...
...
@@ -63,7 +63,7 @@ class GroupsController < ApplicationController
def
people
@project
=
group
.
projects
.
find
(
params
[
:project_id
])
if
params
[
:project_id
]
@members
=
group
.
users_groups
@members
=
group
.
users_groups
.
order
(
'group_access DESC'
)
@users_group
=
UsersGroup
.
new
end
...
...
app/controllers/team_members_controller.rb
View file @
ed9cff9a
...
...
@@ -4,11 +4,8 @@ class TeamMembersController < ProjectResourceController
before_filter
:authorize_admin_project!
,
except:
[
:index
,
:show
]
def
index
@team
=
@project
.
users_projects
.
scoped
@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
@users_projects
=
@project
.
users_projects
.
order
(
'project_access DESC'
)
@assigned_teams
=
@project
.
user_team_project_relationships
end
...
...
app/views/team_members/_group_members.html.haml
0 → 100644
View file @
ed9cff9a
.ui-box
%h5
.title
=
link_to
people_group_path
(
@group
)
do
Members of
#{
@group
.
name
}
group
%ul
.well-list
-
@group
.
users_groups
.
order
(
'group_access DESC'
).
each
do
|
member
|
=
render
'users_groups/users_group'
,
member:
member
,
show_controls:
false
app/views/team_members/_team.html.haml
View file @
ed9cff9a
-
can_admin_project
=
(
can?
current_user
,
:admin_project
,
@project
)
-
team
.
each
do
|
access
,
members
|
-
role
=
Project
.
access_options
.
key
(
access
).
pluralize
.ui-box
{
class:
role
.
downcase
}
.team-table
-
can_admin_project
=
(
can?
current_user
,
:admin_project
,
@project
)
.ui-box
%h5
.title
=
role
%span
.light
(
#{
members
.
size
}
)
Project members (
#{
members
.
count
}
)
%ul
.well-list
-
members
.
sort_by
(
&
:user_name
).
each
do
|
team_member
|
-
members
.
each
do
|
team_member
|
=
render
'team_members/team_member'
,
member:
team_member
,
current_user_can_admin_project:
can_admin_project
app/views/team_members/index.html.haml
View file @
ed9cff9a
=
render
"projects/settings_nav"
%h3
.page_title
Project Members
(
#{
@project
.
users
.
count
}
)
%small
Read more about project permissions
%strong
=
link_to
"here"
,
help_permissions_path
,
class:
"vlink"
Users with access to this project
-
if
can?
current_user
,
:admin_team_member
,
@project
%span
.pull-right
...
...
@@ -15,51 +11,27 @@
=
link_to
new_project_team_member_path
(
@project
),
class:
"btn btn-primary small grouped"
,
title:
"New Team Member"
do
New Team Member
%hr
%p
.light
Read more about project permissions
%strong
=
link_to
"here"
,
help_permissions_path
,
class:
"vlink"
.clearfix
.row
.span3
%ul
.nav.nav-pills.nav-stacked
%li
{
class:
(
"active"
if
!
params
[
:type
])}
=
link_to
project_team_index_path
(
type:
nil
)
do
All
%li
{
class:
(
"active"
if
params
[
:type
]
==
'masters'
)}
=
link_to
project_team_index_path
(
type:
'masters'
)
do
Masters
%span
.pull-right
=
@project
.
users_projects
.
masters
.
count
%li
{
class:
(
"active"
if
params
[
:type
]
==
'developers'
)}
=
link_to
project_team_index_path
(
type:
'developers'
)
do
Developers
%span
.pull-right
=
@project
.
users_projects
.
developers
.
count
%li
{
class:
(
"active"
if
params
[
:type
]
==
'reporters'
)}
=
link_to
project_team_index_path
(
type:
'reporters'
)
do
Reporters
%span
.pull-right
=
@project
.
users_projects
.
reporters
.
count
%li
{
class:
(
"active"
if
params
[
:type
]
==
'guests'
)}
=
link_to
project_team_index_path
(
type:
'guests'
)
do
Guests
%span
.pull-right
=
@project
.
users_projects
.
guests
.
count
-
if
@assigned_teams
.
present?
%h5
Assigned teams
(
#{
@project
.
user_teams
.
count
}
)
%div
=
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
.clearfix
-
if
@group
.row
.span6
=
render
"team_members/group_members"
.span6
=
render
"team_members/team"
,
members:
@users_projects
-
else
=
render
"team_members/team"
,
members:
@users_projects
-
if
@assigned_teams
.
present?
%h5
Assigned teams
(
#{
@project
.
user_teams
.
count
}
)
%div
=
render
"team_members/assigned_teams"
,
assigned_teams:
@assigned_teams
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