Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #659 from elzj/otwarchive
--- Issue 2085: Comment emails had incorrect links
- Loading branch information
Showing
1 changed file
with
72 additions
and
22 deletions.
There are no files selected for viewing
94 changes: 72 additions & 22 deletions
94
app/views/comment_mailer/_comment_notification_footer.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |