2017-06-12 15:42:12 -04:00
|
|
|
- supports_autocomplete = local_assigns.fetch(:supports_autocomplete, true)
|
2017-05-31 01:50:53 -04:00
|
|
|
- supports_quick_actions = note_supports_quick_actions?(@note)
|
|
|
|
- if supports_quick_actions
|
2019-04-04 09:08:34 -04:00
|
|
|
- preview_url = preview_markdown_path(@project, target_type: @note.noteable_type, target_id: @note.noteable_id)
|
2016-11-16 06:09:09 -05:00
|
|
|
- else
|
|
|
|
- preview_url = preview_markdown_path(@project)
|
2016-09-15 10:57:06 -04:00
|
|
|
|
2017-05-03 04:48:01 -04:00
|
|
|
= form_for form_resources, url: new_form_url, remote: true, html: { :'data-type' => 'json', multipart: true, id: nil, class: "new-note js-new-note-form js-quick-submit common-note-form", "data-noteable-iid" => @note.noteable.try(:iid), }, authenticity_token: true do |f|
|
2015-11-17 10:08:58 -05:00
|
|
|
= hidden_field_tag :view, diff_view
|
2015-06-05 18:24:05 -04:00
|
|
|
= hidden_field_tag :line_type
|
2016-11-24 09:05:15 -05:00
|
|
|
= hidden_field_tag :merge_request_diff_head_sha, @note.noteable.try(:diff_head_sha)
|
2017-03-09 20:29:11 -05:00
|
|
|
= hidden_field_tag :in_reply_to_discussion_id
|
2017-07-27 10:36:39 -04:00
|
|
|
= hidden_field_tag :note_project_id
|
2017-03-09 20:29:11 -05:00
|
|
|
|
2015-03-02 18:05:23 -05:00
|
|
|
= note_target_fields(@note)
|
2012-12-02 14:47:09 -05:00
|
|
|
= f.hidden_field :noteable_type
|
2017-03-09 20:29:11 -05:00
|
|
|
= f.hidden_field :noteable_id
|
|
|
|
= f.hidden_field :commit_id
|
2016-05-10 18:41:46 -04:00
|
|
|
= f.hidden_field :type
|
2017-03-09 20:29:11 -05:00
|
|
|
|
|
|
|
-# LegacyDiffNote
|
|
|
|
= f.hidden_field :line_code
|
|
|
|
|
|
|
|
-# DiffNote
|
2016-06-20 13:23:46 -04:00
|
|
|
= f.hidden_field :position
|
2012-12-02 14:47:09 -05:00
|
|
|
|
2018-04-12 11:10:40 -04:00
|
|
|
.discussion-form-container
|
|
|
|
= render layout: 'projects/md_preview', locals: { url: preview_url, referenced_users: true } do
|
|
|
|
= render 'projects/zen', f: f,
|
|
|
|
attr: :note,
|
|
|
|
classes: 'note-textarea js-note-text',
|
2019-01-07 15:08:19 -05:00
|
|
|
placeholder: _("Write a comment or drag your files here…"),
|
2018-04-12 11:10:40 -04:00
|
|
|
supports_quick_actions: supports_quick_actions,
|
|
|
|
supports_autocomplete: supports_autocomplete
|
|
|
|
= render 'shared/notes/hints', supports_quick_actions: supports_quick_actions
|
|
|
|
.error-alert
|
|
|
|
|
|
|
|
.note-form-actions.clearfix
|
|
|
|
= render partial: 'shared/notes/comment_button'
|
|
|
|
|
|
|
|
= yield(:note_actions)
|
2019-01-07 08:41:51 -05:00
|
|
|
|
2019-01-07 15:08:19 -05:00
|
|
|
%a.btn.btn-cancel.js-close-discussion-note-form.hide{ role: "button", data: { cancel_text: _("Cancel") } }
|
|
|
|
= _('Cancel')
|