diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-07 17:19:21 +0100 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-19 19:30:10 +0100 |
commit | 766f9cf2202e7dbab758db4e03bc0e82500943eb (patch) | |
tree | ea32b90efaa908a95f8d0b55319c0e62fdda1312 /app/helpers/branches_helper.rb | |
parent | 81e57e783e8882de21d27d9191c09404ed7faca3 (diff) | |
download | gitlab-ce-766f9cf2202e7dbab758db4e03bc0e82500943eb.tar.gz |
implements the basic filter functionality
Diffstat (limited to 'app/helpers/branches_helper.rb')
-rw-r--r-- | app/helpers/branches_helper.rb | 11 |
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) |