<table class="content" width="100%" style="padding-left:1em;padding-right: 1em;" cellpadding="0" cellspacing="0">
  <tr>
    <td align=left class="page_header">
      <div style="float:left;"><%=_ 'Messages from %s', @user.name %></div>
      <div style="float:right;padding-top:0.1em"><a href="/shout/chat_clear/<%= @user.id%>" onclick="return confirm('<%= _'Really delete whole history?' %>');" ><%=_ "Delete All"%></a></div>
    </td>
  </tr>

  <tr>
    <td style="padding:0.5em 1em 0 1em;">
    <% @last_message = nil
      @chat.all_messages.reverse.each do |@message| %>
      <%= render :partial => "shout/chat_info", :locals => {:user => current_user} if(@last_message.nil? || @last_message.user_id != @message.user_id || @message.created_at - @last_message.created_at > 10.minutes) %>
      <%= render :partial => "shout/chat_message" %>
      <% @last_message = @message %>
      <% end %>
    </td>
  </tr>

</table>

<% if @last_message %>
<script type="text/javascript" language="javascript" charset="utf-8">
// <![CDATA[
Element.scrollTo('<%= @last_message.dom_id %>');
// ]]>
</script>
<% end %>


<table class="content" width="100%" style="padding-left:1em;padding-right: 1em;" cellpadding="0" cellspacing="0">
  <tr>
    <td align=left class="page_header">
      <div style="float:left;"><%=_ 'Messages from %s', @user.name %></div>
      <div style="float:right;padding-top:0.1em"><a href="/shout/chat_clear/<%= @user.id%>" onclick="return confirm('<%= _'Really delete whole history?' %>');" ><%=_ "Delete All"%></a></div>
    </td>
  </tr>

  <tr>
    <td style="padding:0.5em 1em 0 1em;">
    <% @last_message = nil
      @chat.all_messages.find(:all, :include => [:user]).reverse.each do |@message| %>
      <%= render :partial => "shout/chat_info", :locals => {:user => current_user} if(@last_message.nil? || @last_message.user_id != @message.user_id || @message.created_at - @last_message.created_at > 10.minutes) %>
      <%= render :partial => "shout/chat_message" %>
      <% @last_message = @message %>
      <% end %>
    </td>
  </tr>

</table>

<% if @last_message %>
<script type="text/javascript" language="javascript" charset="utf-8">
// <![CDATA[
Element.scrollTo('<%= @last_message.dom_id %>');
// ]]>
</script>
<% end %>


Include user in instant messaging select
Include user in instant messaging select
