Skip to content

Commit

Permalink
Don't display a box at all if the note event doesn't include a commen…
Browse files Browse the repository at this point in the history
…t body

Before this it just displays en empty box, which looks wrong.
  • Loading branch information
saintamh committed Feb 8, 2017
1 parent 579e323 commit 448a684
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/views/notifier/note_comment_notification.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 2 additions & 0 deletions app/views/notifier/note_comment_notification.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>

0 comments on commit 448a684

Please sign in to comment.