ensl.org/app/views/messages/show.html.erb
Luke Barratt 4f26f5a559 Further improvements to user pages
Added styling to private messages
Updated puma config and deployment scripts
2014-04-15 23:04:43 +01:00

24 lines
No EOL
803 B
Text

<div id="messages">
<h1>Private Message</h1>
<% @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>
<p>Sent by: <%= namelink message.sender %> on <%= shortdate message.created_at %></p>
<p>
<%= link_to "Reply",
{ controller: "messages", action: "new", id: message.sender_type, id2: message.sender_id, title: message.title },
{ class: 'button tiny'} %>
</p>
</div>
<% end %>
<%= link_to 'Back to Messages', messages_path, class: 'button back' %>
</div>