gitlabhq/app/views/projects/_recent_messages.html.haml
2011-11-11 11:35:51 -05:00

28 lines
1.1 KiB
Plaintext

- @messages.group_by{ |x| [x.noteable_id, x.noteable_type]}.each do |item, notes|
- id, type = item[0], item[1]
- parent = load_note_parent(id, type, @project)
- next unless parent
%table
%thead
%th
%div{ :class => "recent_message_parent"}
= link_to(truncate(dashboard_feed_title(parent), :length => 40 ), dashboard_feed_path(@project, parent))
- notes.sort {|x,y| y.updated_at <=> x.updated_at }.each do |note|
%tr
%td
%div.message
= image_tag gravatar_icon(note.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
%div.title
= link_to markdown(truncate(note.note, :length => 40)), dashboard_feed_path(@project, parent) + "#note_#{note.id}"
- if note.attachment.url
%br
Attachment:
= link_to note.attachment_identifier, note.attachment.url
%div.author
%strong= note.author_name
%cite.cgray
= time_ago_in_words(note.updated_at)
ago
%br