summaryrefslogtreecommitdiff
path: root/app/helpers/branches_helper.rb
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-07-07 17:19:21 +0100
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-07-19 19:30:10 +0100
commit766f9cf2202e7dbab758db4e03bc0e82500943eb (patch)
treeea32b90efaa908a95f8d0b55319c0e62fdda1312 /app/helpers/branches_helper.rb
parent81e57e783e8882de21d27d9191c09404ed7faca3 (diff)
downloadgitlab-ce-766f9cf2202e7dbab758db4e03bc0e82500943eb.tar.gz
implements the basic filter functionality
Diffstat (limited to 'app/helpers/branches_helper.rb')
-rw-r--r--app/helpers/branches_helper.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/branches_helper.rb b/app/helpers/branches_helper.rb
index bfd23aa4e04..3fc85dc6b2b 100644
--- a/app/helpers/branches_helper.rb
+++ b/app/helpers/branches_helper.rb
@@ -9,6 +9,17 @@ module BranchesHelper
end
end
+ def filter_branches_path(options = {})
+ exist_opts = {
+ search: params[:search],
+ sort: params[:sort]
+ }
+
+ options = exist_opts.merge(options)
+
+ namespace_project_branches_path(@project.namespace, @project, @id, options)
+ end
+
def can_push_branch?(project, branch_name)
return false unless project.repository.branch_exists?(branch_name)