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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
703e424d
Commit
703e424d
authored
Nov 13, 2019
by
Zack Cuddy
Committed by
Michael Kozono
Nov 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused project_tab_class
Defined, but no longer used
parent
28b0b4dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
48 deletions
+0
-48
app/helpers/tab_helper.rb
app/helpers/tab_helper.rb
+0
-18
ee/app/helpers/ee/tab_helper.rb
ee/app/helpers/ee/tab_helper.rb
+0
-9
ee/spec/helpers/ee/tab_helper_spec.rb
ee/spec/helpers/ee/tab_helper_spec.rb
+0
-21
No files found.
app/helpers/tab_helper.rb
View file @
703e424d
...
@@ -108,16 +108,6 @@ module TabHelper
...
@@ -108,16 +108,6 @@ module TabHelper
current_controller?
(
c
)
&&
current_action?
(
a
)
current_controller?
(
c
)
&&
current_action?
(
a
)
end
end
def
project_tab_class
if
controller
.
controller_path
.
start_with?
(
'projects'
)
return
'active'
end
if
%w(services hooks deploy_keys protected_branches)
.
include?
controller
.
controller_name
"active"
end
end
def
branches_tab_class
def
branches_tab_class
if
current_controller?
(
:protected_branches
)
||
if
current_controller?
(
:protected_branches
)
||
current_controller?
(
:branches
)
||
current_controller?
(
:branches
)
||
...
@@ -125,14 +115,6 @@ module TabHelper
...
@@ -125,14 +115,6 @@ module TabHelper
'active'
'active'
end
end
end
end
def
profile_tab_class
if
controller
.
controller_path
.
start_with?
(
'profiles'
)
return
'active'
end
'active'
if
current_controller?
(
'oauth/applications'
)
end
end
end
TabHelper
.
prepend_if_ee
(
'EE::TabHelper'
)
TabHelper
.
prepend_if_ee
(
'EE::TabHelper'
)
ee/app/helpers/ee/tab_helper.rb
View file @
703e424d
...
@@ -4,15 +4,6 @@ module EE
...
@@ -4,15 +4,6 @@ module EE
module
TabHelper
module
TabHelper
extend
::
Gitlab
::
Utils
::
Override
extend
::
Gitlab
::
Utils
::
Override
override
:project_tab_class
def
project_tab_class
if
controller
.
controller_name
==
'push_rules'
'active'
else
super
end
end
def
analytics_controllers
def
analytics_controllers
[
'analytics/productivity_analytics'
,
'analytics/cycle_analytics'
]
[
'analytics/productivity_analytics'
,
'analytics/cycle_analytics'
]
end
end
...
...
ee/spec/helpers/ee/tab_helper_spec.rb
deleted
100644 → 0
View file @
28b0b4dd
# frozen_string_literal: true
require
'spec_helper'
describe
TabHelper
do
describe
'#project_tab_class'
do
it
'returns "active" for the push rules controller'
do
controller
=
instance_double
(
'controller'
,
controller_name:
'push_rules'
,
controller_path:
'/push_rules/foo'
)
allow
(
helper
)
.
to
receive
(
:controller
)
.
and_return
(
controller
)
expect
(
helper
.
project_tab_class
).
to
eq
(
'active'
)
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