diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-23 18:49:39 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-23 18:49:39 +0200 |
| commit | 47634e392fab457dd0634225961944804bc04efe (patch) | |
| tree | 8d70528e0a9a1d18264e9937c10054d5507462a0 /app/helpers/application_helper.rb | |
| parent | 32eb5de510a7e32d9bb886595aa47d95dc00490f (diff) | |
| download | gitlab-ce-47634e392fab457dd0634225961944804bc04efe.tar.gz | |
Refactor issues and merge requests lists
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/application_helper.rb')
| -rw-r--r-- | app/helpers/application_helper.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 01aa4a60d4c..90cc58f44b7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -275,4 +275,22 @@ module ApplicationHelper def promo_url 'https://' + promo_host end + + def page_filter_path(options={}) + exist_opts = { + state: params[:state], + scope: params[:scope], + label_name: params[:label_name], + milestone_id: params[:milestone_id], + assignee_id: params[:assignee_id], + author_id: params[:author_id], + sort: params[:sort], + } + + options = exist_opts.merge(options) + + path = request.path + path << "?#{options.to_param}" + path + end end |
