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

24 lines
963 B
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
- preview_url = preview_markdown_path(project, quick_actions_target_type: model.class.name)
2017-08-17 22:00:37 +05:30
- else
- preview_url = preview_markdown_path(project)
.form-group.detail-page-description
= form.label :description, 'Description', class: 'control-label'
.col-sm-10
= render layout: 'projects/md_preview', locals: { url: preview_url, referenced_users: true } do
= render 'projects/zen', f: form, attr: :description,
classes: 'note-textarea',
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