gitlab-org--gitlab-foss/app/views/layouts/_init_auto_complete.html.haml

17 lines
821 B
Text
Raw Normal View History

- project = @target_project || @project
2016-08-12 21:19:16 -04:00
- noteable_type = @noteable.class if @noteable.present?
- if project
2017-08-01 04:50:59 -04:00
-# haml-lint:disable InlineJavaScript
:javascript
gl = window.gl || {};
gl.GfmAutoComplete = gl.GfmAutoComplete || {};
gl.GfmAutoComplete.dataSources = {
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)}",
labels: "#{labels_project_autocomplete_sources_path(project)}",
milestones: "#{milestones_project_autocomplete_sources_path(project)}",
commands: "#{commands_project_autocomplete_sources_path(project, type: noteable_type, type_id: params[:id])}"
};