client_management/app/views/admin/client_managements/_conversation.html.erb

36 lines
1.3 KiB
Plaintext

<%
conv_user = conversation.get_user
is_my_post = conversation.my_post?(current_user.id.to_s)
tagged_users = conversation.tagged_users
%>
<div class="conversation <%= conversation.my_post?(current_user.id.to_s) ? "my" : "" %>">
<% if !is_my_post %>
<div class="avatar">
<img class="avatar-pic" src="<%= (conv_user.member_profile.get_avatar rescue "/assets/thumb_person.png") %>">
<div class="avatar-name"><%= conv_user.name rescue "" %></div>
</div>
<% end %>
<div class="message">
<div class="date">
<div><%= conversation.created_at.strftime("%d %b %Y %H:%M")%></div>
<% if !tagged_users.empty? %>
<div class="tagged-user">
<% tagged_users.each do |user| %>
<a href="" onclick="return false;" title="<%= user.name rescue "" %>">
<img class="tag-avatar-pic" src="<%= (user.member_profile.get_avatar rescue "/assets/thumb_person.png") %>">
</a>
<% end %>
</div>
<% end %>
</div>
<div class="content clearfix">
<%= conversation.content.html_safe %>
</div>
</div>
<% if is_my_post %>
<div class="avatar">
<img class="avatar-pic" src="<%= (conv_user.member_profile.get_avatar rescue "/assets/thumb_person.png") %>">
<div class="avatar-name"><%= conv_user.name rescue "" %></div>
</div>
<% end %>
</div>