Commit c02e3f2104d9dbb1bca01935fe7c0dfeacf53baf
1 parent
3c02c93f
Exists in
master
and in
4 other branches
Rename 'notes/form' partial to 'notes/common_form'
Showing
3 changed files
with
40 additions
and
40 deletions
Show diff stats
... | ... | @@ -0,0 +1,39 @@ |
1 | +.note-form-holder | |
2 | + = form_for [@project, @note], remote: "true", multipart: true do |f| | |
3 | + %h3.page_title Leave a comment | |
4 | + -if @note.errors.any? | |
5 | + .alert-message.block-message.error | |
6 | + - @note.errors.full_messages.each do |msg| | |
7 | + %div= msg | |
8 | + | |
9 | + = f.hidden_field :noteable_id | |
10 | + = f.hidden_field :noteable_type | |
11 | + = f.text_area :note, size: 255, class: 'note-text' | |
12 | + #preview-note.preview_note.hide | |
13 | + .hint | |
14 | + .right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. | |
15 | + .clearfix | |
16 | + | |
17 | + .row.note_advanced_opts.hide | |
18 | + .span3 | |
19 | + = f.submit 'Add Comment', class: "btn success submit_note grouped", id: "submit_note" | |
20 | + = link_to 'Preview', preview_project_notes_path(@project), class: 'btn grouped', id: 'preview-link' | |
21 | + .span4.notify_opts | |
22 | + %h6.left Notify via email: | |
23 | + = label_tag :notify do | |
24 | + = check_box_tag :notify, 1, @note.noteable_type != "Commit" | |
25 | + %span Project team | |
26 | + | |
27 | + - if @note.notify_only_author?(current_user) | |
28 | + = label_tag :notify_author do | |
29 | + = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" | |
30 | + %span Commit author | |
31 | + .span5.attachments | |
32 | + %h6.left Attachment: | |
33 | + %span.file_name File name... | |
34 | + | |
35 | + .input.input_file | |
36 | + %a.file_upload.btn.small Upload File | |
37 | + = f.file_field :attachment, class: "input-file" | |
38 | + %span.hint Any file less than 10 MB | |
39 | + | ... | ... |
app/views/notes/_form.html.haml
... | ... | @@ -1,39 +0,0 @@ |
1 | -.note-form-holder | |
2 | - = form_for [@project, @note], remote: "true", multipart: true do |f| | |
3 | - %h3.page_title Leave a comment | |
4 | - -if @note.errors.any? | |
5 | - .alert-message.block-message.error | |
6 | - - @note.errors.full_messages.each do |msg| | |
7 | - %div= msg | |
8 | - | |
9 | - = f.hidden_field :noteable_id | |
10 | - = f.hidden_field :noteable_type | |
11 | - = f.text_area :note, size: 255, class: 'note-text' | |
12 | - #preview-note.preview_note.hide | |
13 | - .hint | |
14 | - .right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. | |
15 | - .clearfix | |
16 | - | |
17 | - .row.note_advanced_opts.hide | |
18 | - .span3 | |
19 | - = f.submit 'Add Comment', class: "btn success submit_note grouped", id: "submit_note" | |
20 | - = link_to 'Preview', preview_project_notes_path(@project), class: 'btn grouped', id: 'preview-link' | |
21 | - .span4.notify_opts | |
22 | - %h6.left Notify via email: | |
23 | - = label_tag :notify do | |
24 | - = check_box_tag :notify, 1, @note.noteable_type != "Commit" | |
25 | - %span Project team | |
26 | - | |
27 | - - if @note.notify_only_author?(current_user) | |
28 | - = label_tag :notify_author do | |
29 | - = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" | |
30 | - %span Commit author | |
31 | - .span5.attachments | |
32 | - %h6.left Attachment: | |
33 | - %span.file_name File name... | |
34 | - | |
35 | - .input.input_file | |
36 | - %a.file_upload.btn.small Upload File | |
37 | - = f.file_field :attachment, class: "input-file" | |
38 | - %span.hint Any file less than 10 MB | |
39 | - |