BigW Consortium Gitlab

_note.html.haml 1.29 KB
Newer Older
1 2 3 4 5 6 7 8
%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)
9 10
        = 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
11
    = image_tag gravatar_icon(note.author.email), class: "avatar s32"
12
    = link_to_member(@project, note.author, avatar: false)
13 14 15
    %span.note-last-update
      = time_ago_in_words(note.updated_at)
      ago
16

Riyad Preukschas committed
17 18 19 20 21 22 23 24
    - 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
25

26

27
  .note-body
28 29
    = preserve do
      = markdown(note.note)
30
  - if note.attachment.url
31
    - if note.attachment.image?
32
      = image_tag note.attachment.url, class: 'note-image-attach'
33
    .attachment.pull-right
34
      = link_to note.attachment.secure_url, target: "_blank" do
35
        %i.icon-paper-clip
36
        = note.attachment_identifier
gitlabhq committed
37
  .clear