From 5c2078838bb9de710f9025513c4b6ec664bba313 Mon Sep 17 00:00:00 2001 From: Mario de la Ossa Date: Thu, 26 Apr 2018 13:53:13 -0600 Subject: Backport of 4084-epics-username-autocomplete --- app/helpers/application_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/helpers') 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 -- cgit v1.2.1