_note.html.haml 767 Bytes
Newer Older
1
%li{id: dom_id(note), class: "note"}
2
  = image_tag gravatar_icon(note.author.email), class: "avatar s32"
gitlabhq's avatar
gitlabhq committed
3 4
  %div.note-author
    %strong= note.author_name
5 6 7 8
    = link_to "##{dom_id(note)}", name: dom_id(note) do
      %cite.cgray
        = time_ago_in_words(note.updated_at)
        ago
gitlabhq's avatar
gitlabhq committed
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 
randx's avatar
randx committed
11 12
        %i.icon-trash
        Remove
13

gitlabhq's avatar
gitlabhq committed
14
  %div.note-title
15 16
    = preserve do
      = markdown(note.note)
gitlabhq's avatar
gitlabhq committed
17
    - if note.attachment.url
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
18
      .right
19
        %div.file
20
          = link_to note.attachment_identifier, note.attachment.url, target: "_blank"
gitlabhq's avatar
gitlabhq committed
21
  .clear