Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
ebe49638
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,发现更多精彩内容 >>
提交
ebe49638
编写于
6月 09, 2015
作者:
N
Nicolas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move Project Members link from Settings to main menu.
Addresses #2278.
上级
b637f849
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
15 deletion
+21
-15
app/controllers/projects/project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+0
-2
app/helpers/tab_helper.rb
app/helpers/tab_helper.rb
+1
-1
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+7
-0
app/views/layouts/nav/_project_settings.html.haml
app/views/layouts/nav/_project_settings.html.haml
+0
-5
features/project/active_tab.feature
features/project/active_tab.feature
+5
-7
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+4
-0
features/steps/shared/project_tab.rb
features/steps/shared/project_tab.rb
+4
-0
未找到文件。
app/controllers/projects/project_members_controller.rb
浏览文件 @
ebe49638
...
...
@@ -2,8 +2,6 @@ class Projects::ProjectMembersController < Projects::ApplicationController
# Authorize
before_action
:authorize_admin_project!
,
except: :leave
layout
"project_settings"
def
index
@project_members
=
@project
.
project_members
@project_members
=
@project_members
.
non_invite
unless
can?
(
current_user
,
:admin_project
,
@project
)
...
...
app/helpers/tab_helper.rb
浏览文件 @
ebe49638
...
...
@@ -89,7 +89,7 @@ module TabHelper
def
project_tab_class
return
"active"
if
current_page?
(
controller:
"/projects"
,
action: :edit
,
id:
@project
)
if
[
'services'
,
'hooks'
,
'deploy_keys'
,
'pro
ject_members'
,
'pro
tected_branches'
].
include?
controller
.
controller_name
if
[
'services'
,
'hooks'
,
'deploy_keys'
,
'protected_branches'
].
include?
controller
.
controller_name
"active"
end
end
...
...
app/views/layouts/nav/_project.html.haml
浏览文件 @
ebe49638
...
...
@@ -56,6 +56,13 @@
Merge Requests
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
-
if
project_nav_tab?
:settings
=
nav_link
(
controller:
[
:project_members
,
:teams
])
do
=
link_to
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
title:
'Members'
,
class:
'team-tab tab'
,
data:
{
placement:
'right'
}
do
=
icon
(
'users fw'
)
%span
Members
-
if
project_nav_tab?
:labels
=
nav_link
(
controller: :labels
)
do
=
link_to
namespace_project_labels_path
(
@project
.
namespace
,
@project
),
title:
'Labels'
,
data:
{
placement:
'right'
}
do
...
...
app/views/layouts/nav/_project_settings.html.haml
浏览文件 @
ebe49638
...
...
@@ -13,11 +13,6 @@
=
icon
(
'pencil-square-o'
)
%span
Project Settings
=
nav_link
(
controller:
[
:project_members
,
:teams
])
do
=
link_to
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
title:
'Members'
,
class:
'team-tab tab'
,
data:
{
placement:
'right'
}
do
=
icon
(
'users'
)
%span
Members
=
nav_link
(
controller: :deploy_keys
)
do
=
link_to
namespace_project_deploy_keys_path
(
@project
.
namespace
,
@project
),
title:
'Deploy Keys'
,
data:
{
placement:
'right'
}
do
=
icon
(
'key'
)
...
...
features/project/active_tab.feature
浏览文件 @
ebe49638
...
...
@@ -35,6 +35,11 @@ Feature: Project Active Tab
Then
the active main tab should be Merge Requests
And
no other main tabs should be active
Scenario
:
On Project Members
Given
I visit my project's members page
Then
the active main tab should be Members
And
no other main tabs should be active
Scenario
:
On Project Wiki
Given
I visit my project's wiki page
Then
the active main tab should be Wiki
...
...
@@ -49,13 +54,6 @@ Feature: Project Active Tab
# Sub Tabs: Settings
Scenario
:
On Project Settings/Team
Given
I visit my project's settings page
And
I click the
"Team"
tab
Then
the active sub nav should be Team
And
no other sub navs should be active
And
the active main tab should be Settings
Scenario
:
On Project Settings/Edit
Given
I visit my project's settings page
And
I click the
"Edit"
tab
...
...
features/steps/shared/paths.rb
浏览文件 @
ebe49638
...
...
@@ -227,6 +227,10 @@ module SharedPaths
visit
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
)
end
step
"I visit my project's members page"
do
visit
namespace_project_project_members_path
(
@project
.
namespace
,
@project
)
end
step
"I visit my project's wiki page"
do
visit
namespace_project_wiki_path
(
@project
.
namespace
,
@project
,
:home
)
end
...
...
features/steps/shared/project_tab.rb
浏览文件 @
ebe49638
...
...
@@ -28,6 +28,10 @@ module SharedProjectTab
ensure_active_main_tab
(
'Issues'
)
end
step
'the active main tab should be Members'
do
ensure_active_main_tab
(
'Members'
)
end
step
'the active main tab should be Merge Requests'
do
ensure_active_main_tab
(
'Merge Requests'
)
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录