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
Jérome Perrin
gitlab-ce
Commits
1c38d328
Commit
1c38d328
authored
Jun 28, 2017
by
Annabel Dunstone Gray
Committed by
Phil Hughes
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Navigation - Move contextual navigation to sidebar"
parent
b558dc81
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
624 additions
and
12 deletions
+624
-12
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+3
-0
app/assets/stylesheets/new_sidebar.scss
app/assets/stylesheets/new_sidebar.scss
+121
-0
app/views/layouts/_head.html.haml
app/views/layouts/_head.html.haml
+1
-0
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+12
-8
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+5
-1
app/views/layouts/group.html.haml
app/views/layouts/group.html.haml
+5
-1
app/views/layouts/nav/_new_admin_sidebar.html.haml
app/views/layouts/nav/_new_admin_sidebar.html.haml
+119
-0
app/views/layouts/nav/_new_group_sidebar.html.haml
app/views/layouts/nav/_new_group_sidebar.html.haml
+56
-0
app/views/layouts/nav/_new_profile_sidebar.html.haml
app/views/layouts/nav/_new_profile_sidebar.html.haml
+49
-0
app/views/layouts/nav/_new_project_sidebar.html.haml
app/views/layouts/nav/_new_project_sidebar.html.haml
+242
-0
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+5
-1
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+5
-1
config/application.rb
config/application.rb
+1
-0
No files found.
app/assets/stylesheets/framework/variables.scss
View file @
1c38d328
...
...
@@ -74,6 +74,8 @@ $red-700: #a62d19;
$red-800
:
#8b2615
;
$red-900
:
#711e11
;
$purple-600
:
#6e49cb
;
$purple-650
:
#5c35ae
;
$purple-700
:
#4a2192
;
$purple-800
:
#2c0a5c
;
$purple-900
:
#380d75
;
...
...
@@ -103,6 +105,7 @@ $well-light-text-color: #5b6169;
*/
$gl-font-size
:
14px
;
$gl-text-color
:
rgba
(
0
,
0
,
0
,
.85
);
$gl-text-color-light
:
rgba
(
0
,
0
,
0
,
.7
);
$gl-text-color-secondary
:
rgba
(
0
,
0
,
0
,
.55
);
$gl-text-color-disabled
:
rgba
(
0
,
0
,
0
,
.35
);
$gl-text-color-inverted
:
rgba
(
255
,
255
,
255
,
1
.0
);
...
...
app/assets/stylesheets/new_sidebar.scss
0 → 100644
View file @
1c38d328
@import
"framework/variables"
;
@import
'framework/tw_bootstrap_variables'
;
@import
"bootstrap/variables"
;
$new-sidebar-width
:
220px
;
.page-with-new-sidebar
{
@media
(
min-width
:
$screen-sm-min
)
{
padding-left
:
$new-sidebar-width
;
}
.right-sidebar
{
position
:
fixed
;
height
:
100%
;
}
}
.nav-sidebar
{
position
:
fixed
;
z-index
:
400
;
width
:
$new-sidebar-width
;
top
:
50px
;
bottom
:
0
;
left
:
0
;
overflow
:
auto
;
background-color
:
$gray-light
;
border-right
:
1px
solid
$border-color
;
ul
{
padding
:
0
;
list-style
:
none
;
}
li
{
a
{
display
:
block
;
padding
:
12px
14px
;
}
}
a
{
color
:
$gl-text-color
;
text-decoration
:
none
;
}
}
.sidebar-sub-level-items
{
display
:
none
;
>
li
{
a
{
padding
:
12px
24px
;
color
:
$gl-text-color-light
;
&
:hover
{
color
:
$gl-text-color
;
background-color
:
$border-color
;
}
}
&
.active
{
>
a
{
color
:
$purple-650
;
font-weight
:
600
;
}
}
}
}
.sidebar-top-level-items
{
>
li
{
.badge
{
float
:
right
;
background-color
:
$border-color
;
color
:
$gl-text-color
;
}
&
.active
{
>
a
{
background-color
:
$purple-600
;
color
:
$white-light
;
font-weight
:
600
;
}
.badge
{
background-color
:
$purple-700
;
color
:
$white-light
;
}
.sidebar-sub-level-items
{
background-color
:
$gray-normal
;
border-left
:
6px
solid
$purple-600
;
display
:
block
;
}
}
&
:not
(
.active
)
>
a
:hover
{
background-color
:
$border-color
;
.badge
{
transition
:
background-color
100ms
linear
;
background-color
:
$gray-normal
;
}
}
}
}
// Make issue boards full-height now that sub-nav is gone
.boards-list
{
height
:
calc
(
100vh
-
50px
);
@media
(
min-width
:
$screen-sm-min
)
{
height
:
475px
;
// Needed for PhantomJS
// scss-lint:disable DuplicateProperty
height
:
calc
(
100vh
-
120px
);
// scss-lint:enable DuplicateProperty
}
}
app/views/layouts/_head.html.haml
View file @
1c38d328
...
...
@@ -32,6 +32,7 @@
-
if
show_new_nav?
=
stylesheet_link_tag
"new_nav"
,
media:
"all"
=
stylesheet_link_tag
"new_sidebar"
,
media:
"all"
=
Gon
::
Base
.
render_data
...
...
app/views/layouts/_page.html.haml
View file @
1c38d328
.page-with-sidebar
{
class:
page_gutter_class
}
.page-with-sidebar
{
class:
"#{('page-with-new-sidebar' if defined?(@new_sidebar) && @new_sidebar)} #{page_gutter_class}"
}
-
if
show_new_nav?
-
if
defined?
(
nav
)
&&
nav
=
render
"layouts/nav/
#{
nav
}
"
-
else
-
if
defined?
(
nav
)
&&
nav
.layout-nav
.container-fluid
=
render
"layouts/nav/
#{
nav
}
"
-
if
content_for?
(
:sub_nav
)
=
yield
:sub_nav
.content-wrapper
{
class:
layout_nav_class
}
.content-wrapper
{
class:
"#{(layout_nav_class unless show_new_nav?)}"
}
.alert-wrapper
=
render
"layouts/broadcast"
=
render
"layouts/flash"
...
...
app/views/layouts/admin.html.haml
View file @
1c38d328
-
page_title
"Admin Area"
-
header_title
"Admin Area"
,
admin_root_path
-
nav
"admin"
-
if
show_new_nav?
-
nav
"new_admin_sidebar"
-
@new_sidebar
=
true
-
else
-
nav
"admin"
=
render
template:
"layouts/application"
app/views/layouts/group.html.haml
View file @
1c38d328
-
page_title
@group
.
name
-
page_description
@group
.
description
unless
page_description
-
header_title
group_title
(
@group
)
unless
header_title
-
nav
"group"
-
if
show_new_nav?
-
nav
"new_group_sidebar"
-
@new_sidebar
=
true
-
else
-
nav
"group"
=
render
template:
"layouts/application"
app/views/layouts/nav/_new_admin_sidebar.html.haml
0 → 100644
View file @
1c38d328
.nav-sidebar
%ul
.sidebar-top-level-items
=
nav_link
(
controller:
%w(dashboard admin projects users groups builds runners cohorts)
,
html_options:
{
class:
'home'
})
do
=
link_to
admin_root_path
,
title:
'Overview'
,
class:
'shortcuts-tree'
do
%span
Overview
%ul
.sidebar-sub-level-items
=
nav_link
(
controller: :dashboard
,
html_options:
{
class:
'home'
})
do
=
link_to
admin_root_path
,
title:
'Overview'
do
%span
Overview
=
nav_link
(
controller:
[
:admin
,
:projects
])
do
=
link_to
admin_projects_path
,
title:
'Projects'
do
%span
Projects
=
nav_link
(
controller: :users
)
do
=
link_to
admin_users_path
,
title:
'Users'
do
%span
Users
=
nav_link
(
controller: :groups
)
do
=
link_to
admin_groups_path
,
title:
'Groups'
do
%span
Groups
=
nav_link
path:
'builds#index'
do
=
link_to
admin_jobs_path
,
title:
'Jobs'
do
%span
Jobs
=
nav_link
path:
[
'runners#index'
,
'runners#show'
]
do
=
link_to
admin_runners_path
,
title:
'Runners'
do
%span
Runners
=
nav_link
path:
'cohorts#index'
do
=
link_to
admin_cohorts_path
,
title:
'Cohorts'
do
%span
Cohorts
=
nav_link
(
controller:
%w(conversational_development_index system_info background_jobs logs health_check requests_profiles)
)
do
=
link_to
admin_conversational_development_index_path
,
title:
'Monitoring'
do
%span
Monitoring
%ul
.sidebar-sub-level-items
=
nav_link
(
controller: :conversational_development_index
)
do
=
link_to
admin_conversational_development_index_path
,
title:
'ConvDev Index'
do
%span
ConvDev Index
=
nav_link
(
controller: :system_info
)
do
=
link_to
admin_system_info_path
,
title:
'System Info'
do
%span
System Info
=
nav_link
(
controller: :background_jobs
)
do
=
link_to
admin_background_jobs_path
,
title:
'Background Jobs'
do
%span
Background Jobs
=
nav_link
(
controller: :logs
)
do
=
link_to
admin_logs_path
,
title:
'Logs'
do
%span
Logs
=
nav_link
(
controller: :health_check
)
do
=
link_to
admin_health_check_path
,
title:
'Health Check'
do
%span
Health Check
=
nav_link
(
controller: :requests_profiles
)
do
=
link_to
admin_requests_profiles_path
,
title:
'Requests Profiles'
do
%span
Requests Profiles
=
nav_link
(
controller: :broadcast_messages
)
do
=
link_to
admin_broadcast_messages_path
,
title:
'Messages'
do
%span
Messages
=
nav_link
(
controller:
[
:hooks
,
:hook_logs
])
do
=
link_to
admin_hooks_path
,
title:
'Hooks'
do
%span
System Hooks
=
nav_link
(
controller: :applications
)
do
=
link_to
admin_applications_path
,
title:
'Applications'
do
%span
Applications
=
nav_link
(
controller: :abuse_reports
)
do
=
link_to
admin_abuse_reports_path
,
title:
"Abuse Reports"
do
%span
Abuse Reports
%span
.badge.count
=
number_with_delimiter
(
AbuseReport
.
count
(
:all
))
-
if
akismet_enabled?
=
nav_link
(
controller: :spam_logs
)
do
=
link_to
admin_spam_logs_path
,
title:
"Spam Logs"
do
%span
Spam Logs
=
nav_link
(
controller: :deploy_keys
)
do
=
link_to
admin_deploy_keys_path
,
title:
'Deploy Keys'
do
%span
Deploy Keys
=
nav_link
(
controller: :services
)
do
=
link_to
admin_application_settings_services_path
,
title:
'Service Templates'
do
%span
Service Templates
=
nav_link
(
controller: :labels
)
do
=
link_to
admin_labels_path
,
title:
'Labels'
do
%span
Labels
=
nav_link
(
controller: :appearances
)
do
=
link_to
admin_appearances_path
,
title:
'Appearances'
do
%span
Appearance
%li
.divider
=
nav_link
(
controller: :application_settings
)
do
=
link_to
admin_application_settings_path
,
title:
'Settings'
do
%span
Settings
app/views/layouts/nav/_new_group_sidebar.html.haml
0 → 100644
View file @
1c38d328
.nav-sidebar
%ul
.sidebar-top-level-items
=
nav_link
(
path:
[
'groups#show'
,
'groups#activity'
,
'groups#subgroups'
],
html_options:
{
class:
'home'
})
do
=
link_to
group_path
(
@group
),
title:
'Home'
do
%span
Group
%ul
.sidebar-sub-level-items
=
nav_link
(
path:
[
'groups#show'
,
'groups#subgroups'
],
html_options:
{
class:
'home'
})
do
=
link_to
group_path
(
@group
),
title:
'Group Home'
do
%span
Home
=
nav_link
(
path:
'groups#activity'
)
do
=
link_to
activity_group_path
(
@group
),
title:
'Activity'
do
%span
Activity
=
nav_link
(
path:
[
'groups#issues'
,
'labels#index'
,
'milestones#index'
])
do
=
link_to
issues_group_path
(
@group
),
title:
'Issues'
do
%span
Issues
-
issues
=
IssuesFinder
.
new
(
current_user
,
group_id:
@group
.
id
,
state:
'opened'
).
execute
%span
.badge.count
=
number_with_delimiter
(
issues
.
count
)
%ul
.sidebar-sub-level-items
=
nav_link
(
path:
'groups#issues'
,
html_options:
{
class:
'home'
})
do
=
link_to
issues_group_path
(
@group
),
title:
'List'
do
%span
List
=
nav_link
(
path:
'labels#index'
)
do
=
link_to
group_labels_path
(
@group
),
title:
'Labels'
do
%span
Labels
=
nav_link
(
path:
'milestones#index'
)
do
=
link_to
group_milestones_path
(
@group
),
title:
'Milestones'
do
%span
Milestones
=
nav_link
(
path:
'groups#merge_requests'
)
do
=
link_to
merge_requests_group_path
(
@group
),
title:
'Merge Requests'
do
%span
Merge Requests
-
merge_requests
=
MergeRequestsFinder
.
new
(
current_user
,
group_id:
@group
.
id
,
state:
'opened'
,
non_archived:
true
).
execute
%span
.badge.count
=
number_with_delimiter
(
merge_requests
.
count
)
=
nav_link
(
path:
'group_members#index'
)
do
=
link_to
group_group_members_path
(
@group
),
title:
'Members'
do
%span
Members
-
if
current_user
&&
can?
(
current_user
,
:admin_group
,
@group
)
=
nav_link
(
path:
%w[groups#projects groups#edit]
)
do
=
link_to
edit_group_path
(
@group
),
title:
'Settings'
do
%span
Settings
app/views/layouts/nav/_new_profile_sidebar.html.haml
0 → 100644
View file @
1c38d328
.nav-sidebar
%ul
.sidebar-top-level-items
=
nav_link
(
path:
'profiles#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
profile_path
,
title:
'Profile Settings'
do
%span
Profile
=
nav_link
(
controller:
[
:accounts
,
:two_factor_auths
])
do
=
link_to
profile_account_path
,
title:
'Account'
do
%span
Account
-
if
current_application_settings
.
user_oauth_applications?
=
nav_link
(
controller:
'oauth/applications'
)
do
=
link_to
applications_profile_path
,
title:
'Applications'
do
%span
Applications
=
nav_link
(
controller: :chat_names
)
do
=
link_to
profile_chat_names_path
,
title:
'Chat'
do
%span
Chat
=
nav_link
(
controller: :personal_access_tokens
)
do
=
link_to
profile_personal_access_tokens_path
,
title:
'Access Tokens'
do
%span
Access Tokens
=
nav_link
(
controller: :emails
)
do
=
link_to
profile_emails_path
,
title:
'Emails'
do
%span
Emails
-
unless
current_user
.
ldap_user?
=
nav_link
(
controller: :passwords
)
do
=
link_to
edit_profile_password_path
,
title:
'Password'
do
%span
Password
=
nav_link
(
controller: :notifications
)
do
=
link_to
profile_notifications_path
,
title:
'Notifications'
do
%span
Notifications
=
nav_link
(
controller: :keys
)
do
=
link_to
profile_keys_path
,
title:
'SSH Keys'
do
%span
SSH Keys
=
nav_link
(
controller: :preferences
)
do
=
link_to
profile_preferences_path
,
title:
'Preferences'
do
%span
Preferences
=
nav_link
(
path:
'profiles#audit_log'
)
do
=
link_to
audit_log_profile_path
,
title:
'Authentication log'
do
%span
Authentication log
app/views/layouts/nav/_new_project_sidebar.html.haml
0 → 100644
View file @
1c38d328
This diff is collapsed.
Click to expand it.
app/views/layouts/profile.html.haml
View file @
1c38d328
-
page_title
"User Settings"
-
header_title
"User Settings"
,
profile_path
unless
header_title
-
sidebar
"dashboard"
-
nav
"profile"
-
if
show_new_nav?
-
nav
"new_profile_sidebar"
-
@new_sidebar
=
true
-
else
-
nav
"profile"
=
render
template:
"layouts/application"
app/views/layouts/project.html.haml
View file @
1c38d328
-
page_title
@project
.
name_with_namespace
-
page_description
@project
.
description
unless
page_description
-
header_title
project_title
(
@project
)
unless
header_title
-
nav
"project"
-
if
show_new_nav?
-
nav
"new_project_sidebar"
-
@new_sidebar
=
true
-
else
-
nav
"project"
-
content_for
:project_javascripts
do
-
project
=
@target_project
||
@project
...
...
config/application.rb
View file @
1c38d328
...
...
@@ -110,6 +110,7 @@ module Gitlab
config
.
assets
.
precompile
<<
"vendor/assets/fonts/*"
config
.
assets
.
precompile
<<
"test.css"
config
.
assets
.
precompile
<<
"new_nav.css"
config
.
assets
.
precompile
<<
"new_sidebar.css"
# Version of your assets, change this if you want to expire all your assets
config
.
assets
.
version
=
'1.0'
...
...
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