Don't display a box at all if the note event doesn't include a comment body

Before this it just displays en empty box, which looks wrong.
This commit is contained in:
Herve Saint-Amand 2017-02-08 22:22:21 +00:00
parent 579e323d09
commit 448a68447f
2 changed files with 6 additions and 2 deletions

View file

@ -6,8 +6,10 @@
<p><%= raw t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => link_to_user(@commenter), :place => @place %></p>
<% end %>
<%= message_body do %>
<%= @comment.to_html %>
<% unless @comment.empty? %>
<%= message_body do %>
<%= @comment.to_html %>
<% end %>
<% end %>
<p><%= raw t 'notifier.note_comment_notification.details', :url => link_to(@noteurl, @noteurl) %></p>

View file

@ -6,8 +6,10 @@
<%= t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => @commenter, :place => @place %>
<% end %>
<% unless @comment.empty? %>
==
<%= @comment.to_text %>
==
<% end %>
<%= t 'notifier.note_comment_notification.details', :url => @noteurl %>