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
This commit is contained in:
parent
8be3d1204e
commit
7679a7ea55
3 changed files with 12 additions and 16 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
9
app/views/projects/notes/_hints.html.haml
Normal file
9
app/views/projects/notes/_hints.html.haml
Normal file
|
@ -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
|
Loading…
Reference in a new issue