summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-08-12 20:19:52 -0500
committerDouwe Maan <douwe@selenight.nl>2016-08-12 20:19:52 -0500
commit489e8992cfb4076fb4bf7f1c68bd945d30a26bbf (patch)
tree608dc4074f5d3997dd13d9d9731a98354b393035 /app/views
parentf48e898619a104aa379af0a037fb96d09ee8675f (diff)
downloadgitlab-ce-489e8992cfb4076fb4bf7f1c68bd945d30a26bbf.tar.gz
Link to slash commands documentation from form hints
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/notes/_form.html.haml2
-rw-r--r--app/views/projects/notes/_hints.html.haml11
-rw-r--r--app/views/shared/issuable/_form.html.haml2
3 files changed, 11 insertions, 4 deletions
diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml
index b2a31607824..759c72b2477 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 25466e7562e..cf6e14648cc 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 7e4062c8d4d..25b29ccf70d 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