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
Léo-Paul Géneau
gitlab-ce
Commits
93c57201
Commit
93c57201
authored
Feb 13, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pinned nav functionality and side_navbar_class
parent
a8bc2722
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
32 deletions
+1
-32
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+0
-14
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+1
-18
No files found.
app/helpers/nav_helper.rb
View file @
93c57201
module
NavHelper
def
page_sidebar_class
if
pinned_nav?
"page-sidebar-expanded page-sidebar-pinned"
end
end
def
page_gutter_class
if
current_path?
(
'merge_requests#show'
)
||
current_path?
(
'merge_requests#diffs'
)
||
...
...
@@ -32,10 +26,6 @@ module NavHelper
class_name
=
''
class_name
<<
" with-horizontal-nav"
if
defined?
(
nav
)
&&
nav
if
pinned_nav?
class_name
<<
" header-sidebar-expanded header-sidebar-pinned"
end
class_name
end
...
...
@@ -46,8 +36,4 @@ module NavHelper
def
nav_control_class
"nav-control"
if
current_user
end
def
pinned_nav?
cookies
[
:pin_nav
]
==
'true'
end
end
app/views/layouts/_page.html.haml
View file @
93c57201
.page-with-sidebar
{
class:
"#{page_sidebar_class} #{page_gutter_class}"
}
.sidebar-wrapper.nicescroll
.sidebar-action-buttons
.nav-header-btn.toggle-nav-collapse
{
title:
"Open/Close"
}
%span
.sr-only
Toggle navigation
=
icon
(
'bars'
)
%div
{
class:
"nav-header-btn pin-nav-btn has-tooltip #{'is-active' if pinned_nav?} js-nav-pin"
,
title:
pinned_nav?
?
"Unpin navigation"
:
"Pin Navigation"
,
data:
{
placement:
'right'
,
container:
'body'
}
}
%span
.sr-only
Toggle navigation pinning
=
icon
(
'fw thumb-tack'
)
-
if
defined?
(
sidebar
)
&&
sidebar
=
render
"layouts/nav/
#{
sidebar
}
"
-
elsif
current_user
=
render
'layouts/nav/dashboard'
-
else
=
render
'layouts/nav/explore'
.page-with-sidebar
{
class:
"#{page_gutter_class}"
}
-
if
defined?
(
nav
)
&&
nav
.layout-nav
.container-fluid
...
...
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