summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-07-26 16:55:43 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-07-26 16:55:43 -0400
commit7679a7ea55851265e9d0015a51126bec489fbc6d (patch)
treeb358996d3232abe35d27761c4fd1ae12537cc247
parent8be3d1204eabc2db9a18cda01578282b617ceddf (diff)
downloadgitlab-ce-rs-issue-2010.tar.gz
Render Note field hints consistently for "new" and "edit" formsrs-issue-2010
- 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.haml5
-rw-r--r--app/views/projects/notes/_form.html.haml14
-rw-r--r--app/views/projects/notes/_hints.html.haml9
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