2012-10-10 12:09:45 +02:00
|
|
|
%li{id: dom_id(note), class: "note"}
|
2012-08-18 22:53:58 +02:00
|
|
|
= image_tag gravatar_icon(note.author.email), class: "avatar s32"
|
2011-11-04 14:37:38 +01:00
|
|
|
%div.note-author
|
|
|
|
%strong= note.author_name
|
2012-06-15 17:53:00 +02:00
|
|
|
= link_to "##{dom_id(note)}", name: dom_id(note) do
|
|
|
|
%cite.cgray
|
|
|
|
= time_ago_in_words(note.updated_at)
|
|
|
|
ago
|
2012-10-10 12:09:45 +02:00
|
|
|
|
2012-10-10 12:14:48 +02:00
|
|
|
- unless note_for_main_target?(note)
|
2012-10-13 16:23:12 +02:00
|
|
|
- if note.for_commit?
|
2012-10-10 12:14:48 +02:00
|
|
|
%span.cgray
|
2012-10-13 16:23:12 +02:00
|
|
|
on #{link_to note.noteable.short_id, project_commit_path(@project, note.noteable)}
|
|
|
|
= link_to_commit_diff_line_note(note) if note.for_diff_line?
|
2012-10-10 12:14:48 +02:00
|
|
|
|
2012-10-10 12:09:45 +02:00
|
|
|
-# only show vote if it's a note for the main target
|
|
|
|
- if note_for_main_target?(note)
|
|
|
|
- if note.upvote?
|
|
|
|
%span.vote.upvote.label.label-success
|
|
|
|
%i.icon-thumbs-up
|
|
|
|
\+1
|
|
|
|
- if note.downvote?
|
|
|
|
%span.vote.downvote.label.label-error
|
|
|
|
%i.icon-thumbs-down
|
|
|
|
\-1
|
|
|
|
|
|
|
|
-# remove button
|
2011-11-04 14:37:38 +01:00
|
|
|
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
|
2012-09-18 08:17:55 +02:00
|
|
|
= link_to [@project, note], confirm: 'Are you sure?', method: :delete, remote: true, class: "cred delete-note btn very_small" do
|
2012-07-29 00:34:51 +02:00
|
|
|
%i.icon-trash
|
|
|
|
Remove
|
2011-11-15 09:34:30 +01:00
|
|
|
|
2011-11-04 14:37:38 +01:00
|
|
|
%div.note-title
|
2012-04-11 21:36:52 +02:00
|
|
|
= preserve do
|
|
|
|
= markdown(note.note)
|
2011-10-08 23:36:38 +02:00
|
|
|
- if note.attachment.url
|
2013-01-04 21:13:32 +01:00
|
|
|
- if note.attachment.image?
|
|
|
|
= image_tag note.attachment.url, class: 'thumbnail span4'
|
2011-11-06 14:52:23 +01:00
|
|
|
.right
|
2012-03-24 18:36:14 +01:00
|
|
|
%div.file
|
2012-08-11 00:07:50 +02:00
|
|
|
= link_to note.attachment_identifier, note.attachment.url, target: "_blank"
|
2011-10-08 23:36:38 +02:00
|
|
|
.clear
|