summaryrefslogtreecommitdiff
path: root/app/helpers/explore_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-10 15:59:14 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-10 15:59:14 -0700
commit83f7e98d9a672158d5c754307ab471fd50c5b2a3 (patch)
treea1e87bec3ef83aa3ae987a3452be71bccefdc4ed /app/helpers/explore_helper.rb
parent8527e8d5996bb5543cb5a13e857b864b466a31f2 (diff)
downloadgitlab-ce-83f7e98d9a672158d5c754307ab471fd50c5b2a3.tar.gz
Add project filter by visibility and tag to explore page
Diffstat (limited to 'app/helpers/explore_helper.rb')
-rw-r--r--app/helpers/explore_helper.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/explore_helper.rb b/app/helpers/explore_helper.rb
new file mode 100644
index 00000000000..7616fe6bad8
--- /dev/null
+++ b/app/helpers/explore_helper.rb
@@ -0,0 +1,17 @@
+module ExploreHelper
+ def explore_projects_filter_path(options={})
+ exist_opts = {
+ sort: params[:sort],
+ scope: params[:scope],
+ group: params[:group],
+ tag: params[:tag],
+ visibility_level: params[:visibility_level],
+ }
+
+ options = exist_opts.merge(options)
+
+ path = request.path
+ path << "?#{options.to_param}"
+ path
+ end
+end