Allowed sending follow-ups for sent messages
Fixes #3497. Adds Reply button when displaying sent messages (app/views/messages/show.html.erb) and allows replying to messages for which sender is current user (app/controllers/messages_controller.rb). Improved tests for testing added functionality.
This commit is contained in:
parent
5841813b82
commit
4716800144
3 changed files with 30 additions and 3 deletions
|
@ -18,8 +18,8 @@
|
|||
<div class="richtext text-break"><%= @message.body.to_html %></div>
|
||||
|
||||
<div>
|
||||
<%= link_to t(".reply_button"), message_reply_path(@message), :class => "btn btn-primary" %>
|
||||
<% if current_user == @message.recipient %>
|
||||
<%= link_to t(".reply_button"), message_reply_path(@message), :class => "btn btn-primary" %>
|
||||
<%= link_to t(".unread_button"), message_mark_path(@message, :mark => "unread"), :method => "post", :class => "btn btn-primary" %>
|
||||
<%= link_to t(".destroy_button"), message_path(@message), :method => "delete", :class => "btn btn-danger" %>
|
||||
<% else %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue