2017-08-17 22:00:37 +05:30
- project = local_assigns.fetch(:project)
2017-09-10 17:25:29 +05:30
- model = local_assigns.fetch(:model)
2020-03-09 13:42:32 +05:30
2017-08-17 22:00:37 +05:30
- form = local_assigns.fetch(:form)
2019-12-26 22:10:19 +05:30
- placeholder = model.is_a?(MergeRequest) ? _('Describe the goal of the changes and what reviewers should be aware of.') : _('Write a comment or drag your files here…')
2017-09-10 17:25:29 +05:30
- supports_quick_actions = model.new_record?
2017-08-17 22:00:37 +05:30
2017-09-10 17:25:29 +05:30
- if supports_quick_actions
2019-07-07 11:18:12 +05:30
- preview_url = preview_markdown_path(project, target_type: model.class.name)
2017-08-17 22:00:37 +05:30
- else
- preview_url = preview_markdown_path(project)
2018-11-08 19:23:39 +05:30
.form-group.row.detail-page-description
= form.label :description, 'Description', class: 'col-form-label col-sm-2'
2017-08-17 22:00:37 +05:30
.col-sm-10
2020-03-09 13:42:32 +05:30
- if model.is_a?(Issuable)
= render 'shared/issuable/form/template_selector', issuable: model
2017-08-17 22:00:37 +05:30
= render layout: 'projects/md_preview', locals: { url: preview_url, referenced_users: true } do
= render 'projects/zen', f: form, attr: :description,
2019-10-12 21:52:04 +05:30
classes: 'note-textarea qa-issuable-form-description rspec-issuable-form-description',
2019-12-26 22:10:19 +05:30
placeholder: placeholder,
2017-09-10 17:25:29 +05:30
supports_quick_actions: supports_quick_actions
= render 'shared/notes/hints', supports_quick_actions: supports_quick_actions
2017-08-17 22:00:37 +05:30
.clearfix
.error-alert