From 5c71c0aaa5c96683b56d2d8af0dfdac8424e41d2 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Thu, 2 Sep 2010 17:49:11 +1200 Subject: Comment moderation now working in the backend. Of course it still happens automatically if the blog isn't moderated based on whether it's spam or not. --- app/views/admin/blog/comments/_comment.html.erb | 23 ++++++---- app/views/admin/blog/comments/index.html.erb | 2 +- app/views/admin/blog/comments/show.html.erb | 61 +++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 11 deletions(-) create mode 100644 app/views/admin/blog/comments/show.html.erb (limited to 'app/views/admin/blog') diff --git a/app/views/admin/blog/comments/_comment.html.erb b/app/views/admin/blog/comments/_comment.html.erb index e03605a..3435c75 100644 --- a/app/views/admin/blog/comments/_comment.html.erb +++ b/app/views/admin/blog/comments/_comment.html.erb @@ -1,17 +1,20 @@ -
  • +
  • "> <%=h comment.name %> - <%= truncate(comment.message, :length => 75) %> - <%= link_to refinery_icon_tag("application_go.png"), blog_post_url(comment.post, - :anchor => "comment-#{comment.to_param}"), - :title => t('.view_live'), - :target => "_blank" %> - <%= link_to refinery_icon_tag("application_edit.png"), edit_admin_blog_comment_path(comment), - :title => t('.edit') %> - <%= link_to refinery_icon_tag("delete.png"), admin_blog_comment_path(comment), - :class => "cancel confirm-delete", - :title => t('.delete') %> + <%= link_to refinery_icon_tag("application_go.png"), + blog_post_url(comment.post, :anchor => "comment-#{comment.to_param}"), + :title => t('.view_live'), + :target => "_blank" unless comment.unmoderated? %> + <%= link_to refinery_icon_tag('zoom.png'), admin_blog_comment_path(comment), + :title => t('.read') %> + <%= link_to refinery_icon_tag("cross.png"), + rejected_admin_blog_comment_path(comment, :return_to => request.path.split('/').last), + :title => t('.reject') unless comment.rejected? %> + <%= link_to refinery_icon_tag("tick.png"), + approved_admin_blog_comment_path(comment, :return_to => request.path.split('/').last), + :title => t('.approve') unless comment.approved? %>
  • diff --git a/app/views/admin/blog/comments/index.html.erb b/app/views/admin/blog/comments/index.html.erb index 940ba47..c1596a6 100644 --- a/app/views/admin/blog/comments/index.html.erb +++ b/app/views/admin/blog/comments/index.html.erb @@ -28,7 +28,7 @@ <% else %>

    <%= t('.no_items_yet', - :type => (t("admin.blog.submenu.comments.#{action_name}").downcase unless action_name == 'index')) %> + :type => t("admin.blog.submenu.comments.#{action_name.gsub('index', 'new')}").downcase) %>

    <% end %> <% end %> diff --git a/app/views/admin/blog/comments/show.html.erb b/app/views/admin/blog/comments/show.html.erb new file mode 100644 index 0000000..8ed5191 --- /dev/null +++ b/app/views/admin/blog/comments/show.html.erb @@ -0,0 +1,61 @@ +
    +

    <%= t('.details')%>

    +

    + <%= t('.age') %>: <%= time_ago_in_words(@blog_comment.created_at) %> +

    +

    <%= t('.actions') %>

    + +
    +
    +

    <%= t('.comment') %>

    + + + + + + + + + + + + + + + + + +
    + <%= t('.blog_post') %> + + <%= link_to @blog_comment.post.title, + blog_post_url(@blog_comment.post, :anchor => "comment-#{@blog_comment.to_param}"), + :target => '_blank' %> +
    + <%= t('.from') %> + + <%= @blog_comment.name %> [<%= mail_to @blog_comment.email, @blog_comment.email, {:title => t('.click_to_email')} %>] +
    + <%= t('.date') %> + + <%= l(Date.parse(@blog_comment.created_at.to_s), :format => :long) %> +
    + <%= t('.message') %> + +

    + <%= @blog_comment.message.gsub("\r\n\r\n", "\r\n").gsub("\r\n", "

    ") %> +

    +
    +
    \ No newline at end of file -- cgit v1.2.3