I18n.t("notifier.note_comment_notification.anonymous")
end
+ @user_message_author = @commenter
+ attach_user_avatar(comment.author)
+
subject = if @owner
I18n.t("notifier.note_comment_notification.#{@event}.subject_own", :commenter => @commenter)
else
end
def user_avatar_file_path(user)
- image = user.image
- if image.file?
+ image = user && user.image
+ if image && image.file?
return image.path(:small)
else
return "#{Rails.root}/app/assets/images/users/images/small.png"
-<p><%= t 'notifier.note_comment_notification.greeting' %></p>
+<% content_for :body do %>
+ <p style="margin: 0"><%= t 'notifier.note_comment_notification.greeting' %></p>
-<% if @owner %>
-<p><%= t "notifier.note_comment_notification.#{@event}.your_note", :commenter => @commenter, :place => @place %></p>
-<% else %>
-<p><%= t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => @commenter, :place => @place %></p>
-<% end %>
+ <% if @owner %>
+ <p><%= raw t "notifier.note_comment_notification.#{@event}.your_note", :commenter => link_to_user(@commenter), :place => @place %></p>
+ <% else %>
+ <p><%= raw t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => link_to_user(@commenter), :place => @place %></p>
+ <% end %>
-==
-<%= @comment.to_html %>
-==
+ <%= render "notifier/user_message_table", :captured => capture { %>
+ <%= @comment.to_html %>
+ <% } %>
-<p><%= raw t 'notifier.note_comment_notification.details', :url => link_to(@noteurl, @noteurl) %></p>
+ <p><%= raw t 'notifier.note_comment_notification.details', :url => link_to(@noteurl, @noteurl) %></p>
+<% end %>