diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-07-26 16:55:43 -0400 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-07-28 14:42:14 +0300 |
commit | abefd20fa1da9df2ef8f782964456aadb15a1c9f (patch) | |
tree | 7a2d2d5c22dc770b541f6f5e291c931b00977a11 | |
parent | 0fc5c80207a1ebcfbdae1d0d16b9aeb984bac271 (diff) | |
download | gitlab-ce-abefd20fa1da9df2ef8f782964456aadb15a1c9f.tar.gz |
Render Note field hints consistently for "new" and "edit" forms
- The "Edit" form didn't have Markdown hints.
- The "New" form had a paperclip icon for attachments, the "edit" form
didn't.
Closes #2010
Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2525
-rw-r--r-- | app/views/projects/notes/_edit_form.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/notes/_form.html.haml | 14 | ||||
-rw-r--r-- | app/views/projects/notes/_hints.html.haml | 9 |
3 files changed, 12 insertions, 16 deletions
diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml index 7472b33bb53..8f7d2e84c70 100644 --- a/app/views/projects/notes/_edit_form.html.haml +++ b/app/views/projects/notes/_edit_form.html.haml @@ -3,10 +3,7 @@ = note_target_fields(note) = render layout: 'projects/md_preview', locals: { preview_class: 'note-text' } do = 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 ', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }} - .pull-right #{link_to 'Attach a file', '#', class: 'markdown-selector', tabindex: -1 } + = render 'projects/notes/hints' .note-form-actions .buttons diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index 64f98741d45..3be8f44b282 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -8,18 +8,8 @@ = f.hidden_field :noteable_type = render layout: 'projects/md_preview', locals: { preview_class: "note-text", referenced_users: true } do - = render 'projects/zen', f: f, attr: :note, - classes: 'note_text js-note-text' - - .comment-hints.clearfix - .pull-left - = 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 - Attach a file - = icon('paperclip') + = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text' + = render 'projects/notes/hints' .error-alert .note-form-actions diff --git a/app/views/projects/notes/_hints.html.haml b/app/views/projects/notes/_hints.html.haml new file mode 100644 index 00000000000..6e7929bdab0 --- /dev/null +++ b/app/views/projects/notes/_hints.html.haml @@ -0,0 +1,9 @@ +.comment-hints.clearfix + .pull-left + = 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 + = icon('paperclip') + Attach a file |