Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-13 15:11:44 +0300
committerPhil Hughes <me@iamphill.com>2016-05-16 12:29:47 +0300
commit832d7fa3ce3e97113dd783600de57b8d2276d8a1 (patch)
tree71b64d97cf751739051a3bdc23a0fedb5dc5190e /app/helpers/application_helper.rb
parent78a67fc48dab434b43a080e5b15491963656661a (diff)
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/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb17
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