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
|
|
|
|
:javascript
|
2016-10-12 23:33:09 -04:00
|
|
|
gl.GfmAutoComplete.dataSources = {
|
|
|
|
members: "#{members_namespace_project_autocomplete_sources_path(project.namespace, project, type: noteable_type, type_id: params[:id])}",
|
|
|
|
issues: "#{issues_namespace_project_autocomplete_sources_path(project.namespace, project)}",
|
|
|
|
mergeRequests: "#{merge_requests_namespace_project_autocomplete_sources_path(project.namespace, project)}",
|
|
|
|
labels: "#{labels_namespace_project_autocomplete_sources_path(project.namespace, project)}",
|
|
|
|
milestones: "#{milestones_namespace_project_autocomplete_sources_path(project.namespace, project)}",
|
|
|
|
commands: "#{commands_namespace_project_autocomplete_sources_path(project.namespace, project, type: noteable_type, type_id: params[:id])}"
|
|
|
|
};
|
|
|
|
|
|
|
|
gl.GfmAutoComplete.setup();
|