diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-05-25 19:44:06 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-05-25 19:44:06 +0000 |
commit | 0cc060bc5fe3ba354979fa0be9e4cc2a2887d5f4 (patch) | |
tree | 5b5a75effa67e233496bd02551705ccd86936d64 /app/helpers | |
parent | 3c2d0cf24c02e02295fd0b6b978b3f191ab4f847 (diff) | |
parent | 5cca2d3bb171c260ad4b07f2a69962d3856c4d99 (diff) | |
download | gitlab-ce-0cc060bc5fe3ba354979fa0be9e4cc2a2887d5f4.tar.gz |
Merge branch 'issue-filter-name-options' into 'master'
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. Fixes #4252
Fixed issue with not being able to filter and sort issues without refreshing the page. Fixes #15269
See merge request !3699
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e6e2546b92f..439b015b3b8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -262,6 +262,8 @@ module ApplicationHelper assignee_id: params[:assignee_id], author_id: params[:author_id], sort: params[:sort], + issue_search: params[:issue_search], + label_name: params[:label_name] } options = exist_opts.merge(options) @@ -272,16 +274,11 @@ module ApplicationHelper end end - 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}" - end - end - end - path + params = options.compact + + params.delete(:label_name) unless add_label + + "#{request.path}?#{params.to_param}" end def outdated_browser? |