Commit 489e8992 authored by Douwe Maan's avatar Douwe Maan

Link to slash commands documentation from form hints

parent f48e8986
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
classes: 'note-textarea js-note-text', classes: 'note-textarea js-note-text',
placeholder: "Write a comment or drag your files here...", placeholder: "Write a comment or drag your files here...",
supports_slash_commands: true supports_slash_commands: true
= render 'projects/notes/hints' = render 'projects/notes/hints', supports_slash_commands: true
.error-alert .error-alert
.note-form-actions.clearfix .note-form-actions.clearfix
......
- supports_slash_commands = local_assigns.fetch(:supports_slash_commands, false)
.comment-toolbar.clearfix .comment-toolbar.clearfix
.toolbar-text .toolbar-text
Styling with Styling with
= link_to 'Markdown', help_page_path('markdown/markdown'), target: '_blank', tabindex: -1 = 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' } %button.toolbar-button.markdown-selector{ type: 'button', tabindex: '-1' }
= icon('file-image-o', class: 'toolbar-button-icon') = icon('file-image-o', class: 'toolbar-button-icon')
Attach a file Attach a file
\ No newline at end of file
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
classes: 'note-textarea', classes: 'note-textarea',
placeholder: "Write a comment or drag your files here...", placeholder: "Write a comment or drag your files here...",
supports_slash_commands: !issuable.persisted? supports_slash_commands: !issuable.persisted?
= render 'projects/notes/hints' = render 'projects/notes/hints', supports_slash_commands: !issuable.persisted?
.clearfix .clearfix
.error-alert .error-alert
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment