diff options
author | Darby <darbsies@gmail.com> | 2015-07-09 23:38:33 +0300 |
---|---|---|
committer | Darby <darbsies@gmail.com> | 2015-07-09 23:38:33 +0300 |
commit | 360ee25ddbaff3d22fe2408e1573b0d3a29e3dbe (patch) | |
tree | cce04c8683a7d4a18bb16c390c8978abf23f9812 | |
parent | c611b6f6238ce6ce164f173df551552ffe83f596 (diff) |
Fixed the issues
-rw-r--r-- | app/helpers/gitlab_markdown_helper.rb | 2 | ||||
-rw-r--r-- | app/views/projects/notes/_edit_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/notes/_form.html.haml | 3 | ||||
-rw-r--r-- | spec/helpers/gitlab_markdown_helper_spec.rb | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index f4c7a6494a9..eb3f72a307d 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -118,7 +118,7 @@ module GitlabMarkdownHelper # Returns a random markdown tip for use as a textarea placeholder def random_markdown_tip - "#{MARKDOWN_TIPS.sample}" + MARKDOWN_TIPS.sample end private diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml index 9c4c5dc0c7f..7472b33bb53 100644 --- a/app/views/projects/notes/_edit_form.html.haml +++ b/app/views/projects/notes/_edit_form.html.haml @@ -5,7 +5,7 @@ = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field' .comment-hints.clearfix - .pull-left #{link_to 'Markdown tip:', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }} + .pull-left #{link_to 'Markdown ', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }} .pull-right #{link_to 'Attach a file', '#', class: 'markdown-selector', tabindex: -1 } .note-form-actions diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index 4c662336428..64f98741d45 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -13,7 +13,8 @@ .comment-hints.clearfix .pull-left - = link_to "Markdown tip:", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 } + = link_to "Markdown ", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 } + tip: = random_markdown_tip .pull-right = link_to '#', class: 'markdown-selector', tabindex: -1 do diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb index 30a15b974bd..a42ccb9b501 100644 --- a/spec/helpers/gitlab_markdown_helper_spec.rb +++ b/spec/helpers/gitlab_markdown_helper_spec.rb @@ -137,6 +137,7 @@ describe GitlabMarkdownHelper do describe 'random_markdown_tip' do it 'returns a random Markdown tip' do stub_const("#{described_class}::MARKDOWN_TIPS", ['Random tip']) + expect(random_markdown_tip).to eq 'Random tip' end end end |