Received Messages (<%= cuser.new_messages.count %> unread / <%= cuser.received_messages.count %> total)

<% cuser.received_messages.reverse_each do |message| %>
<% if cuser.new_messages.include?(message) %>

<% end %> <%= namelink message %> <%= sanitize message.text[0, 20] %> <% if cuser.new_messages.include?(message) %>

<% end %>
(<%= namelink message.sender %> on <%= longdate message.created_at %>)

<% end %>

Sent Messages (<%= cuser.sent_messages.count %> total)

<% cuser.sent_messages.reverse_each do |message| %>
<%= namelink message %> <%= sanitize message.text[0, 20] %>
(<%= namelink message.recipient %> on <%= longdate message.created_at %>)

<% end %>