gitlabhq/app/views/projects/_recent_messages.html.haml

28 lines
1.1 KiB
Plaintext
Raw Normal View History

2011-10-18 16:44:43 +02:00
- @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
2011-11-09 00:56:10 +01:00
%table
%thead
%th
%div{ :class => "recent_message_parent"}
2011-11-11 17:35:51 +01:00
= link_to(truncate(dashboard_feed_title(parent), :length => 40 ), dashboard_feed_path(@project, parent))
2011-11-09 00:56:10 +01:00
- 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;"
2011-11-09 12:37:01 +01:00
%div.title
2011-11-11 17:35:51 +01:00
= link_to markdown(truncate(note.note, :length => 40)), dashboard_feed_path(@project, parent) + "#note_#{note.id}"
2011-11-09 00:56:10 +01:00
- if note.attachment.url
%br
Attachment:
= link_to note.attachment_identifier, note.attachment.url
2011-11-09 12:37:01 +01:00
%div.author
%strong= note.author_name
%cite.cgray
= time_ago_in_words(note.updated_at)
ago
2011-11-09 00:56:10 +01:00
%br