Commit 048db426 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Extract filter bar params into separate helper

parent 3d252244
......@@ -178,18 +178,9 @@ module ApplicationHelper
without = options.delete(:without)
add_label = options.delete(:label)
exist_opts = {
state: params[:state],
scope: params[:scope],
milestone_title: params[:milestone_title],
assignee_username: params[:assignee_username],
author_username: params[:author_username],
search: params[:search],
label_name: params[:label_name],
my_reaction_emoji: params[:my_reaction_emoji],
wip: params[:wip],
weight: params[:weight]
}
exist_opts = filter_bar_params.merge(
params.slice(:state, :scope)
)
options = exist_opts.merge(options)
......@@ -206,6 +197,19 @@ module ApplicationHelper
"#{request.path}?#{params.to_param}"
end
def filter_bar_params
params.slice(
:assignee_id,
:assignee_username,
:author_username,
:label_name,
:milestone_title,
:my_reaction_emoji,
:wip,
:search
)
end
def outdated_browser?
browser.ie? && browser.version.to_i < 10
end
......
......@@ -87,6 +87,11 @@ module EE
::Gitlab::CurrentSettings.instance_review_permitted? && current_user&.admin?
end
override :filter_bar_params
def filter_bar_params
super.merge(params.slice(:weight))
end
private
def appearance
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment