diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-07 11:26:44 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-07 11:26:44 +0300 |
commit | 67c9f822dd60ef55323082cd0b17ccd6108a24c6 (patch) | |
tree | 716d434e45d4b43161e889d99c37b31415e22049 /app/helpers | |
parent | 6a052a14e938ef073977afd808dd12a801f44369 (diff) | |
parent | cfa92112d189dce1028bce7145a5cbe609c389a8 (diff) |
Merge branch '4084-epics-username-autocomplete-ce' into 'master'
Backport CE changes from "autocomplete usernames in Epic comments/description"
See merge request gitlab-org/gitlab-ce!18605
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6aa307b4db4..aa4569500b8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -258,4 +258,17 @@ module ApplicationHelper _('You are on a read-only GitLab instance.') end + + def autocomplete_data_sources(object, noteable_type) + return {} unless object && noteable_type + + { + members: members_project_autocomplete_sources_path(object, type: noteable_type, type_id: params[:id]), + issues: issues_project_autocomplete_sources_path(object), + merge_requests: merge_requests_project_autocomplete_sources_path(object), + labels: labels_project_autocomplete_sources_path(object, type: noteable_type, type_id: params[:id]), + milestones: milestones_project_autocomplete_sources_path(object), + commands: commands_project_autocomplete_sources_path(object, type: noteable_type, type_id: params[:id]) + } + end end |