0
-<% content_for :action_nav do %>
0
-<!-- begin action nav -->
0
- <ul id="act-nav" class="clear">
0
- <li><%= link_to_remote 'Delete these comments', :confirm => "Are you sure you wish to delete all of these comments?",
0
- :url => { :controller => 'articles', :action => 'destroy_comment' },
0
- :with => "ArticleForm.getAvailableComments().toQueryString('comment')"
0
-<!-- /end action nav -->
0
+<%= render :partial => "admin/articles/page_nav" %>
0
+<h3 style="border-bottom:1px solid #ccc;padding:5px">Comments on <%= link_to @article.title, edit_article_path(@article), :style => 'border:none' %> <span class="right"><%= @article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style => 'vertical-align: middle'), @site.permalink_for(@article), :style => 'border:none;') : ' ' %></span></h3>
0
-<h3><%= pluralize(@comments.size, 'Unapproved Comment') %></h3>
0
+ <%= link_to_function "New comment", "$('new-comment-form').toggle()" %>
0
+ <div id="new-comment-form" style="display:none"><%= render :partial => "new_comment" %></div>
0
-<ul class="pagelist commentlist">
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
- <h3><a name="comment-<%= comment.id %>"></a> <%= link_to comment.article.title, :controller => 'articles', :action => 'edit', :id => comment.article %></h3>
0
- <blockquote><p>"<%= truncate strip_tags(comment.body), 255 %>"</p></blockquote>
0
+ <a name="comment-<%= comment.id %>"></a>
0
+ <% unless comment.body.blank? -%>
0
+ <blockquote><p>"<%= strip_tags(comment.body) %>"</p></blockquote>
0
- <cite>— <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %></cite>
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
<% if comment.approved? -%>
0
- <%= link_to_remote 'Unapprove', :url =>
{ :action => 'unapprove', :controller => 'articles', :id => comment.article, :comment => comment } %> |
0
+ <%= link_to_remote 'Unapprove', :url =>
unapprove_article_comment_path(@article, comment) %> |
0
- <%= link_to_remote 'Approve', :url =>
{ :action => 'approve', :controller => 'articles', :id => comment.article, :comment => comment } %> |
0
+ <%= link_to_remote 'Approve', :url =>
approve_article_comment_path(@article, comment) %> |
0
- <%= link_to_remote 'Delete', :url =>
{ :action => 'destroy_comment', :controller => 'articles', :id => comment.article, :comment => comment } %>
0
+ <%= link_to_remote 'Delete', :url =>
article_comment_path(@article, comment), :method => :delete %>
0
+ <li class="event-none shade">This article has no <%= params[:filter].to_s.humanize.downcase %> comments.</li>
0
+<% content_for :sidebar do %>
0
+ <% if @articles.size > 1 -%>
0
+ <h3>Comments awaiting your approval</h3>
0
+ <% @articles.each do |article, count| -%>
0
+ <% if article.title != @article.title -%>
0
+ <li><%= link_to "<strong>(#{count})</strong> #{h(article.title)}", :controller => 'articles', :action => 'comments', :id => article.id, :filter => :unapproved %></li>
0
+<script type="text/javascript" language="javascript" charset="utf-8">
0
+ var comment = $(document.location.hash.substring(1));
0
+ if(comment) Element.addClassName(comment, 'focused');
0
\ No newline at end of file
Comments
No one has commented yet.