diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index b2a316078242935628f3e79dd15cbccc334ed101..759c72b24777415dc24ea02a60d89d5068995408 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -15,7 +15,7 @@ classes: 'note-textarea js-note-text', placeholder: "Write a comment or drag your files here...", supports_slash_commands: true - = render 'projects/notes/hints' + = render 'projects/notes/hints', supports_slash_commands: true .error-alert .note-form-actions.clearfix diff --git a/app/views/projects/notes/_hints.html.haml b/app/views/projects/notes/_hints.html.haml index 25466e7562e04e8bf19d92e1190f6c3fc516e12b..cf6e14648cc6e5531caab32c3bd0f8cecf7c68a3 100644 --- a/app/views/projects/notes/_hints.html.haml +++ b/app/views/projects/notes/_hints.html.haml @@ -1,8 +1,15 @@ +- supports_slash_commands = local_assigns.fetch(:supports_slash_commands, false) .comment-toolbar.clearfix .toolbar-text Styling with = link_to 'Markdown', help_page_path('markdown/markdown'), target: '_blank', tabindex: -1 - is supported + - if supports_slash_commands + and + = link_to 'slash commands', help_page_path('workflow/slash_commands'), target: '_blank', tabindex: -1 + are + - else + is + supported %button.toolbar-button.markdown-selector{ type: 'button', tabindex: '-1' } = icon('file-image-o', class: 'toolbar-button-icon') - Attach a file \ No newline at end of file + Attach a file diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 7e4062c8d4d23a14cdb6d254c81ccc5aa82306db..25b29ccf70d710b0caa86af055660a9ec7ecafd7 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -32,7 +32,7 @@ classes: 'note-textarea', placeholder: "Write a comment or drag your files here...", supports_slash_commands: !issuable.persisted? - = render 'projects/notes/hints' + = render 'projects/notes/hints', supports_slash_commands: !issuable.persisted? .clearfix .error-alert