2015-09-17 10:50:20 -04:00
|
|
|
- project = @target_project || @project
|
2016-08-12 21:19:16 -04:00
|
|
|
- noteable_type = @noteable.class if @noteable.present?
|
2016-01-11 05:06:00 -05:00
|
|
|
|
2016-10-16 08:03:44 -04:00
|
|
|
- if project
|
2017-08-01 04:50:59 -04:00
|
|
|
-# haml-lint:disable InlineJavaScript
|
2016-10-16 08:03:44 -04:00
|
|
|
:javascript
|
2017-08-03 16:31:53 -04:00
|
|
|
gl = window.gl || {};
|
2017-05-16 14:42:06 -04:00
|
|
|
gl.GfmAutoComplete = gl.GfmAutoComplete || {};
|
2016-10-12 23:33:09 -04:00
|
|
|
gl.GfmAutoComplete.dataSources = {
|
2017-06-29 13:06:35 -04:00
|
|
|
members: "#{members_project_autocomplete_sources_path(project, type: noteable_type, type_id: params[:id])}",
|
|
|
|
issues: "#{issues_project_autocomplete_sources_path(project)}",
|
|
|
|
mergeRequests: "#{merge_requests_project_autocomplete_sources_path(project)}",
|
2017-11-27 22:51:03 -05:00
|
|
|
labels: "#{labels_project_autocomplete_sources_path(project, type: noteable_type, type_id: params[:id])}",
|
2017-06-29 13:06:35 -04:00
|
|
|
milestones: "#{milestones_project_autocomplete_sources_path(project)}",
|
|
|
|
commands: "#{commands_project_autocomplete_sources_path(project, type: noteable_type, type_id: params[:id])}"
|
2016-10-12 23:33:09 -04:00
|
|
|
};
|