diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-13 13:11:44 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-05-16 10:29:47 +0100 |
commit | 832d7fa3ce3e97113dd783600de57b8d2276d8a1 (patch) | |
tree | 71b64d97cf751739051a3bdc23a0fedb5dc5190e /app/helpers | |
parent | 78a67fc48dab434b43a080e5b15491963656661a (diff) | |
download | gitlab-ce-832d7fa3ce3e97113dd783600de57b8d2276d8a1.tar.gz |
Issuable filtering improvements
This improves the filtering of issues and merge requests by creating a single file that encapsulates all the filtering. Previously this was done with a file for issues and a file for merge requests.
Created the ability for the text search to be done alongside other filterables. Previously because this was outside the filterable form, this wasn't possible and would instead do either filter dropdown or text filter - not both.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3e0074da394..da4dee443a0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -263,6 +263,7 @@ module ApplicationHelper assignee_id: params[:assignee_id], author_id: params[:author_id], sort: params[:sort], + issue_search: params[:issue_search] } options = exist_opts.merge(options) @@ -273,15 +274,21 @@ module ApplicationHelper end end + params = options.compact.to_param + path = request.path - path << "?#{options.to_param}" - if add_label - if params[:label_name].present? and params[:label_name].respond_to?('any?') - params[:label_name].each do |label| - path << "&label_name[]=#{label}" + + if params != nil + path << "?#{options.to_param}" + if add_label + if params[:label_name].present? and params[:label_name].respond_to?('any?') + params[:label_name].each do |label| + path << "&label_name[]=#{label}" + end end end end + path end |