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
Boxiang Sun
gitlab-ce
Commits
3225fd36
Commit
3225fd36
authored
Mar 07, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the settings gear button inside the Project to a tab
parent
b5cb1115
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
83 additions
and
64 deletions
+83
-64
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+12
-17
app/views/layouts/nav/_project_settings.html.haml
app/views/layouts/nav/_project_settings.html.haml
+0
-24
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+1
-0
app/views/projects/pages/show.html.haml
app/views/projects/pages/show.html.haml
+2
-0
app/views/projects/settings/_head.html.haml
app/views/projects/settings/_head.html.haml
+33
-0
app/views/projects/settings/ci_cd/show.html.haml
app/views/projects/settings/ci_cd/show.html.haml
+1
-0
app/views/projects/settings/integrations/show.html.haml
app/views/projects/settings/integrations/show.html.haml
+1
-0
app/views/projects/settings/members/show.html.haml
app/views/projects/settings/members/show.html.haml
+1
-0
app/views/projects/settings/repository/show.html.haml
app/views/projects/settings/repository/show.html.haml
+1
-0
changelogs/unreleased/settings-tab.yml
changelogs/unreleased/settings-tab.yml
+4
-0
features/project/active_tab.feature
features/project/active_tab.feature
+8
-8
features/steps/project/active_tab.rb
features/steps/project/active_tab.rb
+16
-12
features/steps/shared/project_tab.rb
features/steps/shared/project_tab.rb
+3
-3
No files found.
app/views/layouts/nav/_project.html.haml
View file @
3225fd36
-
if
current_user
-
can_edit
=
can?
(
current_user
,
:admin_project
,
@project
)
.controls
.dropdown.project-settings-dropdown
%a
.dropdown-new.btn.btn-default
#project-settings-button
{
href:
'#'
,
'data-toggle'
=>
'dropdown'
}
=
icon
(
'cog'
)
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right
-
can_edit
=
can?
(
current_user
,
:admin_project
,
@project
)
=
render
'layouts/nav/project_settings'
,
can_edit:
can_edit
-
if
can_edit
%li
.divider
%li
=
link_to
edit_project_path
(
@project
)
do
Edit Project
.scrolling-tabs-container
{
class:
nav_control_class
}
.scrolling-tabs-container
{
class:
nav_control_class
}
.fade-left
.fade-left
=
icon
(
'angle-left'
)
=
icon
(
'angle-left'
)
...
@@ -71,6 +55,17 @@
...
@@ -71,6 +55,17 @@
%span
%span
Snippets
Snippets
-
if
project_nav_tab?
:settings
=
nav_link
(
path:
[
'projects#edit'
,
'members#show'
,
'integrations#show'
,
'repository#show'
,
'ci_cd#show'
,
'pages#show'
])
do
-
if
can_edit
=
link_to
edit_project_path
(
@project
),
title:
'Settings'
,
class:
'shortcuts-tree'
do
%span
Settings
-
else
=
link_to
edit_project_path
(
@path
),
title:
'Settings'
,
class:
'shortcuts-tree'
do
%span
Settings
-# Shortcut to Project > Activity
-# Shortcut to Project > Activity
%li
.hidden
%li
.hidden
=
link_to
activity_project_path
(
@project
),
title:
'Activity'
,
class:
'shortcuts-project-activity'
do
=
link_to
activity_project_path
(
@project
),
title:
'Activity'
,
class:
'shortcuts-project-activity'
do
...
...
app/views/layouts/nav/_project_settings.html.haml
deleted
100644 → 0
View file @
b5cb1115
-
if
project_nav_tab?
:team
=
nav_link
(
controller:
[
:members
,
:teams
])
do
=
link_to
namespace_project_settings_members_path
(
@project
.
namespace
,
@project
),
title:
'Members'
,
class:
'team-tab tab'
do
%span
Members
-
if
can_edit
=
nav_link
(
controller: :repository
)
do
=
link_to
namespace_project_settings_repository_path
(
@project
.
namespace
,
@project
),
title:
'Repository'
do
%span
Repository
=
nav_link
(
controller: :integrations
)
do
=
link_to
namespace_project_settings_integrations_path
(
@project
.
namespace
,
@project
),
title:
'Integrations'
do
%span
Integrations
-
if
@project
.
feature_available?
(
:builds
,
current_user
)
=
nav_link
(
controller: :ci_cd
)
do
=
link_to
namespace_project_settings_ci_cd_path
(
@project
.
namespace
,
@project
),
title:
'CI/CD Pipelines'
do
%span
CI/CD Pipelines
=
nav_link
(
controller: :pages
)
do
=
link_to
namespace_project_pages_path
(
@project
.
namespace
,
@project
),
title:
'Pages'
,
data:
{
placement:
'right'
}
do
%span
Pages
app/views/projects/edit.html.haml
View file @
3225fd36
=
render
"projects/settings/head"
.project-edit-container
.project-edit-container
.row.prepend-top-default
.row.prepend-top-default
.col-lg-3.profile-settings-sidebar
.col-lg-3.profile-settings-sidebar
...
...
app/views/projects/pages/show.html.haml
View file @
3225fd36
-
page_title
'Pages'
-
page_title
'Pages'
=
render
"projects/settings/head"
%h3
.page_title
%h3
.page_title
Pages
Pages
...
...
app/views/projects/settings/_head.html.haml
0 → 100644
View file @
3225fd36
=
content_for
:sub_nav
do
.scrolling-tabs-container.sub-nav-scroll
=
render
'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul
{
class:
(
container_class
)
}
-
can_edit
=
can?
(
current_user
,
:admin_project
,
@project
)
-
if
can_edit
=
nav_link
(
controller: :projects
)
do
=
link_to
edit_project_path
(
@project
),
title:
'General'
do
%span
General
=
nav_link
(
controller: :members
)
do
=
link_to
project_settings_members_path
(
@project
),
title:
'Members'
do
%span
Members
-
if
can_edit
=
nav_link
(
controller: :integrations
)
do
=
link_to
project_settings_integrations_path
(
@project
),
title:
'Integrations'
do
%span
Integrations
=
nav_link
(
controller: :repository
)
do
=
link_to
namespace_project_settings_repository_path
(
@project
.
namespace
,
@project
),
title:
'Repository'
do
%span
Repository
-
if
@project
.
feature_available?
(
:builds
,
current_user
)
=
nav_link
(
controller: :ci_cd
)
do
=
link_to
namespace_project_settings_ci_cd_path
(
@project
.
namespace
,
@project
),
title:
'CI/CD Pipelines'
do
%span
CI/CD Pipelines
=
nav_link
(
controller: :pages
)
do
=
link_to
namespace_project_pages_path
(
@project
.
namespace
,
@project
),
title:
'Pages'
do
%span
Pages
app/views/projects/settings/ci_cd/show.html.haml
View file @
3225fd36
-
page_title
"CI/CD Pipelines"
-
page_title
"CI/CD Pipelines"
=
render
"projects/settings/head"
=
render
'projects/runners/index'
=
render
'projects/runners/index'
=
render
'projects/variables/index'
=
render
'projects/variables/index'
...
...
app/views/projects/settings/integrations/show.html.haml
View file @
3225fd36
-
page_title
'Integrations'
-
page_title
'Integrations'
=
render
"projects/settings/head"
=
render
'projects/hooks/index'
=
render
'projects/hooks/index'
=
render
'projects/services/index'
=
render
'projects/services/index'
app/views/projects/settings/members/show.html.haml
View file @
3225fd36
-
page_title
"Members"
-
page_title
"Members"
=
render
"projects/settings/head"
=
render
"projects/project_members/index"
=
render
"projects/project_members/index"
-
if
can?
(
current_user
,
:admin_project
,
@project
)
-
if
can?
(
current_user
,
:admin_project
,
@project
)
...
...
app/views/projects/settings/repository/show.html.haml
View file @
3225fd36
-
page_title
"Repository"
-
page_title
"Repository"
=
render
"projects/settings/head"
=
render
@deploy_keys
=
render
@deploy_keys
=
render
"projects/protected_branches/index"
=
render
"projects/protected_branches/index"
changelogs/unreleased/settings-tab.yml
0 → 100644
View file @
3225fd36
---
title
:
Removed the settings gear button inside the Project to a tab
merge_request
:
author
:
features/project/active_tab.feature
View file @
3225fd36
...
@@ -52,28 +52,28 @@ Feature: Project Active Tab
...
@@ -52,28 +52,28 @@ Feature: Project Active Tab
Scenario
:
On Project Settings/Integrations
Scenario
:
On Project Settings/Integrations
Given
I visit my project's settings page
Given
I visit my project's settings page
And
I click the
"Integrations"
tab
And
I click the
"Integrations"
tab
Then
the active sub
nav
should be Integrations
Then
the active sub
tab
should be Integrations
And
no other sub
nav
s should be active
And
no other sub
tab
s should be active
And
the active main tab should be Settings
And
the active main tab should be Settings
Scenario
:
On Project Settings/Repository
Scenario
:
On Project Settings/Repository
Given
I visit my project's settings page
Given
I visit my project's settings page
And
I click the
"Repository"
tab
And
I click the
"Repository"
tab
Then
the active sub
nav
should be Repository
Then
the active sub
tab
should be Repository
And
no other sub
nav
s should be active
And
no other sub
tab
s should be active
And
the active main tab should be Settings
And
the active main tab should be Settings
Scenario
:
On Project Settings/Pages
Scenario
:
On Project Settings/Pages
Given
I visit my project's settings page
Given
I visit my project's settings page
And
I click the
"Pages"
tab
And
I click the
"Pages"
tab
Then
the active sub
nav
should be Pages
Then
the active sub
tab
should be Pages
And
no other sub
nav
s should be active
And
no other sub
tab
s should be active
And
the active main tab should be Settings
And
the active main tab should be Settings
Scenario
:
On Project Members
Scenario
:
On Project Members
Given
I visit my project's members page
Given
I visit my project's members page
Then
the active sub
nav
should be Members
Then
the active sub
tab
should be Members
And
no other sub
nav
s should be active
And
no other sub
tab
s should be active
And
the active main tab should be Settings
And
the active main tab should be Settings
# Sub Tabs: Repository
# Sub Tabs: Repository
...
...
features/steps/project/active_tab.rb
View file @
3225fd36
...
@@ -22,24 +22,28 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
...
@@ -22,24 +22,28 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
end
end
step
'I click the "Edit Project"'
do
step
'I click the "Edit Project"'
do
page
.
within
'.
layout-nav .controls
'
do
page
.
within
'.
sub-nav
'
do
click_link
(
'Edit Project'
)
click_link
(
'Edit Project'
)
end
end
end
end
step
'I click the "Integrations" tab'
do
step
'I click the "Integrations" tab'
do
page
.
within
'.sub-nav'
do
click_link
(
'Integrations'
)
click_link
(
'Integrations'
)
end
end
end
step
'I click the "Repository" tab'
do
step
'I click the "Repository" tab'
do
page
.
within
'.
layout-nav .controls
'
do
page
.
within
'.
sub-nav
'
do
click_link
(
'Repository'
)
click_link
(
'Repository'
)
end
end
end
end
step
'I click the "Pages" tab'
do
step
'I click the "Pages" tab'
do
page
.
within
'.sub-nav'
do
click_link
(
'Pages'
)
click_link
(
'Pages'
)
end
end
end
step
'I click the "Activity" tab'
do
step
'I click the "Activity" tab'
do
page
.
within
'.sub-nav'
do
page
.
within
'.sub-nav'
do
...
@@ -47,20 +51,20 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
...
@@ -47,20 +51,20 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
end
end
end
end
step
'the active sub
nav
should be Members'
do
step
'the active sub
tab
should be Members'
do
ensure_active_sub_
nav
(
'Members'
)
ensure_active_sub_
tab
(
'Members'
)
end
end
step
'the active sub
nav
should be Integrations'
do
step
'the active sub
tab
should be Integrations'
do
ensure_active_sub_
nav
(
'Integrations'
)
ensure_active_sub_
tab
(
'Integrations'
)
end
end
step
'the active sub
nav
should be Repository'
do
step
'the active sub
tab
should be Repository'
do
ensure_active_sub_
nav
(
'Repository'
)
ensure_active_sub_
tab
(
'Repository'
)
end
end
step
'the active sub
nav
should be Pages'
do
step
'the active sub
tab
should be Pages'
do
ensure_active_sub_
nav
(
'Pages'
)
ensure_active_sub_
tab
(
'Pages'
)
end
end
step
'the active sub tab should be Activity'
do
step
'the active sub tab should be Activity'
do
...
...
features/steps/shared/project_tab.rb
View file @
3225fd36
...
@@ -16,8 +16,8 @@ module SharedProjectTab
...
@@ -16,8 +16,8 @@ module SharedProjectTab
ensure_active_main_tab
(
'Issues'
)
ensure_active_main_tab
(
'Issues'
)
end
end
step
'the active
main
tab should be Members'
do
step
'the active
sub
tab should be Members'
do
ensure_active_
main
_tab
(
'Members'
)
ensure_active_
sub
_tab
(
'Members'
)
end
end
step
'the active main tab should be Merge Requests'
do
step
'the active main tab should be Merge Requests'
do
...
@@ -33,7 +33,7 @@ module SharedProjectTab
...
@@ -33,7 +33,7 @@ module SharedProjectTab
end
end
step
'the active main tab should be Settings'
do
step
'the active main tab should be Settings'
do
e
xpect
(
page
).
to
have_selector
(
'.layout-nav .nav-links > li.active'
,
count:
0
)
e
nsure_active_main_tab
(
'Settings'
)
end
end
step
'the active sub tab should be Graph'
do
step
'the active sub tab should be Graph'
do
...
...
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