0
@@ -15,8 +15,8 @@ Comments for all articles
0
<ul class="pagelist commentlist" id="comment-list">
0
<% if @comments.any? %>
0
- <% @comments.reverse.each_with_index do |comment, i| -%>
0
- <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
0
+ <% @comments.reverse.each do |comment| -%>
0
+ <li class="event-comment<%= cycle("", " shade") %>" id="comment-<%= comment.id %>">
0
<a name="comment-<%= comment.id %>"></a>
0
<% unless comment.body.blank? -%>
0
<blockquote><p>"<%= strip_tags(comment.body) %>"</p></blockquote>
0
@@ -24,13 +24,13 @@ Comments for all articles
0
<cite>— <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %> said <%= time_ago_in_words comment.created_at %> ago</cite>
0
- <%= link_to_remote 'Edit', :url => edit_article_comment_path(@article, comment), :method => :get %> |
0
+ <%= link_to_remote 'Edit', :url => edit_article_comment_path(comment.article, comment), :method => :get %> |
0
<% if comment.approved? -%>
0
- <%= link_to_remote 'Unapprove', :url => unapprove_article_comment_path(@article, comment) %> |
0
+ <%= link_to_remote 'Unapprove', :url => unapprove_article_comment_path(comment.article, comment) %> |
0
- <%= link_to_remote 'Approve', :url => approve_article_comment_path(@article, comment) %> |
0
+ <%= link_to_remote 'Approve', :url => approve_article_comment_path(comment.article, comment) %> |
0
- <%= link_to_remote 'Delete', :url => article_comment_path(@article, comment), :method => :delete %>
0
+ <%= link_to_remote 'Delete', :url => article_comment_path(comment.article, comment), :method => :delete %>
0
@@ -62,4 +62,4 @@ Comments for all articles
0
if(comment) Element.addClassName(comment, 'focused');
0
\ No newline at end of file
Comments
No one has commented yet.