2012-12-02 20:53:50 +01:00
|
|
|
%li{ id: dom_id(note), class: dom_class(note), data: { discussion: note.discussion_id } }
|
|
|
|
.note-header
|
|
|
|
.note-actions
|
|
|
|
= link_to "##{dom_id(note)}", name: dom_id(note) do
|
|
|
|
%i.icon-link
|
|
|
|
Link here
|
|
|
|
|
|
|
|
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
|
2013-01-15 10:12:17 +01:00
|
|
|
= link_to project_note_path(@project, note), title: "Remove comment", method: :delete, confirm: 'Are you sure you want to remove comment?', remote: true, class: "danger js-note-delete" do
|
|
|
|
%i.icon-trash.cred
|
2012-12-02 20:53:50 +01:00
|
|
|
= image_tag gravatar_icon(note.author.email), class: "avatar s32"
|
2013-01-17 21:35:45 +01:00
|
|
|
= link_to_member(@project, note.author, avatar: false)
|
2012-12-02 20:53:50 +01:00
|
|
|
%span.note-last-update
|
|
|
|
= time_ago_in_words(note.updated_at)
|
|
|
|
ago
|
2012-10-10 12:14:48 +02:00
|
|
|
|
2012-10-30 03:27:36 +01:00
|
|
|
- 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
|
2012-10-10 12:09:45 +02:00
|
|
|
|
2011-11-15 09:34:30 +01:00
|
|
|
|
2012-12-02 20:53:50 +01:00
|
|
|
.note-body
|
2012-04-11 21:36:52 +02:00
|
|
|
= preserve do
|
|
|
|
= markdown(note.note)
|
2012-11-22 03:20:41 +01:00
|
|
|
- if note.attachment.url
|
2013-01-15 00:52:25 +01:00
|
|
|
- if note.attachment.image?
|
2013-01-15 10:12:17 +01:00
|
|
|
= image_tag note.attachment.url, class: 'note-image-attach'
|
2013-01-30 15:40:43 +01:00
|
|
|
.attachment.pull-right
|
2012-11-22 03:20:41 +01:00
|
|
|
= link_to note.attachment.url, target: "_blank" do
|
2013-01-31 10:22:06 +01:00
|
|
|
%i.icon-paper-clip
|
2012-11-22 03:20:41 +01:00
|
|
|
= note.attachment_identifier
|
2011-10-08 23:36:38 +02:00
|
|
|
.clear
|