publiclab/plots2

View on GitHub
app/views/comment_mailer/notify_callout.html.erb

Summary

Maintainability
Test Coverage
<% if @comment.aid == 0 %>
Hi! You were mentioned by <%= @comment.author.name %> in a comment on <% if @comment.parent.has_power_tag('question') %>the question <% elsif @comment.parent.type == 'page' %>the wiki page <% else %>the research note <% end %><b><%= @comment.parent.title %></b>.
<% else %>
Hi! You were mentioned by <%= @comment.author.name %> in a comment on the answer about <a href='https://<%= ActionMailer::Base.default_url_options[:host] %><%= @comment.parent.path(:question) %>#a<%= @comment.answer.id %>'><%= @comment.parent.title %></a>
<% end %>
You can reply to this email or visit this link:

<% if @comment.parent.has_power_tag('question') %>
<p>https://<%= ActionMailer::Base.default_url_options[:host] %><%= @comment.parent.path(:question) %>#answer-comment-<%= @comment.cid %></p>
<% elsif @comment.parent.type == 'page' %>
  <p>https://<%= ActionMailer::Base.default_url_options[:host] %><%= @comment.parent.path %>/comments#c<%= @comment.cid %></p>
<% else %>
<p>https://<%= ActionMailer::Base.default_url_options[:host] %><%= @comment.node.path %>#c<%= @comment.cid %></p>
<% end %>

<p><b><a href="https://<%= ActionMailer::Base.default_url_options[:host] %>/profile/<%= @comment.author.name %>"><%= @comment.author.name %></a> wrote:</b></p>

<hr /> 

<p><%= raw auto_link(RDiscount.new(@comment.body_email(ActionMailer::Base.default_url_options[:host])).to_html) %></p>

<hr /> 

<div style="color:#aaa;">

<% if @comment.parent.has_power_tag('question') %>
<p>Reply at: https://<%= ActionMailer::Base.default_url_options[:host] %><%= @comment.parent.path(:question) %>#answer-<%= @comment.aid %>-comment</p>
<% elsif @comment.parent.type == 'page' %>
  <p>Reply at: https://<%= ActionMailer::Base.default_url_options[:host] %><%= @comment.node.path %>/comments</p>
<% else %> 
<p>Reply at: https://<%= ActionMailer::Base.default_url_options[:host] %><%= @comment.node.path %>#comments</p>
<% end %>

<p>Report abuse to: moderators@<%= ActionMailer::Base.default_url_options[:host] %></p>

<%= @footer %>

</div>