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
32c53d6d
Commit
32c53d6d
authored
Sep 02, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove dead code - 'collapsed_nav' cookie no longer used since
a1fbdbb6
(see MR !4579)
parent
a510fe11
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
39 deletions
+1
-39
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+0
-13
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+1
-1
spec/helpers/nav_helper_spec.rb
spec/helpers/nav_helper_spec.rb
+0
-25
No files found.
app/helpers/nav_helper.rb
View file @
32c53d6d
module
NavHelper
def
nav_menu_collapsed?
cookies
[
:collapsed_nav
]
==
'true'
end
def
nav_sidebar_class
if
nav_menu_collapsed?
"sidebar-collapsed"
else
"sidebar-expanded"
end
end
def
page_sidebar_class
if
pinned_nav?
"page-sidebar-expanded page-sidebar-pinned"
...
...
@@ -24,7 +12,6 @@ module NavHelper
current_path?
(
'merge_requests#builds'
)
||
current_path?
(
'merge_requests#conflicts'
)
||
current_path?
(
'merge_requests#pipelines'
)
||
current_path?
(
'issues#show'
)
if
cookies
[
:collapsed_gutter
]
==
'true'
"page-gutter right-sidebar-collapsed"
...
...
app/views/layouts/_page.html.haml
View file @
32c53d6d
.page-with-sidebar
{
class:
"#{page_sidebar_class} #{page_gutter_class}"
}
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
.sidebar-wrapper.nicescroll
.sidebar-action-buttons
=
link_to
'#'
,
class:
'nav-header-btn toggle-nav-collapse'
,
title:
"Open/Close"
do
%span
.sr-only
Toggle navigation
...
...
spec/helpers/nav_helper_spec.rb
deleted
100644 → 0
View file @
a510fe11
require
'spec_helper'
# Specs in this file have access to a helper object that includes
# the NavHelper. For example:
#
# describe NavHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
describe
NavHelper
do
describe
'#nav_menu_collapsed?'
do
it
'returns true when the nav is collapsed in the cookie'
do
helper
.
request
.
cookies
[
:collapsed_nav
]
=
'true'
expect
(
helper
.
nav_menu_collapsed?
).
to
eq
true
end
it
'returns false when the nav is not collapsed in the cookie'
do
helper
.
request
.
cookies
[
:collapsed_nav
]
=
'false'
expect
(
helper
.
nav_menu_collapsed?
).
to
eq
false
end
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