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
7a8be270
Commit
7a8be270
authored
Oct 28, 2019
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move search helper EE only method to ee/
parent
d616b8c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+2
-10
ee/app/helpers/ee/search_helper.rb
ee/app/helpers/ee/search_helper.rb
+8
-0
No files found.
app/helpers/search_helper.rb
View file @
7a8be270
# frozen_string_literal: true
# frozen_string_literal: true
module
SearchHelper
module
SearchHelper
SEARCH_PERMITTED_PARAMS
=
[
:search
,
:scope
,
:project_id
,
:group_id
,
:repository_ref
,
:snippets
].
freeze
def
search_autocomplete_opts
(
term
)
def
search_autocomplete_opts
(
term
)
return
unless
current_user
return
unless
current_user
...
@@ -196,16 +198,6 @@ module SearchHelper
...
@@ -196,16 +198,6 @@ module SearchHelper
Sanitize
.
clean
(
str
)
Sanitize
.
clean
(
str
)
end
end
SEARCH_PERMITTED_PARAMS
=
[
:search
,
:scope
,
:project_id
,
:group_id
,
:repository_ref
,
:snippets
]
def
revert_to_basic_search_filter_url
search_params
=
params
.
permit
(
SEARCH_PERMITTED_PARAMS
)
.
merge
(
basic_search:
true
)
search_path
(
search_params
)
end
def
search_filter_link
(
scope
,
label
,
data:
{},
search:
{})
def
search_filter_link
(
scope
,
label
,
data:
{},
search:
{})
search_params
=
params
search_params
=
params
.
merge
(
search
)
.
merge
(
search
)
...
...
ee/app/helpers/ee/search_helper.rb
View file @
7a8be270
...
@@ -60,6 +60,14 @@ module EE
...
@@ -60,6 +60,14 @@ module EE
end
end
end
end
def
revert_to_basic_search_filter_url
search_params
=
params
.
permit
(
::
SearchHelper
::
SEARCH_PERMITTED_PARAMS
)
.
merge
(
basic_search:
true
)
search_path
(
search_params
)
end
private
private
def
search_multiple_assignees?
(
type
)
def
search_multiple_assignees?
(
type
)
...
...
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