Rename 'notes/show' partial to 'notes/note'
This commit is contained in:
parent
29c71f2fb9
commit
4fc66ead4f
4 changed files with 3 additions and 3 deletions
21
app/views/notes/_note.html.haml
Normal file
21
app/views/notes/_note.html.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
%li{id: dom_id(note), class: "note"}
|
||||
= image_tag gravatar_icon(note.author.email), class: "avatar s32"
|
||||
%div.note-author
|
||||
%strong= note.author_name
|
||||
= link_to "##{dom_id(note)}", name: dom_id(note) do
|
||||
%cite.cgray
|
||||
= time_ago_in_words(note.updated_at)
|
||||
ago
|
||||
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
|
||||
= link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do
|
||||
%i.icon-trash
|
||||
Remove
|
||||
|
||||
%div.note-title
|
||||
= preserve do
|
||||
= markdown(note.note)
|
||||
- if note.attachment.url
|
||||
.right
|
||||
%div.file
|
||||
= link_to note.attachment_identifier, note.attachment.url, target: "_blank"
|
||||
.clear
|
Loading…
Add table
Add a link
Reference in a new issue