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
ebe49638
Commit
ebe49638
authored
Jun 09, 2015
by
Nicolas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Project Members link from Settings to main menu.
Addresses #2278.
parent
b637f849
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
15 deletions
+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
No files found.
app/controllers/projects/project_members_controller.rb
View file @
ebe49638
...
@@ -2,8 +2,6 @@ class Projects::ProjectMembersController < Projects::ApplicationController
...
@@ -2,8 +2,6 @@ class Projects::ProjectMembersController < Projects::ApplicationController
# Authorize
# Authorize
before_action
:authorize_admin_project!
,
except: :leave
before_action
:authorize_admin_project!
,
except: :leave
layout
"project_settings"
def
index
def
index
@project_members
=
@project
.
project_members
@project_members
=
@project
.
project_members
@project_members
=
@project_members
.
non_invite
unless
can?
(
current_user
,
:admin_project
,
@project
)
@project_members
=
@project_members
.
non_invite
unless
can?
(
current_user
,
:admin_project
,
@project
)
...
...
app/helpers/tab_helper.rb
View file @
ebe49638
...
@@ -89,7 +89,7 @@ module TabHelper
...
@@ -89,7 +89,7 @@ module TabHelper
def
project_tab_class
def
project_tab_class
return
"active"
if
current_page?
(
controller:
"/projects"
,
action: :edit
,
id:
@project
)
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"
"active"
end
end
end
end
...
...
app/views/layouts/nav/_project.html.haml
View file @
ebe49638
...
@@ -56,6 +56,13 @@
...
@@ -56,6 +56,13 @@
Merge Requests
Merge Requests
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
%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
-
if
project_nav_tab?
:labels
=
nav_link
(
controller: :labels
)
do
=
nav_link
(
controller: :labels
)
do
=
link_to
namespace_project_labels_path
(
@project
.
namespace
,
@project
),
title:
'Labels'
,
data:
{
placement:
'right'
}
do
=
link_to
namespace_project_labels_path
(
@project
.
namespace
,
@project
),
title:
'Labels'
,
data:
{
placement:
'right'
}
do
...
...
app/views/layouts/nav/_project_settings.html.haml
View file @
ebe49638
...
@@ -13,11 +13,6 @@
...
@@ -13,11 +13,6 @@
=
icon
(
'pencil-square-o'
)
=
icon
(
'pencil-square-o'
)
%span
%span
Project Settings
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
=
nav_link
(
controller: :deploy_keys
)
do
=
link_to
namespace_project_deploy_keys_path
(
@project
.
namespace
,
@project
),
title:
'Deploy Keys'
,
data:
{
placement:
'right'
}
do
=
link_to
namespace_project_deploy_keys_path
(
@project
.
namespace
,
@project
),
title:
'Deploy Keys'
,
data:
{
placement:
'right'
}
do
=
icon
(
'key'
)
=
icon
(
'key'
)
...
...
features/project/active_tab.feature
View file @
ebe49638
...
@@ -35,6 +35,11 @@ Feature: Project Active Tab
...
@@ -35,6 +35,11 @@ Feature: Project Active Tab
Then
the active main tab should be Merge Requests
Then
the active main tab should be Merge Requests
And
no other main tabs should be active
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
Scenario
:
On Project Wiki
Given
I visit my project's wiki page
Given
I visit my project's wiki page
Then
the active main tab should be Wiki
Then
the active main tab should be Wiki
...
@@ -49,13 +54,6 @@ Feature: Project Active Tab
...
@@ -49,13 +54,6 @@ Feature: Project Active Tab
# Sub Tabs: Settings
# 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
Scenario
:
On Project Settings/Edit
Given
I visit my project's settings page
Given
I visit my project's settings page
And
I click the
"Edit"
tab
And
I click the
"Edit"
tab
...
...
features/steps/shared/paths.rb
View file @
ebe49638
...
@@ -227,6 +227,10 @@ module SharedPaths
...
@@ -227,6 +227,10 @@ module SharedPaths
visit
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
)
visit
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
)
end
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
step
"I visit my project's wiki page"
do
visit
namespace_project_wiki_path
(
@project
.
namespace
,
@project
,
:home
)
visit
namespace_project_wiki_path
(
@project
.
namespace
,
@project
,
:home
)
end
end
...
...
features/steps/shared/project_tab.rb
View file @
ebe49638
...
@@ -28,6 +28,10 @@ module SharedProjectTab
...
@@ -28,6 +28,10 @@ module SharedProjectTab
ensure_active_main_tab
(
'Issues'
)
ensure_active_main_tab
(
'Issues'
)
end
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
step
'the active main tab should be Merge Requests'
do
ensure_active_main_tab
(
'Merge Requests'
)
ensure_active_main_tab
(
'Merge Requests'
)
end
end
...
...
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