diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-24 11:31:36 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-24 11:31:36 +0100 |
commit | d334f8d4fa434f92cac99e5cecba62f8822acae9 (patch) | |
tree | 5e9e8dab3a9df0b297584311c093e714bc81049b /app/helpers/labels_helper.rb | |
parent | 4477dc249e563e60e126d4f5ad2692297a9584c1 (diff) | |
download | gitlab-ce-d334f8d4fa434f92cac99e5cecba62f8822acae9.tar.gz |
Fixed URL on label button when filteringlabel-filter-path-fix
Closes #19005
Diffstat (limited to 'app/helpers/labels_helper.rb')
-rw-r--r-- | app/helpers/labels_helper.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index 5074e645769..5e9f5837101 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -34,10 +34,7 @@ module LabelsHelper # Returns a String def link_to_label(label, project: nil, type: :issue, tooltip: true, css_class: nil, &block) project ||= @project || label.project - link = send("namespace_project_#{type.to_s.pluralize}_path", - project.namespace, - project, - label_name: [label.name]) + link = label_filter_path(project, label, type: type) if block_given? link_to link, class: css_class, &block @@ -46,6 +43,13 @@ module LabelsHelper end end + def label_filter_path(project, label, type: issue) + send("namespace_project_#{type.to_s.pluralize}_path", + project.namespace, + project, + label_name: [label.name]) + end + def project_label_names @project.labels.pluck(:title) end |