<% if @message.author_user_id == @user.id %> <%= t('.backtosentmessages') %> <% else %> <%= t('.backtomessages') %> <% end %>
<%= @message.subject %>
<%= t('.sentfrom') %> <% if @message.author %> <%= @message.author.username %> <% if @message.author.is_admin? %> <%= t('.administrator') %> <% elsif @message.author.is_moderator? %> <%= t('.moderator') %> <% end %> <% else %> <%= @message.author_username %> <% end %> <%= t('.tomsg') %> <%= @message.recipient.username %> <%= distance_of_time_in_words(@message.created_at, Time.now) %>
<%= raw @message.linkified_body %>

<%= form_tag message_path(@message.short_id), :method => :delete do %> <%= submit_tag t('.deletemessage') %> <% end %>
<%= form_tag message_path(@message.short_id) + "/keep_as_new", :method => :post do %> <%= submit_tag t('.keepasnew') %> <% end %>

<%= t('.composereply') %> <% if @new_message %> <%= t('.toupper') %> <%= @new_message.recipient_username %> <% end %>
<% if @new_message %> <%= form_for @new_message, :method => :post do |f| %> <%= f.hidden_field :recipient_username %> <%= error_messages_for @new_message %>
<%= f.text_field :subject, :style => "width: 500px;" %>
<%= f.text_area :body, :style => "width: 500px;", :rows => 5 %>

<%= submit_tag t('.sendmessage') %>
<% end %> <% else %> <%= t('.cantreply') %> <% end %>