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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-27 10:57:50 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-27 10:57:50 +0400
commitede08dbdd787fdd3a30b62dc0e7e2c796bb6d43a (patch)
tree047eef633ed97c3bf8fa7066898c1d42e3bd926f /app/helpers/search_helper.rb
parent9e5bc432630d04867cea9f38383d1a4fc49b62cd (diff)
Implement search page with filtering of results and pagination
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index ecd8d3994d0..8c805f79c36 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -91,4 +91,19 @@ module SearchHelper
def search_result_sanitize(str)
Sanitize.clean(str)
end
+
+ def search_filter_path(options={})
+ exist_opts = {
+ search: params[:search],
+ project_id: params[:project_id],
+ group_id: params[:group_id],
+ scope: params[:scope]
+ }
+
+ options = exist_opts.merge(options)
+
+ path = request.path
+ path << "?#{options.to_param}"
+ path
+ end
end