diaspora/app/views/conversations/_conversation.haml
2015-02-10 19:11:20 +01:00

38 lines
1.6 KiB
Text

-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
.conversation-wrapper{ :"data-conversation-path" => conversation_path(conversation) }
.stream_element.conversation{:data=>{:guid=>conversation.id}, :class => conversation_class(conversation, unread_counts[conversation.id].to_i, selected_conversation_id)}
.media
.img
- other_participants = ordered_participants[conversation.id] - [current_user.person]
- if other_participants.first.present?
= person_image_tag(other_participants.first)
- if other_participants.count > 1
.participants_count
= other_participants.count - 1
.bg
.badge.badge-dafault.message_count
= conversation.messages.size
- unread_count = unread_counts[conversation.id].to_i
- if unread_count > 0
.badge.badge-important.unread_message_count
= unread_count
.subject
%div{ :class => direction_for(conversation.subject) }
= conversation.subject
.timestamp
= timeago(conversation.updated_at)
.last_author
- if authors[conversation.id].present?
= authors[conversation.id].name
.last_message
- if conversation.messages.present?
%em
= conversation.messages.last.text
- if other_participants.count > 1
.participants
- other_participants.drop(1).take(15).each do |participant|
= person_image_tag(participant)