BigW Consortium Gitlab

_description.html.haml 981 Bytes
Newer Older
1
- project = local_assigns.fetch(:project)
2 3
- issuable = local_assigns.fetch(:issuable)
- form = local_assigns.fetch(:form)
4 5 6 7 8 9
- supports_slash_commands = issuable.new_record?

- if supports_slash_commands
  - preview_url = preview_markdown_path(project, slash_commands_target_type: issuable.class.name)
- else
  - preview_url = preview_markdown_path(project)
10 11 12 13 14

.form-group.detail-page-description
  = form.label :description, 'Description', class: 'control-label'
  .col-sm-10

15
    = render layout: 'projects/md_preview', locals: { url: preview_url, referenced_users: true } do
16 17 18
      = render 'projects/zen', f: form, attr: :description,
                               classes: 'note-textarea',
                               placeholder: "Write a comment or drag your files here...",
19
                               supports_slash_commands: supports_slash_commands
20
      = render 'shared/notes/hints', supports_slash_commands: supports_slash_commands
21 22
      .clearfix
      .error-alert