Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
ed9cff9a
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ed9cff9a
编写于
6月 17, 2013
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Restyle project members page to fit both group and personal projects
上级
7d57b96e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
44 addition
and
63 deletion
+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
未找到文件。
app/assets/stylesheets/gitlab_bootstrap/lists.scss
浏览文件 @
ed9cff9a
...
...
@@ -16,6 +16,12 @@
color
:
#888
;
}
&
.unstyled
{
&
:hover
{
background
:
none
;
}
}
&
.smoke
{
background-color
:
#f5f5f5
;
}
&
:hover
{
...
...
app/controllers/dashboard_controller.rb
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录