<h2>Reading your messages</h2>
<table>
-<th>from</th>
-<th>message</th>
-<th>date</th>
-<th>reply</th>
-<tr><td><%= (User.find_by_id(@message.from_user_id)).display_name %></td>
-<td><%= @message.body %></td>
-<td><%= @message.sent_on %></td>
-<td><%= link_to 'reply', :controller => 'message', :action => 'new', :user_id => @message.from_user_id %></td>
+ <tr>
+ <th>From</th>
+ <td><%= link_to @message.sender.display_name, :controller => 'user', :action => 'view', :display_name => @message.sender.display_name %></td>
+ </tr>
+ <tr>
+ <th>Subject</th>
+ <td><%= @message.title %></td>
+ </tr>
+ <tr>
+ <th>Date</th>
+ <td><%= @message.sent_on %></td>
+ </tr>
+ <tr>
+ <th>Message</th>
+ <td><%= @message.body %></td>
+ </tr>
</table>
-<%= start_form_tag :controller => 'message', :action => 'mark', :message_id => @message.id %>
-<%= submit_tag 'Mark as read' %>
+<br />
+<table>
+ <tr>
+ <td><%= button_to 'Reply', :controller => 'message', :action => 'new', :user_id => @message.from_user_id %></td>
+ <td><%= button_to 'Mark as unread', :controller => 'message', :action => 'mark', :message_id => @message.id, :mark => 'unread' %></td>
+ <td><%= link_to 'Back to inbox', :controller => 'message', :action => 'inbox', :display_name => @user.display_name %></td>
+ </tr>
+</table>