BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
32 deletions
+1
-32
nav_helper.rb
app/helpers/nav_helper.rb
+0
-14
_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