Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_description.html.haml « form_elements « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2c46b2191c67e51bff34ce41d02c8c3959551cf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- project = local_assigns.fetch(:project)
- model = local_assigns.fetch(:model)
- form = local_assigns.fetch(:form)
- 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…')

- supports_quick_actions = true
- preview_url = preview_markdown_path(project, target_type: model.class.name)

.form-group
  = form.label :description, _('Description'), class: 'gl-display-block'
  - if model.is_a?(MergeRequest)
    = hidden_field_tag :merge_request_diff_head_sha, model.diff_head_sha

  - if model.is_a?(Issuable)
    = render 'shared/issuable/form/template_selector', issuable: model

  = render 'shared/form_elements/apply_template_warning', issuable: model

  = render layout: 'shared/md_preview', locals: { url: preview_url, referenced_users: true } do
    = render 'shared/zen', f: form, attr: :description,
                              classes: 'note-textarea rspec-issuable-form-description',
                              placeholder: placeholder,
                              supports_quick_actions: supports_quick_actions,
                              qa_selector: 'issuable_form_description_field'
    = render 'shared/notes/hints', supports_quick_actions: supports_quick_actions
    .clearfix
    .error-alert