diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-06-02 11:05:38 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-06-02 11:05:38 +0300 |
commit | ea531e1effa51bcec84e50a69901e6eec7c789c1 (patch) | |
tree | d3c1281deea1c9b2e8596cfa79a2e9d5cd4f7a10 /app/views/shared/issuable/form/_description.html.haml | |
parent | 4d141cb30dfcad94db89bdc08f4ea907dc2f8bdf (diff) | |
parent | fc56d2fbaa2a317813c9dd7ba36e584162175fe6 (diff) | |
download | gitlab-ce-ea531e1effa51bcec84e50a69901e6eec7c789c1.tar.gz |
Merge remote-tracking branch 'origin/master' into 25426-group-dashboard-ui
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/shared/issuable/form/_description.html.haml')
-rw-r--r-- | app/views/shared/issuable/form/_description.html.haml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/views/shared/issuable/form/_description.html.haml b/app/views/shared/issuable/form/_description.html.haml index dbace9ce401..7ef0ae96be2 100644 --- a/app/views/shared/issuable/form/_description.html.haml +++ b/app/views/shared/issuable/form/_description.html.haml @@ -1,15 +1,22 @@ +- project = local_assigns.fetch(:project) - issuable = local_assigns.fetch(:issuable) - form = local_assigns.fetch(:form) +- 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) .form-group.detail-page-description = form.label :description, 'Description', class: 'control-label' .col-sm-10 - = render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do + = 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...", - supports_slash_commands: !issuable.persisted? - = render 'projects/notes/hints', supports_slash_commands: !issuable.persisted? + supports_slash_commands: supports_slash_commands + = render 'shared/notes/hints', supports_slash_commands: supports_slash_commands .clearfix .error-alert |