Commit 4fc66ead4f50f76efb80e119bbedc7514602f57f
1 parent
29c71f2f
Exists in
master
and in
4 other branches
Rename 'notes/show' partial to 'notes/note'
Showing
5 changed files
with
24 additions
and
24 deletions
Show diff stats
app/views/notes/_create_common_note.js.haml
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | $('.note-form-holder #preview-link').text('Preview'); | 5 | $('.note-form-holder #preview-link').text('Preview'); |
| 6 | $('.note-form-holder #preview-note').hide(); | 6 | $('.note-form-holder #preview-note').hide(); |
| 7 | $('.note-form-holder').show(); | 7 | $('.note-form-holder').show(); |
| 8 | - NoteList.appendNewNote(#{note.id}, "#{escape_javascript(render "notes/show", note: note)}"); | 8 | + NoteList.appendNewNote(#{note.id}, "#{escape_javascript(render "notes/note", note: note)}"); |
| 9 | 9 | ||
| 10 | - else | 10 | - else |
| 11 | :plain | 11 | :plain |
| @@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
| 1 | +%li{id: dom_id(note), class: "note"} | ||
| 2 | + = image_tag gravatar_icon(note.author.email), class: "avatar s32" | ||
| 3 | + %div.note-author | ||
| 4 | + %strong= note.author_name | ||
| 5 | + = link_to "##{dom_id(note)}", name: dom_id(note) do | ||
| 6 | + %cite.cgray | ||
| 7 | + = time_ago_in_words(note.updated_at) | ||
| 8 | + ago | ||
| 9 | + - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) | ||
| 10 | + = link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do | ||
| 11 | + %i.icon-trash | ||
| 12 | + Remove | ||
| 13 | + | ||
| 14 | + %div.note-title | ||
| 15 | + = preserve do | ||
| 16 | + = markdown(note.note) | ||
| 17 | + - if note.attachment.url | ||
| 18 | + .right | ||
| 19 | + %div.file | ||
| 20 | + = link_to note.attachment_identifier, note.attachment.url, target: "_blank" | ||
| 21 | + .clear |
app/views/notes/_notes_list.html.haml
app/views/notes/_per_line_show.html.haml
app/views/notes/_show.html.haml
| @@ -1,21 +0,0 @@ | @@ -1,21 +0,0 @@ | ||
| 1 | -%li{id: dom_id(note), class: "note"} | ||
| 2 | - = image_tag gravatar_icon(note.author.email), class: "avatar s32" | ||
| 3 | - %div.note-author | ||
| 4 | - %strong= note.author_name | ||
| 5 | - = link_to "##{dom_id(note)}", name: dom_id(note) do | ||
| 6 | - %cite.cgray | ||
| 7 | - = time_ago_in_words(note.updated_at) | ||
| 8 | - ago | ||
| 9 | - - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) | ||
| 10 | - = link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do | ||
| 11 | - %i.icon-trash | ||
| 12 | - Remove | ||
| 13 | - | ||
| 14 | - %div.note-title | ||
| 15 | - = preserve do | ||
| 16 | - = markdown(note.note) | ||
| 17 | - - if note.attachment.url | ||
| 18 | - .right | ||
| 19 | - %div.file | ||
| 20 | - = link_to note.attachment_identifier, note.attachment.url, target: "_blank" | ||
| 21 | - .clear |