2014-04-15 22:04:43 +00:00
|
|
|
<div id="messages">
|
|
|
|
<h1>Private Message</h1>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 22:04:43 +00:00
|
|
|
<% @messages.each do |message| %>
|
|
|
|
<div class="message">
|
|
|
|
<h3 class="subject <%= message.recipient == @message.recipient ? "sender" : "recipient" %>">
|
|
|
|
<%= icon("chevron-right") if message == @message %>
|
|
|
|
<%= namelink message %>
|
|
|
|
</h3>
|
|
|
|
<div class="content">
|
|
|
|
<%= raw message.text_parsed %>
|
|
|
|
</div>
|
2017-10-13 15:53:48 +00:00
|
|
|
<p>Sent by: <% if message.sender_type == 'System' %>System<% else %><%= namelink message.sender %><% end %> on <%= shortdate message.created_at %></p>
|
2014-04-15 22:04:43 +00:00
|
|
|
<p>
|
|
|
|
<%= link_to "Reply",
|
|
|
|
{ controller: "messages", action: "new", id: message.sender_type, id2: message.sender_id, title: message.title },
|
|
|
|
{ class: 'button tiny'} %>
|
|
|
|
</p>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
2014-04-15 22:04:43 +00:00
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-15 22:04:43 +00:00
|
|
|
<%= link_to 'Back to Messages', messages_path, class: 'button back' %>
|
|
|
|
</div>
|
|
|
|
|