debian-mirror-gitlab/app/views/shared/form_elements/_description.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
1.4 KiB
Text
Raw Normal View History

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)
2017-08-17 22:00:37 +05:30
- form = local_assigns.fetch(:form)
2021-04-29 21:17:54 +05:30
- placeholder = model.is_a?(MergeRequest) ? _('Describe the goal of the changes and what reviewers should be aware of.') : _('Write a description or drag your files here…')
2017-08-17 22:00:37 +05:30
2020-07-28 23:09:34 +05:30
- supports_quick_actions = true
- preview_url = preview_markdown_path(project, target_type: model.class.name)
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group.row.detail-page-description
2022-01-26 12:08:38 +05:30
= form.label :description, _('Description'), class: 'col-form-label col-sm-2'
2017-08-17 22:00:37 +05:30
.col-sm-10
2020-07-28 23:09:34 +05:30
- if model.is_a?(MergeRequest)
= hidden_field_tag :merge_request_diff_head_sha, model.diff_head_sha
2017-08-17 22:00:37 +05:30
2020-03-13 15:44:24 +05:30
- if model.is_a?(Issuable)
= render 'shared/issuable/form/template_selector', issuable: model
2021-01-29 00:20:46 +05:30
= render 'shared/form_elements/apply_template_warning', issuable: model
2020-06-23 00:09:42 +05:30
= render layout: 'shared/md_preview', locals: { url: preview_url, referenced_users: true } do
= render 'shared/zen', f: form, attr: :description,
2021-04-29 21:17:54 +05:30
classes: 'note-textarea rspec-issuable-form-description',
2019-12-26 22:10:19 +05:30
placeholder: placeholder,
2021-04-29 21:17:54 +05:30
supports_quick_actions: supports_quick_actions,
qa_selector: 'issuable_form_description'
2017-09-10 17:25:29 +05:30
= render 'shared/notes/hints', supports_quick_actions: supports_quick_actions
2017-08-17 22:00:37 +05:30
.clearfix
.error-alert