Link to slash commands documentation from form hints

This commit is contained in:
Douwe Maan 2016-08-12 20:19:52 -05:00
parent f48e898619
commit 489e8992cf
3 changed files with 11 additions and 4 deletions

View file

@ -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

View file

@ -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
Attach a file

View file

@ -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