Skip to content

Commit

Permalink
Merge pull request #659 from elzj/otwarchive
Browse files Browse the repository at this point in the history
---

Issue 2085: Comment emails had incorrect links
  • Loading branch information
neuroalien committed Jun 1, 2012
2 parents 136d2d6 + 3baa0dd commit 3d65e78
Showing 1 changed file with 72 additions and 22 deletions.
94 changes: 72 additions & 22 deletions app/views/comment_mailer/_comment_notification_footer.erb
@@ -1,26 +1,76 @@
<p><%= ts("Posted") %>: <%= @comment.created_at %>
<% unless @comment.edited_at.blank? %>
<br /><%= ts("Last edited") %>: <%= @comment.edited_at %>
<% end %>
</p>
<p>
<% if @comment.ultimate_parent.is_a?(Tag) %>
<%= link_to ts("Read all comments on ") + @comment.ultimate_parent.name, {:controller => :comments, :action => :index, :tag_id => @comment.ultimate_parent, :only_path => false} %><br />
<% unless @noreply %>
<%= link_to ts("Reply to this comment"), {:controller => :comments, :action => :index, :tag_id => @comment.ultimate_parent, :only_path => false, :add_comment_reply_id => @comment.id, :anchor => "comment_#{@comment.id}"} %><br />
<% end %>
<%= link_to ts("Go to the thread starting from this comment"), {:controller => :comments, :action => :index, :tag_id => @comment.ultimate_parent, :only_path => false, :anchor => "comment_#{@comment.id}"} %><br />
<% unless @comment.id == @comment.thread %>
<%= link_to ts("Go to the thread to which this comment belongs"), {:controller => :comments, :action => :index, :tag_id => @comment.ultimate_parent, :anchor => "comment_#{@comment.thread}", :only_path => false} %><br />
<% end %>
<% else %>
<% unless @noreply %>
<%= link_to ts("Reply to this comment"), polymorphic_url(@comment.ultimate_parent, :add_comment_reply_id => @comment.id, :show_comments => true, :anchor => "comment_#{@comment.id}", :only_path => false) %><br />
<%= ts("Posted") %>: <%= @comment.created_at %>
<% unless @comment.edited_at.blank? %>
<br /><%= ts("Last edited") %>: <%= @comment.edited_at %>
<% end %>
<%= link_to ts("Go to the thread starting from this comment"), polymorphic_url(@comment.ultimate_parent, :anchor => "comment_#{@comment.id}", :only_path => false) %><br />
<% unless @comment.id == @comment.thread %>
<%= link_to ts("Go to the thread to which this comment belongs"), polymorphic_url(@comment.ultimate_parent, :anchor => "comment_#{@comment.thread}", :only_path => false) %><br />
</p>
<p>
<% if @comment.ultimate_parent.is_a?(Tag) %>
<%= link_to ts("Read all comments on %{name}",
:name => @comment.ultimate_parent.name),
{
:controller => :comments,
:action => :index,
:tag_id => @comment.ultimate_parent,
:only_path => false
}
%>
<br />
<% unless @noreply %>
<%= link_to ts("Reply to this comment"),
{
:controller => :comments,
:action => :index,
:tag_id => @comment.ultimate_parent,
:only_path => false,
:add_comment_reply_id => @comment.id,
:anchor => "comment_#{@comment.id}"
}
%>
<br />
<% end %>
<%= link_to ts("Go to the thread starting from this comment"),
{
:controller => :comments,
:action => :index,
:tag_id => @comment.ultimate_parent,
:only_path => false,
:anchor => "comment_#{@comment.id}"
}
%>
<br />
<% unless @comment.id == @comment.thread %>
<%= link_to ts("Go to the thread to which this comment belongs"),
{
:controller => :comments,
:action => :index,
:tag_id => @comment.ultimate_parent,
:anchor => "comment_#{@comment.thread}",
:only_path => false
}
%>
<% end %>
<% else %>
<% unless @noreply %>
<%= link_to ts("Reply to this comment"),
comment_url(@comment, :add_comment_reply_id => @comment.id, :only_path => false) %>
<br />
<% end %>
<%= link_to ts("Go to the thread starting from this comment"),
comment_url(@comment, :only_path => false) %>
<br />
<% unless @comment.id == @comment.thread %>
<%= link_to ts("Go to the thread to which this comment belongs"),
comment_url(:id => @comment.thread, :only_path => false) %>
<br />
<% end %>
<%= link_to (ts("Read all comments on %{name}", :name => @comment.ultimate_parent.commentable_name)).html_safe,
polymorphic_url(@comment.ultimate_parent,
:view_full_work => true,
:show_comments => true,
:anchor => :comments,
:only_path => false
)
%>
<% end %>
<%= link_to (ts("Read all comments on ") + @comment.ultimate_parent.commentable_name).html_safe, polymorphic_url(@comment.ultimate_parent, :show_comments => true, :anchor => :comments, :only_path => false) %><br />
<% end %>
</p>

0 comments on commit 3d65e78

Please sign in to comment.