_note.html.haml 1.05 KB
Newer Older
1 2
.event-title
  %span.author_name= link_to_author event
3
  %span.event_label commented on
4
  - if event.note_target
5
    - if event.note_commit?
6
      = event.note_target_type
7 8 9
      = link_to event.note_short_commit_id, project_commit_path(event.project, event.note_commit_id), class: "commit_short_id"
    - else
      = link_to [event.project, event.note_target] do
10 11
        %strong
          #{event.note_target_type} ##{truncate event.note_target_id}
12

13
  - elsif event.wall_note?
14
    = link_to 'wall', wall_project_path(event.project)
15 16 17 18 19 20 21 22 23
  - else
    %strong (deleted)
  at
  - if event.project
    = link_to_project event.project
  - else
    = event.project_name

.event-body
24
  %i.icon-comment-alt.event-note-icon
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
25
  %span.event-note
26
    = markdown truncate(event.target.note, length: 70)
27 28 29 30 31 32 33
    - note = event.target
    = link_to note.attachment.url, target: "_blank", class: 'note-file-attach' do
      - if note.attachment.image?
        = image_tag note.attachment.url, class: 'note-image-attach'
      - else
        %i.icon-paper-clip
        = note.attachment_identifier