diff options
author | Mario de la Ossa <mariodelaossa@gmail.com> | 2018-04-26 13:53:13 -0600 |
---|---|---|
committer | Mario de la Ossa <mariodelaossa@gmail.com> | 2018-05-04 11:33:09 -0600 |
commit | 5c2078838bb9de710f9025513c4b6ec664bba313 (patch) | |
tree | 338656dae97b6c6687e6794b583b0ae431aa5e2f /app/helpers | |
parent | e71351d4f463715fccd80ddbcb4dade67e80f34b (diff) | |
download | gitlab-ce-5c2078838bb9de710f9025513c4b6ec664bba313.tar.gz |
Backport of 4084-epics-username-autocomplete
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 228c8d2e8f9..0069d1468b7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -332,4 +332,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 |