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

24 lines
1 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)
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
= 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',
2018-11-08 19:23:39 +05:30
placeholder: "Write a comment or drag your files here…",
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