2012-07-04 03:48:01 +02:00
|
|
|
<div class="box wide">
|
|
|
|
<div class="legend" style="float: right;">
|
2013-01-24 21:06:10 +01:00
|
|
|
<% if @message.author_user_id == @user.id %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<a href="/messages/sent"><%= t('.backtosentmessages') %></a>
|
2013-01-24 21:06:10 +01:00
|
|
|
<% else %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<a href="/messages"><%= t('.backtomessages') %></a>
|
2013-01-24 21:06:10 +01:00
|
|
|
<% end %>
|
2012-07-04 03:48:01 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="legend">
|
|
|
|
<%= @message.subject %>
|
|
|
|
|
|
|
|
<div class="sublegend">
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= t('.sentfrom') %>
|
2015-10-15 17:01:42 +02:00
|
|
|
<% if @message.author %>
|
|
|
|
<a href="/u/<%= @message.author.username %>"><%=
|
|
|
|
@message.author.username %></a>
|
|
|
|
<% if @message.author.is_admin? %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= t('.administrator') %>
|
2015-10-15 17:01:42 +02:00
|
|
|
<% elsif @message.author.is_moderator? %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= t('.moderator') %>
|
2015-10-15 17:01:42 +02:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<%= @message.author_username %>
|
2014-02-21 18:19:32 +01:00
|
|
|
<% end %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= t('.tomsg') %>
|
2012-07-04 03:48:01 +02:00
|
|
|
<a href="/u/<%= @message.recipient.username %>"><%=
|
|
|
|
@message.recipient.username %></a>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= distance_of_time_in_words(@message.created_at, Time.now) %>
|
2012-07-04 03:48:01 +02:00
|
|
|
</div>
|
2013-12-24 00:15:58 +01:00
|
|
|
</div>
|
2012-07-04 03:48:01 +02:00
|
|
|
|
2014-01-14 18:38:36 +01:00
|
|
|
<div class="boxline comment_text">
|
2012-07-04 03:48:01 +02:00
|
|
|
<%= raw @message.linkified_body %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<div class="boxline">
|
|
|
|
<div style="float: left;">
|
2015-01-03 00:02:55 +01:00
|
|
|
<%= form_tag message_path(@message.short_id), :method => :delete do %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= submit_tag t('.deletemessage') %>
|
2012-07-04 03:48:01 +02:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2013-02-14 01:50:51 +01:00
|
|
|
|
2012-07-04 03:48:01 +02:00
|
|
|
<div style="float: left; padding-left: 1em;">
|
2015-01-03 00:02:55 +01:00
|
|
|
<%= form_tag message_path(@message.short_id) + "/keep_as_new",
|
2012-07-04 03:48:01 +02:00
|
|
|
:method => :post do %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= submit_tag t('.keepasnew') %>
|
2012-07-04 03:48:01 +02:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div style="clear: both;"></div>
|
2013-02-14 01:50:51 +01:00
|
|
|
|
2012-07-04 03:48:01 +02:00
|
|
|
<br>
|
|
|
|
|
|
|
|
<div class="legend">
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= t('.composereply') %>
|
2015-10-15 17:01:42 +02:00
|
|
|
<% if @new_message %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= t('.toupper') %> <%= @new_message.recipient_username %>
|
2015-10-15 17:01:42 +02:00
|
|
|
<% end %>
|
2012-07-04 03:48:01 +02:00
|
|
|
</div>
|
|
|
|
|
2015-10-15 17:01:42 +02:00
|
|
|
<% if @new_message %>
|
|
|
|
<%= form_for @new_message, :method => :post do |f| %>
|
|
|
|
<%= f.hidden_field :recipient_username %>
|
2012-07-04 03:48:01 +02:00
|
|
|
|
2015-10-15 17:01:42 +02:00
|
|
|
<%= error_messages_for @new_message %>
|
2012-07-04 03:48:01 +02:00
|
|
|
|
2015-10-15 17:01:42 +02:00
|
|
|
<div class="boxline">
|
|
|
|
<%= f.text_field :subject, :style => "width: 500px;",
|
|
|
|
:autocomplete => "off" %>
|
|
|
|
</div>
|
2012-07-04 03:48:01 +02:00
|
|
|
|
2015-10-15 17:01:42 +02:00
|
|
|
<div class="boxline">
|
|
|
|
<%= f.text_area :body, :style => "width: 500px;", :rows => 5,
|
|
|
|
:autocomplete => "off" %>
|
|
|
|
</div>
|
2012-07-04 03:48:01 +02:00
|
|
|
|
2015-10-15 17:01:42 +02:00
|
|
|
<div class="boxline">
|
|
|
|
<p></p>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= submit_tag t('.sendmessage') %>
|
2015-10-15 17:01:42 +02:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
2016-11-15 16:16:22 +01:00
|
|
|
<%= t('.cantreply') %>
|
2012-07-04 03:48:01 +02:00
|
|
|
<% end %>
|
|
|
|
</div>
|